@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@300;400&family=DotGothic16&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 도트 배경 */
body {
  font-family: 'IBM Plex Sans KR', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('images/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #5a2a3a;
}

:root {
  --pink: #ff6eb4;
  --hotpink: #e8609a;
  --pink-light: #fff0f7;
  --pink-mid: #f0b0d0;
  --pink-dark: #c04878;
  --cardbg: #fff8fc;
  --cardborder: #e8a8cc;
  --text: #5a2a3a;
  --text-light: #a05070;
  --text-muted: #c080a0;
}

/* 배경 별 */
.stars { position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; overflow:hidden; }
.star { position:absolute; animation:twinkle 2s infinite; }
@keyframes twinkle { 0%,100%{opacity:0.1;transform:scale(0.8)} 50%{opacity:0.5;transform:scale(1.1)} }

/* ===== 사이트 프레임 ===== */
.site-frame {
  position: relative;
  z-index: 1;
  width: min(85vw, 151vh);
  aspect-ratio: 16 / 9;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.site-frame.miniroom-active { overflow: visible; }

/* ===== 상단 바: 로고 + 카테고리 + 우배너 ===== */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: transparent;
  height: clamp(54px, 9vh, 80px); /* 로고 높이와 동일하게 */
  overflow: visible;
}

/* 로고 */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-img {
  height: clamp(54px, 9vh, 80px);
  width: auto;
  object-fit: contain;
}

/* 카테고리 버튼들 */
.top-nav {
  display: flex;
  gap: clamp(8px, 1.4vw, 18px);
  flex: 1;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
}

.nav-btn {
  font-family: 'IBM Plex Sans KR', sans-serif;
  font-weight: 300;
  padding: clamp(4px, 0.5vh, 7px) clamp(14px, 1.8vw, 26px);
  font-size: clamp(9px, 1vw, 12px);
  background: #f5c6e2;
  border: none;
  color: #fff;
  text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
  cursor: pointer;
  letter-spacing: 0.5px;
  border-radius: 0;
  transition: background 0.12s, box-shadow 0.12s;
  white-space: nowrap;
  font-weight: bold;
  box-shadow: inset -3px -3px 2px rgba(0,0,0,0.55), inset 1px 1px 0px rgba(0,0,0,0.15);
}
.nav-btn:hover {
  background: #eeaad6;
  box-shadow: inset -3px -3px 2px rgba(0,0,0,0.55), inset 1px 1px 0px rgba(0,0,0,0.15);
}
.nav-btn.active {
  background: #ef90e6;
  color: #fff;
  box-shadow: inset -3px -3px 2px rgba(0,0,0,0.55), inset 1px 1px 0px rgba(0,0,0,0.15);
}

/* 우측 배너 */
.top-right-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--cardborder);
  background: #fff0f7;
  padding: 4px 8px;
  min-width: clamp(70px, 9vw, 110px);
}
.online-dot {
  width: 7px; height: 7px;
  background: #ff6eb4;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.banner-text { font-size: clamp(8px, 0.85vw, 10px); color: var(--text-light); line-height: 1.4; }
.banner-text span { color: var(--text-muted); font-size: clamp(7px,0.75vw,9px); }

/* ===== 콘텐츠 영역 ===== */
.content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding-top: clamp(54px, 9vh, 80px); /* top-bar 높이만큼 */
}

.page { display:none; width:100%; height:100%; }
.page.active { display:flex; flex-direction:column; animation:fadeIn 0.18s ease forwards; overflow: hidden; }
#page-miniroom.active { overflow: visible; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ===== 홈 ===== */
/* 메인 배너 */
.main-banner {
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
  border-bottom: 2px solid var(--cardborder);
  line-height: 0;
}
.banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  max-height: 25vw; /* 4:1 비율 유지 */
}

/* 하단 프로필+이미지 */
.home-bottom {
  flex: 1;
  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
  background: transparent;
}

/* 프로필 카드 */
.profile-card {
  padding: clamp(30px, 4.5vh, 52px) clamp(6px, 0.9vw, 10px) clamp(3px, 0.4vw, 6px);
  background: transparent;
  border-right: none;
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.3vh, 4px);
  overflow: hidden;
  justify-content: flex-start;
}

/* new employee 이탤릭 라벨 */
.card-top-row {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
}
.card-label {
  font-family: 'DotGothic16', sans-serif;
  font-style: normal;
  font-size: clamp(9px, 1vw, 12px);
  color: var(--hotpink);
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: left;
  margin-bottom: clamp(4px, 0.6vh, 8px);
}

/* 캐릭터 선택 드롭다운 */
.char-selector-wrap {
  position: relative;
  flex-shrink: 0;
}
.char-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--cardborder);
  border-radius: 4px;
  padding: clamp(3px,0.4vh,5px) clamp(6px,0.9vw,10px);
  cursor: pointer;
  font-size: clamp(8px, 0.9vw, 11px);
  color: var(--text-light);
  user-select: none;
  transition: background 0.1s;
  box-shadow: 0 1px 4px rgba(200,80,140,0.1);
}
.char-selector:hover { background: #ffe8f4; }
.selector-arrow { font-size: clamp(7px,0.75vw,9px); color: var(--pink-mid); transition: transform 0.15s; }
.char-selector.open .selector-arrow { transform: rotate(180deg); }
.char-dropdown {
  display: none;
  position: fixed;
  background: #fff8fc;
  border: 1px solid var(--cardborder);
  list-style: none;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(200,80,140,0.15);
}
.char-dropdown.open { display: block; }
.char-dropdown li {
  padding: clamp(3px,0.4vh,5px) clamp(6px,0.9vw,10px);
  font-size: clamp(8px,0.9vw,11px);
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px dotted var(--cardborder);
}
.char-dropdown li:last-child { border-bottom: none; }
.char-dropdown li:hover { background: #ffe0f0; color: var(--hotpink); }

/* 카드 본체 */
.card-body {
  display: flex;
  gap: clamp(5px, 0.8vw, 10px);
  flex-shrink: 0;
  border: 2px solid var(--cardborder);
  border-radius: 10px;
  background: white;
  padding: clamp(5px, 0.7vw, 9px);
  overflow: hidden;
  align-items: flex-start;
}

/* 왼쪽: 증명사진 */
.card-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.card-photo {
  width: clamp(44px, 6vw, 76px);
  aspect-ratio: 3 / 4;
  background: var(--theme-label-bg, #fdd0e8);
  border: 2px solid var(--cardborder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 3.2vw, 40px);
  overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo-name {
  font-size: clamp(7px, 0.75vw, 9px);
  background: var(--theme-ssb-btn, var(--hotpink));
  color: white;
  padding: 1px 5px;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
}

/* 중앙: 정보 박스들 */
.card-info {
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.4vh, 6px);
  flex: 1;
  justify-content: center;
}
.info-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--cardborder);
  border-radius: 4px;
  overflow: hidden;
  background: #fff0f7;
}
.info-label {
  background: var(--pink-mid);
  color: white;
  font-size: clamp(7px, 0.8vw, 10px);
  padding: clamp(3px,0.4vh,5px) clamp(5px,0.6vw,8px);
  white-space: nowrap;
  display: flex;
  align-items: center;
  min-width: clamp(36px, 5vw, 58px);
  justify-content: center;
  border-radius: 3px 0 0 3px;
}
.info-value {
  font-size: clamp(8px, 0.9vw, 11px);
  color: var(--text);
  padding: clamp(3px,0.4vh,5px) clamp(5px,0.6vw,8px);
  display: flex;
  align-items: center;
}

/* 오른쪽 외부 래퍼: 패널 + 스크롤바 가로 배치 */
.card-side-outer {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 0;
}

/* 텍스트+이미지 패널 */
.card-side-panel {
  width: clamp(48px, 7vw, 88px);
  display: flex;
  flex-direction: column;
  border: 2px solid var(--cardborder);
  border-radius: 6px 0 0 6px;
  overflow: hidden;
  background: #ffb3d9;
}

/* 상단 캐릭터 이미지 */
.side-char-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  background: var(--theme-label-bg, #fdd0e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 2.8vw, 34px);
  border-bottom: 1px solid var(--cardborder);
  overflow: hidden;
}
.side-char-img img { width: 100%; height: 100%; object-fit: cover; }

/* 텍스트: 스크롤바 없이 overflow hidden */
.card-scroll-box {
  flex: 1;
  min-height: 0;
  background: var(--theme-scroll-bg, #ffb3d9);
  font-size: clamp(6px, 0.72vw, 9px);
  color: var(--theme-scroll-text, #7a2040);
  line-height: 1.75;
  padding: clamp(4px, 0.5vw, 7px);
  overflow: hidden;
}

/* HTML 스크롤바 — 패널 오른쪽에 딱 붙은 별도 요소 */
.side-scrollbar {
  width: 12px;
  display: flex;
  flex-direction: column;
  background: #f0a8c8;
  border: 2px solid var(--cardborder);
  border-left: none;
  border-radius: 0 6px 6px 0;
  overflow: hidden;
  flex-shrink: 0;
}
.ssb-btn {
  width: 100%;
  height: 12px;
  min-height: 12px;
  flex-shrink: 0;
  background: var(--theme-ssb-btn, #c86090);
  border: none;
  color: white;
  font-size: 7px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.ssb-btn:hover { background: var(--theme-ssb-hover, #a04070); }
.ssb-btn:active { background: var(--theme-ssb-active, #803050); }
.ssb-track {
  flex: 1;
  position: relative;
  background: var(--theme-ssb-track, #f0a8c8);
  cursor: pointer;
  min-height: 0;
}
.ssb-thumb {
  position: absolute;
  left: 1px; right: 1px;
  top: 0;
  height: 20px;
  background: #aaa;
  border-radius: 3px;
  cursor: grab;
  user-select: none;
}
.ssb-thumb:active { cursor: grabbing; background: #888; }


/* 배경 별 */
.stars { position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; overflow:hidden; }
.star { position:absolute; animation:twinkle 2s infinite; }
@keyframes twinkle { 0%,100%{opacity:0.1;transform:scale(0.8)} 50%{opacity:0.5;transform:scale(1.1)} }

/* ===== 사이트 프레임 ===== */
.site-frame {
  position: relative;
  z-index: 1;
  width: min(85vw, 151vh);
  aspect-ratio: 16 / 9;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.site-frame.miniroom-active { overflow: visible; }

/* ===== 상단 바: 로고 + 카테고리 + 우배너 ===== */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: transparent;
  height: clamp(54px, 9vh, 80px); /* 로고 높이와 동일하게 */
  overflow: visible;
}

/* 로고 */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-img {
  height: clamp(54px, 9vh, 80px);
  width: auto;
  object-fit: contain;
}

/* 카테고리 버튼들 */
.top-nav {
  display: flex;
  gap: clamp(8px, 1.4vw, 18px);
  flex: 1;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
}

.nav-btn {
  font-family: 'IBM Plex Sans KR', sans-serif;
  font-weight: 300;
  padding: clamp(4px, 0.5vh, 7px) clamp(14px, 1.8vw, 26px);
  font-size: clamp(9px, 1vw, 12px);
  background: #f5c6e2;
  border: none;
  color: #fff;
  text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
  cursor: pointer;
  letter-spacing: 0.5px;
  border-radius: 0;
  transition: background 0.12s, box-shadow 0.12s;
  white-space: nowrap;
  font-weight: bold;
  box-shadow: inset -3px -3px 2px rgba(0,0,0,0.55), inset 1px 1px 0px rgba(0,0,0,0.15);
}
.nav-btn:hover {
  background: #eeaad6;
  box-shadow: inset -3px -3px 2px rgba(0,0,0,0.55), inset 1px 1px 0px rgba(0,0,0,0.15);
}
.nav-btn.active {
  background: #ef90e6;
  color: #fff;
  box-shadow: inset -3px -3px 2px rgba(0,0,0,0.55), inset 1px 1px 0px rgba(0,0,0,0.15);
}

/* 우측 배너 */
.top-right-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--cardborder);
  background: #fff0f7;
  padding: 4px 8px;
  min-width: clamp(70px, 9vw, 110px);
}
.online-dot {
  width: 7px; height: 7px;
  background: #ff6eb4;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.banner-text { font-size: clamp(8px, 0.85vw, 10px); color: var(--text-light); line-height: 1.4; }
.banner-text span { color: var(--text-muted); font-size: clamp(7px,0.75vw,9px); }

/* ===== 콘텐츠 영역 ===== */
.content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding-top: clamp(54px, 9vh, 80px); /* top-bar 높이만큼 */
}

.page { display:none; width:100%; height:100%; }
.page.active { display:flex; flex-direction:column; animation:fadeIn 0.18s ease forwards; overflow: hidden; }
#page-miniroom.active { overflow: visible; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ===== 홈 ===== */
/* 메인 배너 */
.main-banner {
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
  border-bottom: 2px solid var(--cardborder);
  line-height: 0;
}
.banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  max-height: 25vw; /* 4:1 비율 유지 */
}

/* 하단 프로필+이미지 */
.home-bottom {
  flex: 1;
  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
  background: transparent;
}

/* 프로필 카드 */
.profile-card {
  padding: clamp(30px, 4.5vh, 52px) clamp(8px, 1.2vw, 16px) clamp(6px, 1vw, 12px);
  background: transparent;
  border-right: none;
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.3vh, 4px);
  justify-content: flex-start;
}

/* 흰색 둥근 박스 — 전체 감싸기 */
.profile-white-box {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--cardborder);
  border-radius: 12px;
  padding: clamp(3px, 0.4vw, 6px);
  display: flex;
  flex-direction: row;
  gap: clamp(4px, 0.5vw, 8px);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-self: stretch;
}

/* 왼쪽: 드롭다운 + 사진+정보 */
.profile-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  justify-content: flex-start;
}
.card-label {
  font-family: 'DotGothic16', sans-serif;
  font-style: normal;
  font-size: clamp(9px, 1vw, 12px);
  color: var(--hotpink);
  letter-spacing: 2px;
  text-align: left;
  margin-bottom: clamp(4px, 0.6vh, 8px);
}
.card-body {
  display: flex;
  gap: clamp(6px, 1vw, 12px);
  align-items: flex-start;
  flex-shrink: 0;
}

/* 미스타다식 프로필 박스 */
.card-box {
  flex: 1;
  border: 2px solid var(--cardborder);
  background: white;
  display: flex;
  gap: 0;
  overflow: hidden;
}
.card-photo {
  flex-shrink: 0;
  width: clamp(50px, 7vw, 90px);
  height: 100%;
  min-height: clamp(60px, 8vh, 100px);
  background: var(--theme-label-bg, #fdd0e8);
  border-right: 2px solid var(--cardborder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(26px, 4vw, 50px);
  flex-direction: column;
  gap: 2px;
}
.card-photo-label {
  font-size: clamp(6px, 0.7vw, 8px);
  color: #fff;
  background: var(--hotpink);
  padding: 1px 4px;
  letter-spacing: 1px;
}
.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(4px, 0.6vw, 8px);
  gap: 3px;
}
.card-badge {
  background: var(--hotpink);
  color: #fff;
  font-size: clamp(7px, 0.8vw, 9px);
  padding: 1px 6px;
  display: inline-block;
  letter-spacing: 1px;
  margin-bottom: 2px;
  align-self: flex-start;
}
.card-table { font-size: clamp(8px, 0.9vw, 11px); border-collapse: collapse; width: 100%; }
.card-table tr { border-bottom: 1px dotted var(--cardborder); }
.card-table td { padding: clamp(2px,0.3vh,4px) 3px; color: var(--text); vertical-align: top; }
.ctd-label { color: var(--hotpink); white-space: nowrap; padding-right: 6px; width: 56px; }

.card-side-text {
  font-size: clamp(7px, 0.8vw, 10px);
  color: var(--text-light);
  line-height: 1.8;
  flex-shrink: 0;
  max-width: clamp(60px, 9vw, 110px);
  border: 1px solid var(--cardborder);
  background: #fff8fc;
  padding: clamp(4px, 0.5vw, 8px);
  overflow-y: auto;
}

.card-search {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}
.card-search input {
  flex: 1;
  font-family: 'IBM Plex Sans KR', sans-serif;
  font-weight: 300;
  font-size: clamp(8px, 0.85vw, 10px);
  background: #fff;
  border: 1px solid var(--cardborder);
  color: var(--text-muted);
  padding: 3px 6px;
}
.card-search button {
  font-family: 'IBM Plex Sans KR', sans-serif;
  font-weight: 300;
  font-size: clamp(8px, 0.85vw, 10px);
  background: var(--pink-mid);
  border: 1px solid var(--cardborder);
  color: var(--pink-dark);
  padding: 3px 8px;
  cursor: pointer;
}

/* 우측 이미지 */
/* ===== 홈 캐릭터 갤러리 패널 ===== */
/* ===== 홈 캐릭터 갤러리 ===== */
.char-gallery-panel {
  display: flex;
  align-items: stretch;
  padding: clamp(6px, 1vh, 14px) clamp(6px, 1vw, 14px) clamp(6px, 1vh, 14px) 0;
  overflow: hidden;
}
.char-gallery-box {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--cardborder);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.4vh, 5px);
  padding: clamp(4px, 0.5vw, 7px);
  width: 100%;
  overflow: hidden;
}
/* 3열 그리드 */
.char-gallery-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  gap: clamp(3px, 0.4vw, 5px);
  overflow: hidden;
  align-content: start;
}
.gal-cell {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  border: 1.5px solid var(--cardborder);
  overflow: hidden;
  cursor: pointer;
  background: var(--theme-label-bg, #fdd0e8);
  transition: border-color 0.15s, transform 0.12s;
  display: block;
}
.gal-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.gal-cell:hover {
  border-color: var(--hotpink);
  transform: scale(1.04);
  z-index: 1;
  position: relative;
}
/* 페이지 내비 */
.char-gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.5vw, 8px);
  flex-shrink: 0;
}
.gal-arr {
  font-family: 'DotGothic16', sans-serif;
  background: var(--theme-label-bg, #fdd0e8);
  border: 1.5px solid var(--cardborder);
  border-radius: 3px;
  font-size: clamp(7px, 0.8vw, 10px);
  color: var(--hotpink);
  padding: 1px clamp(4px, 0.5vw, 7px);
  cursor: pointer;
  transition: background 0.12s;
}
.gal-arr:hover { background: var(--cardborder); }
.gal-page-info {
  font-family: 'DotGothic16', sans-serif;
  font-size: clamp(7px, 0.75vw, 10px);
  color: var(--hotpink);
  letter-spacing: 1px;
}
/* 팝업 오버레이 */
.gal-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 0, 30, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-popup-box {
  background: rgba(255,255,255,0.97);
  border: 2px solid var(--cardborder);
  border-radius: 12px;
  padding: clamp(10px, 1.5vw, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  max-height: 90vh;
}
.gal-popup-img {
  aspect-ratio: 3 / 4;
  max-height: 70vh;
  max-width: 80vw;
  width: auto;
  border-radius: 8px;
  border: 1.5px solid var(--cardborder);
  object-fit: contain;
  display: block;
}
.gal-popup-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gal-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: var(--theme-label-bg, #fdd0e8);
  border: 1.5px solid var(--cardborder);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 10px;
  color: var(--hotpink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DotGothic16', sans-serif;
}
.gal-popup-close:hover { background: var(--cardborder); }

/* ===== 일반 페이지 ===== */
.inner-page {
  padding: clamp(8px, 1.5vw, 18px);
  overflow-y: auto;
  height: 100%;
  background: transparent;
}
.inner-page::-webkit-scrollbar { width: 4px; }
.inner-page::-webkit-scrollbar-thumb { background: var(--pink-mid); border-radius: 2px; }

.page-title {
  font-size: clamp(12px, 1.4vw, 16px);
  color: var(--hotpink);
  text-align: center;
  margin-bottom: 0.7em;
  letter-spacing: 2px;
}

/* 프로필 */
.profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.profile-item { border:1px solid var(--cardborder); padding:7px; background:white; }
.profile-label { font-size:clamp(8px,0.85vw,10px); color:var(--pink-dark); margin-bottom:2px; }
.profile-value { font-size:clamp(9px,1vw,12px); color:var(--text); }

/* 쥬크박스 */
.jukebox-layout { display:grid; grid-template-columns:1fr 1fr; gap:clamp(6px,1.2vw,14px); }
.yt-wrap { position:relative; padding-bottom:56.25%; height:0; overflow:hidden; border:2px solid var(--cardborder); }
.yt-wrap iframe { position:absolute; top:0; left:0; width:100%; height:100%; }
.now-playing-label { font-size:clamp(8px,0.9vw,11px); color:var(--hotpink); margin-bottom:5px; letter-spacing:1px; }
.playlist { list-style:none; display:flex; flex-direction:column; gap:3px; margin-bottom:6px; }
.playlist-item { display:flex; align-items:center; gap:5px; padding:5px 7px; border:1px solid var(--cardborder); background:white; cursor:pointer; transition:background 0.1s; font-size:clamp(8px,0.9vw,11px); }
.playlist-item:hover,.playlist-item.active-track { background:#ffe0f0; border-color:var(--pink); }
.track-num { color:var(--text-muted); min-width:16px; }
.track-info { display:flex; flex-direction:column; flex:1; gap:1px; }
.track-title { color:var(--text); }
.track-artist { font-size:clamp(7px,0.75vw,9px); color:var(--text-muted); }
.track-tag { font-size:clamp(7px,0.75vw,9px); border:1px solid var(--cardborder); color:var(--pink-dark); padding:1px 4px; border-radius:5px; }
.rec-music { display:flex; gap:8px; align-items:flex-start; border:1px solid var(--cardborder); padding:7px; background:white; }
.rec-cover { font-size:24px; }
.rec-info { display:flex; flex-direction:column; gap:2px; }
.rec-title { font-size:clamp(9px,1vw,12px); color:var(--hotpink); }
.rec-artist { font-size:clamp(8px,0.85vw,10px); color:var(--text-light); }
.rec-comment { font-size:clamp(7px,0.8vw,10px); color:var(--text-muted); }

/* 미니룸 */
.miniroom-wrap { display:flex; flex-direction:column; gap:7px; }
.room { position:relative; width:100%; height:clamp(100px,16vh,180px); background:linear-gradient(180deg,#fce8f3 0%,#f8d0e8 60%,#f4c0e0 100%); border:2px solid var(--cardborder); overflow:hidden; }
.room-item { position:absolute; text-align:center; font-size:10px; color:var(--text-light); }
.wall-item { font-size:16px; }
.star1{top:8px;left:10px} .star2{top:6px;right:14px;font-size:20px} .poster{top:14px;left:50%;transform:translateX(-50%);font-size:22px}
.furniture { display:flex; flex-direction:column; align-items:center; font-size:24px; gap:1px; }
.furniture span { font-size:8px; color:var(--text-light); }
.desk{bottom:22px;left:14px} .bookshelf{bottom:22px;right:14px} .plant{bottom:24px;right:60px;font-size:18px} .bed{bottom:20px;left:70px;font-size:28px}
.room-character { position:absolute; bottom:20px; left:50%; transform:translateX(-50%); text-align:center; animation:bounce 1.5s infinite; }
.character-body { font-size:26px; } .character-name { font-size:8px; color:var(--hotpink); }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-4px)} }
.room::after { content:''; position:absolute; bottom:18px; left:0; right:0; height:1px; background:rgba(200,80,140,0.2); }
.room-info { display:flex; gap:6px; flex-wrap:wrap; }
.room-info-item { display:flex; align-items:center; gap:5px; border:1px solid var(--cardborder); padding:4px 9px; background:white; font-size:clamp(8px,0.9vw,11px); }
.room-info-label { color:var(--pink-dark); min-width:28px; }

/* 갤러리 */
.gallery-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.gallery-item { aspect-ratio:1; border:2px solid var(--cardborder); display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:clamp(18px,3vw,30px); background:white; cursor:pointer; transition:border-color 0.15s,transform 0.15s; gap:3px; }
.gallery-item span { font-size:clamp(7px,0.8vw,10px); color:var(--text-muted); }
.gallery-item:hover { border-color:var(--hotpink); transform:scale(1.04); }

/* Q&A */
.qna-layout { display:grid; grid-template-columns:1fr 1fr; gap:clamp(6px,1.2vw,14px); }
.qna-list { display:flex; flex-direction:column; gap:7px; }
.qna-item { background:transparent; border:none; padding:4px 0; }
.qna-q,.qna-a { display:flex; gap:5px; align-items:flex-start; font-size:clamp(8px,0.9vw,12px); }
.qna-q { color:var(--text); margin-bottom:5px; }
.qna-a { color:var(--text-light); }
.qna-label { font-size:10px; font-weight:bold; padding:1px 5px; border:1px solid; flex-shrink:0; border-radius:3px; }
.q-label { border-color:#c084fc; color:#c084fc; }
.a-label { border-color:var(--pink); color:var(--pink-dark); }
.qna-form { display:flex; flex-direction:column; gap:5px; }
.form-title { font-size:clamp(9px,1vw,12px); color:var(--pink-dark); margin-bottom:3px; }
.qna-form input,.qna-form textarea { width:100%; background:white; border:1px solid var(--cardborder); color:var(--text); font-family:'DotGothic16',monospace; padding:6px; font-size:clamp(8px,0.9vw,11px); }
.qna-form textarea { height:70px; resize:none; }
.qna-form button { font-family:'DotGothic16',monospace; background:linear-gradient(135deg,#f0b0d0,#e8609a); border:none; color:#fff; padding:7px; font-size:clamp(9px,1vw,12px); cursor:pointer; transition:all 0.15s; }
.qna-form button:hover { background:linear-gradient(135deg,#e8609a,#c04878); }

/* 게임 */
.game-area { text-align:center; }
.game-score { font-size:clamp(12px,1.4vw,16px); color:var(--hotpink); margin-bottom:3px; }
.game-info { font-size:clamp(8px,0.9vw,11px); color:var(--text-light); margin-bottom:6px; }
.canvas-wrap { border:2px solid var(--cardborder); display:inline-block; }
canvas { display:block; background:#fff8fc; image-rendering:pixelated; }
.game-btns { margin:6px 0; display:flex; justify-content:center; gap:6px; }
.game-btns button { font-family:'DotGothic16',monospace; background:linear-gradient(135deg,#f0b0d0,#e8609a); border:none; color:#fff; padding:6px 16px; font-size:clamp(9px,1vw,12px); cursor:pointer; transition:all 0.15s; }
.game-btns button:hover { background:linear-gradient(135deg,#e8609a,#c04878); }
.game-hint { font-size:clamp(7px,0.8vw,9px); color:var(--text-muted); margin-top:4px; }

/* 즐겨찾기 */
.fav-layout { display:grid; grid-template-columns:1fr 1fr; gap:clamp(6px,1.2vw,14px); }
.fav-section-title { font-size:clamp(9px,1vw,12px); color:var(--pink-dark); margin-bottom:6px; }
.link-list { display:flex; flex-direction:column; gap:4px; }
.link-item { border:1px solid var(--cardborder); padding:6px 9px; background:white; }
.link-name { font-size:clamp(9px,1vw,12px); color:var(--pink-dark); margin-bottom:2px; }
.link-name a { color:var(--pink-dark); text-decoration:none; }
.link-name a:hover { color:var(--hotpink); }
.link-desc { font-size:clamp(7px,0.8vw,10px); color:var(--text-muted); }

/* ===== 미니룸 게임 ===== */
.miniroom-game {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1vw, 12px);
  padding: clamp(6px, 1vw, 12px);
  overflow: hidden;
  min-height: 0;
}
.mg-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 0.4vh, 6px);
  min-height: 0;
  overflow: hidden;
  padding-top: clamp(24px, 5vh, 60px);
}
.mg-room {
  position: relative;
  width: 70%;
  aspect-ratio: 1315 / 1197;
  flex-shrink: 0;
  border: 2px solid var(--cardborder);
  border-radius: 8px;
  overflow: hidden;
  background: #fce8f3;
  cursor: cell;
}
.mg-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: block;
}
.mg-hint {
  font-size: clamp(11px, 1.3vw, 17px);
  font-weight: bold;
  color: white;
  text-shadow: 0 0 1px var(--hotpink), 0 0 1px var(--hotpink);
  -webkit-text-stroke: 0.4px var(--hotpink);
  letter-spacing: 1px;
  text-align: center;
  flex-shrink: 0;
  animation: hintBlink 1.4s ease-in-out infinite;
}
@keyframes hintBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.mg-logo {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mg-logo img {
  width: 100%;
  max-height: clamp(70px, 13vh, 140px);
  object-fit: contain;
}
.mg-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(8px, 1.2vw, 16px);
  background: linear-gradient(160deg, #fff0f7 0%, #ffd6ec 60%, #ffb8df 100%);
  border: 1.5px solid var(--cardborder);
  border-radius: 10px;
  padding: clamp(10px, 1.2vw, 18px);
  align-self: center;
  overflow: hidden;
  margin-left: clamp(-60px, -6vw, -20px);
}
.mg-info-photo-wrap { flex-shrink: 0; }
.mg-info-photo {
  width: clamp(50px, 6vw, 80px);
  height: clamp(50px, 6vw, 80px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--cardborder);
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mg-info-photo-placeholder { font-size: 18px; color: var(--pink-mid); }
.mg-info-text {
  font-size: clamp(10px, 1.1vw, 14px);
  color: #7a2040;
  line-height: 1.9;
  word-break: keep-all;
  flex: 1;
  min-width: 0;
  width: 100%;
  text-align: justify;
}
.mg-zone {
  position: absolute;
  cursor: cell;
  border-radius: 4px;
  border: none;
  transition: background 0.12s, filter 0.12s;
  z-index: 2;
}
.mg-zone:hover { background: rgba(255,255,255,0.18); filter: brightness(1.12) saturate(1.2); }
.mg-zone.mg-selected { background: rgba(255,200,230,0.22); filter: brightness(1.18) saturate(1.3); }
.mg-zone.mg-flash { background: rgba(255,255,255,0.45); filter: brightness(1.35) saturate(1.5); }
.mg-zone-label { display: none; }
/* 미니룸 활성시 site-frame overflow 해제 */
.site-frame.miniroom-active {
  overflow: visible;
}

/* ===== 미니룸 페이지 오버라이드 ===== */
#page-miniroom.active {
  position: absolute;
  top: clamp(54px, 9vh, 80px);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  z-index: 5;
}


/* ===== 쥬크박스 ===== */
.jukebox-game {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 16px);
  padding: clamp(6px, 1vw, 12px);
  overflow: hidden;
  min-height: 0;
}
.jb-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: fit-content;
  min-height: 0;
  background: #ffb8d8;
  border-radius: 18px;
  border: 4px solid #c85888;
  box-shadow: inset 0 0 0 2px #ffd8ec, inset 0 0 0 5px #e87aaa, 0 6px 20px rgba(200,80,140,0.2);
  padding: clamp(8px, 1vw, 14px);
  position: relative;
}
.jb-left .yt-wrap {
  width: 100%;
  height: 100%;
  padding-bottom: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  flex-shrink: 0;
  position: relative;
}
.jb-left .yt-wrap iframe,
.jb-left .yt-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}
.jb-right {
  position: relative;
  border-radius: 10px;
  overflow: visible;
  flex-shrink: 0;
  /* 이미지 비율 725:1163 유지, 높이 기준 */
  height: min(80%, 52vh);
  width: auto;
  aspect-ratio: 725 / 1163;
}
.jb-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.jb-overlay {
  position: absolute;
  z-index: 2;
  top: 13%;
  left: 7%;
  right: 7%;
  bottom: 56%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1% 3%;
}
/* 레트로 게임 메뉴 */
.jb-menu {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.jb-menu-title {
  font-family: 'DotGothic16', sans-serif;
  font-size: clamp(10px, 1.2vw, 16px);
  color: #7a2040;
  text-align: center;
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(200,80,140,0.4);
  border-radius: 6px;
  padding: clamp(4px, 0.5vh, 8px) 0;
  letter-spacing: 1px;
  margin-bottom: clamp(2px, 0.4vh, 6px);
}
.jb-playlist {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.5vh, 6px);
  width: 100%;
}
.jb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(2px, 0.4vh, 5px) clamp(4px, 0.6vw, 8px);
  background: transparent;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: background 0.12s;
  flex: 1;
}
.jb-item:hover {
  background: rgba(255,255,255,0.5);
}
.jb-item.active-track {
  background: rgba(255,255,255,0.75);
}
.jb-title {
  font-family: 'DotGothic16', sans-serif;
  font-size: clamp(8px, 1vw, 13px);
  color: #7a1030;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jb-arrow {
  font-size: clamp(10px, 1.2vw, 15px);
  color: #c04878;
  flex-shrink: 0;
}

/* ===== Q&A 말풍선 ===== */
.qna-chat {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vh, 18px);
  padding: clamp(6px, 1vw, 12px);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.qna-item {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 8px);
  background: transparent;
}
/* 질문: 오른쪽 흰색 말풍선 */
.qna-q-bubble {
  align-self: flex-end;
  background: white;
  border: 1.5px solid var(--cardborder);
  border-radius: 18px 18px 4px 18px;
  padding: clamp(6px, 0.8vh, 10px) clamp(10px, 1.2vw, 16px);
  max-width: 60%;
  font-size: clamp(8px, 0.85vw, 11px);
  color: #5a1030;
  line-height: 1.6;
}
/* 답변: 왼쪽 핑크 말풍선 + 프로필 */
.qna-a-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(4px, 0.6vw, 8px);
}
.qna-avatar {
  width: clamp(24px, 3.5vw, 44px);
  height: clamp(24px, 3.5vw, 44px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cardborder);
  flex-shrink: 0;
}
.qna-a-bubble {
  background: var(--theme-label-bg, #fdd0e8);
  border: 1.5px solid var(--cardborder);
  border-radius: 18px 18px 18px 4px;
  padding: clamp(8px, 1vh, 12px) clamp(12px, 1.4vw, 18px);
  max-width: 68%;
  font-size: clamp(8px, 0.85vw, 11px);
  color: #7a2040;
  line-height: 1.6;
}

/* ===== Q&A 2컬럼 레이아웃 ===== */
.qna-two-col {
  flex: 1;
  display: grid;
  grid-template-columns: 0.55fr 0.6fr;
  gap: clamp(6px, 1vw, 12px);
  padding: clamp(6px, 1vw, 12px);
  overflow: hidden;
  min-height: 0;
}
.qna-left {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 8px);
  min-height: 0;
  overflow: hidden;
}
.qna-pages {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1vh, 12px);
  min-height: 0;
  overflow: hidden;
}
.qna-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 14px);
  flex-shrink: 0;
}
.qna-arrow {
  background: white;
  border: 1.5px solid var(--cardborder);
  border-radius: 50%;
  width: clamp(20px, 2.5vw, 30px);
  height: clamp(20px, 2.5vw, 30px);
  color: var(--hotpink);
  font-size: clamp(12px, 1.4vw, 18px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.qna-arrow:hover { background: #fdd0e8; }
.qna-page-info {
  font-size: clamp(8px, 0.85vw, 11px);
  color: var(--hotpink);
  letter-spacing: 1px;
}
.qna-right {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding-top: clamp(6px, 1vh, 12px);
}
.qna-form-box {
  display: flex;
  flex-direction: column;
  width: 58%;
  height: auto;
  gap: clamp(4px, 0.6vh, 8px);
}
.qna-logo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  max-height: 25%;
}
.qna-form-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 8px);
  flex: 1;
  min-height: 0;
}
.qna-form-inner input {
  background: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(220,180,210,0.6);
  border-radius: 20px;
  padding: clamp(5px, 0.7vh, 9px) clamp(10px, 1.2vw, 16px);
  font-size: clamp(8px, 0.9vw, 12px);
  outline: none;
  color: #5a1030;
  width: 100%;
  box-sizing: border-box;
}
.qna-form-inner textarea {
  background: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(220,180,210,0.6);
  border-radius: 12px;
  padding: clamp(5px, 0.7vh, 9px) clamp(10px, 1.2vw, 16px);
  font-size: clamp(8px, 0.9vw, 12px);
  outline: none;
  color: #5a1030;
  resize: none;
  height: clamp(40px, 8vh, 80px);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.qna-form-inner button {
  background: linear-gradient(to bottom, #a8cc70, #8fba55);
  color: white;
  border: none;
  border-radius: 8px;
  padding: clamp(6px, 0.9vh, 12px);
  font-size: clamp(9px, 1vw, 13px);
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: clamp(10px, 2vw, 20px);
  padding-right: clamp(10px, 2vw, 20px);
  letter-spacing: 1px;
}
.qna-form-inner button:hover {
  background: linear-gradient(to bottom, #b8dc80, #9aca65);
}

/* ===== 비주얼 노벨 게임 DS 스타일 ===== */
.vn-game {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}
.vn-ds-wrap {
  position: relative;
  width: clamp(220px, 30vw, 390px);
  flex-shrink: 0;
}
.vn-mute-btn {
  position: absolute;
  bottom: -2px;
  right: -30px;
  background: rgba(255,220,235,0.9);
  border: 1.5px solid #e8a8cc;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.12s;
  overflow: hidden;
}
.vn-mute-btn:hover { background: #fdd0e8; }
.vn-mute-btn.muted::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 110%;
  height: 2.5px;
  background: red;
  border-radius: 2px;
  pointer-events: none;
}
.vn-ds-frame {
  width: 100%;
  display: block;
  position: relative;
  z-index: 10;
  pointer-events: none;
}
/* 위 화면: 픽셀 분석 좌표 */
.vn-top {
  position: absolute;
  top: 5.3%;
  left: 15.2%;
  width: 69.6%;
  height: 40.0%;
  overflow: hidden;
  z-index: 1;
  border-radius: 3px;
}
.vn-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.vn-char {
  position: absolute;
  bottom: 28%;
  left: 50%;
  transform: translateX(-50%);
  height: 80%;
  width: auto;
  object-fit: contain;
  z-index: 2;
}
.vn-dialog {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  background: rgba(255,255,255,0.93);
  border-top: 1.5px solid #e8d0a0;
  padding: clamp(3px, 0.5vw, 7px) clamp(5px, 0.8vw, 10px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vn-name {
  font-size: clamp(7px, 0.8vw, 11px);
  font-weight: bold;
  color: #a07020;
  background: #fff8e0;
  border: 1px solid #e8d090;
  border-radius: 5px;
  padding: 1px 6px;
  display: inline-block;
  align-self: flex-start;
}
.vn-text {
  font-size: clamp(7px, 0.85vw, 11px);
  color: #3a2010;
  line-height: 1.7;
  flex: 1;
  overflow: hidden;
  word-break: keep-all;
}
.vn-next {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 9px;
  color: #a07020;
  animation: vnBlink 1s infinite;
}
@keyframes vnBlink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.vn-click-area {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  z-index: 4;
  cursor: pointer;
}
/* 아래 화면: 픽셀 분석 좌표 */
.vn-bottom {
  position: absolute;
  top: 55.9%;
  left: 15.2%;
  width: 69.6%;
  height: 38.3%;
  overflow: hidden;
  z-index: 1;
  border-radius: 3px;
}
.vn-bottom-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* 선택지 */
.vn-choices {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.4vh, 5px);
  width: 85%;
  z-index: 5;
}
.vn-choice-btn {
  background: rgba(255,248,220,0.95);
  border: 1.5px solid #e8c060;
  border-radius: 12px;
  padding: clamp(3px, 0.5vh, 6px) clamp(6px, 1vw, 10px);
  font-size: clamp(7px, 0.8vw, 10px);
  color: #6a4010;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  font-family: inherit;
}
.vn-choice-btn:hover {
  background: #fff0a0;
  border-color: #c8a030;
}

/* 미니룸 가운데 캐릭터 팝업 */
.mg-char-popup {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 85%;
  width: auto;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
  animation: mgCharFadeIn 0.3s ease;
}
@keyframes mgCharFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 쥬크박스 탭 ===== */
.jb-tabs {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.jb-tab {
  padding: clamp(3px,0.5vh,6px) clamp(8px,1vw,14px);
  font-size: clamp(8px,0.9vw,11px);
  border: 1.5px solid rgba(255,255,255,0.6);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: rgba(255,255,255,0.3);
  color: white;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.jb-tab.active {
  background: rgba(255,255,255,0.85);
  color: #c04878;
  border-color: rgba(255,255,255,0.8);
}
.jb-panel {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 0 8px 8px 8px;
  overflow: hidden;
}
/* 앨범 탭 내부 */
.jb-album-wrap {
  display: flex;
  gap: clamp(6px,1vw,12px);
  padding: clamp(6px,1vw,12px);
  height: 100%;
  box-sizing: border-box;
  background: rgba(255,248,252,0.8);
}
.jb-album-list {
  display: flex;
  flex-direction: column;
  gap: clamp(4px,0.6vh,8px);
  flex-shrink: 0;
  width: clamp(50px,7vw,90px);
}
.jb-album-item {
  background: rgba(255,255,255,0.6);
  border: 1.5px solid var(--cardborder);
  border-radius: 8px;
  padding: clamp(4px,0.5vw,7px);
  text-align: center;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.jb-album-item:hover { background: #fdd0e8; }
.jb-album-item.active-album {
  background: rgba(255,180,220,0.9);
  border-color: #e8609a;
}
.jb-album-item.locked { opacity: 0.5; cursor: default; }
.jb-album-cover {
  font-size: clamp(16px,2.2vw,30px);
  line-height: 1;
  margin-bottom: 3px;
}
.jb-album-cover img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.jb-album-label {
  font-size: clamp(6px,0.7vw,9px);
  color: #7a1040;
  font-weight: bold;
  line-height: 1.3;
}
.jb-album-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 12px);
  min-width: 0;
  overflow-y: auto;
}
.jb-album-title {
  font-size: clamp(12px, 1.5vw, 20px);
  font-weight: bold;
  color: #7a1040;
}
.jb-album-detail {
  font-size: clamp(10px, 1.1vw, 14px);
  color: #a05070;
  line-height: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.8vh, 12px);
}

/* 스트리밍 버튼 */
.jb-stream-btns {
  display: flex;
  gap: clamp(6px, 0.8vw, 12px);
  flex-wrap: wrap;
}
.jb-stream-btn {
  padding: clamp(5px, 0.6vh, 8px) clamp(12px, 1.4vw, 18px);
  border-radius: 20px;
  font-size: clamp(9px, 1vw, 13px);
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.jb-stream-btn::after {
  content: '↗';
  font-size: 0.85em;
  opacity: 0.85;
}
.jb-stream-btn:hover { opacity: 0.8; }
.jb-stream-btn.melon { background: #00cd3c; color: white; }
.jb-stream-btn.bugs  { background: #ff3c3c; color: white; }
.jb-stream-btn.genie { background: #0064ff; color: white; }
/* 트랙리스트 */
.jb-tracklist {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.5vh, 8px);
}
.jb-track {
  font-size: clamp(11px, 1.2vw, 15px);
  color: #7a1040;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.jb-genre {
  font-size: clamp(8px, 0.85vw, 11px);
  color: #c06080;
}

/* 아이팟 스타일 장식 */
.jb-speaker-dots {
  display: flex;
  justify-content: space-between;
  width: 100%;
  flex-shrink: 0;
  margin-bottom: clamp(3px, 0.4vh, 6px);
}
.jb-dots-group {
  display: flex;
  gap: clamp(3px, 0.4vw, 5px);
  align-items: center;
}
.jb-dot {
  width: clamp(4px, 0.5vw, 6px);
  height: clamp(4px, 0.5vw, 6px);
  border-radius: 50%;
  background: #c85888;
  opacity: 0.6;
  display: inline-block;
}
.jb-deco-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, #c85888, transparent);
  border-radius: 2px;
  margin-top: clamp(4px, 0.6vh, 8px);
  flex-shrink: 0;
}

/* 앨범 정보 새 디자인 */
.jb-info-header {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 12px);
  padding-bottom: clamp(4px, 0.5vh, 8px);
  border-bottom: 1px solid rgba(200,80,140,0.2);
}
.jb-info-date {
  font-size: clamp(9px, 1vw, 13px);
  color: #a05070;
}
.jb-info-badge {
  font-size: clamp(8px, 0.85vw, 11px);
  background: rgba(232,96,154,0.15);
  color: #c04878;
  border: 1px solid rgba(232,96,154,0.3);
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: bold;
}
.jb-info-tags {
  display: flex;
  gap: clamp(4px, 0.5vw, 8px);
  flex-wrap: wrap;
}
.jb-tag {
  font-size: clamp(8px, 0.85vw, 11px);
  background: rgba(255,255,255,0.7);
  color: #7a1040;
  border: 1px solid rgba(200,80,140,0.25);
  border-radius: 20px;
  padding: 2px 10px;
}
.jb-tracklist {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 8px);
  flex: 1;
  justify-content: center;
}
.jb-track-row {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 10px);
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  padding: clamp(5px, 0.7vh, 9px) clamp(8px, 1vw, 12px);
  border: 1px solid rgba(200,80,140,0.15);
}
.jb-track-num {
  font-size: clamp(9px, 1vw, 13px);
  color: #e8609a;
  font-weight: bold;
  min-width: clamp(16px, 2vw, 24px);
}
.jb-track-name {
  font-size: clamp(10px, 1.1vw, 14px);
  color: #7a1040;
  font-weight: bold;
  flex: 1;
}
.jb-track-badges {
  display: flex;
  gap: 4px;
}
.jb-track-badge {
  font-size: clamp(7px, 0.75vw, 10px);
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: bold;
}
.jb-track-badge.title {
  background: #e8609a;
  color: white;
}
.jb-track-badge.genre {
  background: rgba(255,255,255,0.8);
  color: #c06080;
  border: 1px solid rgba(200,80,140,0.2);
}

/* 별 구분선 */
.jb-star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 0.8vw, 12px);
  color: #e8a8cc;
  font-size: clamp(8px, 0.9vw, 12px);
  opacity: 0.7;
  flex-shrink: 0;
}

/* 큐앤에이 폼 부제목 */
.qna-form-subtitle {
  font-size: clamp(10px, 1.1vw, 14px);
  color: #c04878;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.12em;
  margin-top: 6px;
  padding: clamp(5px, 0.6vh, 8px) clamp(10px, 1.5vw, 18px);
  background: rgba(255, 200, 220, 0.25);
  border: 1.5px dashed #e890b0;
  border-radius: 20px;
  animation: subtitleBlink 1.8s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(192, 72, 120, 0.4);
}
@keyframes subtitleBlink {
  0%, 100% { opacity: 1; color: #c04878; text-shadow: 0 0 6px rgba(192,72,120,0.4); }
  50% { opacity: 0.45; color: #e8709a; text-shadow: 0 0 12px rgba(232,112,154,0.7); }
}


/* ===== 프로필 게임 UI ===== */
.pf-game {
  display: flex;
  flex-direction: column;
  width: 72%;
  height: 100%;
  overflow: hidden;
  background: #e8a8c8;
  font-family: 'Apple SD Gothic Neo','Noto Sans KR',sans-serif;
  margin: 0 auto;
}

/* 파란 헤더 */
.pf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(8px,1.2vw,16px);
  height: clamp(24px,3.5vh,36px);
  background: linear-gradient(90deg,#5898e0 0%,#78b8f0 30%,#a8d8ff 50%,#78b8f0 70%,#5898e0 100%);
  border-bottom: 2px solid #2860a8;
  border-top: 1px solid #a8d8ff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.pf-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%);
  pointer-events: none;
}
.pf-header-left, .pf-header-right {
  display:flex; align-items:center;
}
.pf-header-deco {
  font-size: clamp(11px,1.4vw,17px);
  color: #fff;
  text-shadow: 0 0 6px #ffeeaa, 1px 1px 0 #2060b0;
  letter-spacing: 3px;
  animation: pfDeco 2s ease-in-out infinite alternate;
}
@keyframes pfDeco {
  from { opacity:0.7; text-shadow: 0 0 4px #ffeeaa; }
  to   { opacity:1;   text-shadow: 0 0 10px #fffcaa, 0 0 20px #ffd700; }
}
.pf-header-badge {
  background: linear-gradient(180deg,#ffb0d0,#ff70a8);
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 2px clamp(10px,1.5vw,20px);
  font-size: clamp(9px,1.2vw,14px);
  font-weight:700; color:#fff;
  text-shadow: 1px 1px 0 #b03870;
  box-shadow: 0 0 8px rgba(255,100,160,0.6), 0 2px 0 #c05080;
  animation: pfBadgePulse 2.5s ease-in-out infinite;
}
@keyframes pfBadgePulse {
  0%,100% { box-shadow: 0 0 6px rgba(255,100,160,0.5), 0 2px 0 #c05080; }
  50%      { box-shadow: 0 0 16px rgba(255,100,160,0.9), 0 2px 0 #c05080; }
}

/* 메인 영역 */
.pf-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 35% 40%, #fff0f8 0%, #fcd8ee 35%, #f0a8d0 70%, #e890c0 100%);
}
/* 반짝이 별 */
.pf-main::before {
  content: '✨ ★ ✦ ♪ 🌟 ♫ ✦ ★ ✨ ♪ 🌟 ✦';
  position: absolute;
  top: 8%;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(7px,0.9vw,11px);
  color: rgba(255,255,255,0.5);
  letter-spacing: clamp(4px,0.8vw,12px);
  z-index: 1;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(255,200,230,0.8);
  animation: pfStars 3s ease-in-out infinite alternate;
}
.pf-main::after {
  content: '♫ 🌟 ✦ ★ ✨ ♪ ✦ 🌟 ★ ✦ ♫';
  position: absolute;
  bottom: 30%;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(6px,0.8vw,10px);
  color: rgba(255,255,255,0.4);
  letter-spacing: clamp(6px,1vw,14px);
  z-index: 1;
  pointer-events: none;
  animation: pfStars 3s ease-in-out infinite alternate-reverse;
}
@keyframes pfStars {
  from { opacity:0.3; }
  to   { opacity:0.8; }
}

/* 인물 사진 배경 — 사진처럼 가운데 약간 왼쪽 */
.pf-bg-char {
  position: absolute;
  left: 42%;
  top: -5%;
  transform: translateX(-50%);
  height: 115%;
  width: auto;
  object-fit: contain;
  object-position: top center;
  z-index: 0;
}

/* 왼쪽 MENU — 사진처럼 크게 */
.pf-left-overlay {
  position: absolute;
  top: clamp(8px,1.5vh,20px);
  left: clamp(6px,0.8vw,12px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: clamp(4px,0.6vh,9px);
  width: clamp(110px,17vw,170px);
}
.pf-menu-label {
  font-size: clamp(14px,2.2vw,28px);
  font-weight:900; color:#fff; font-style:italic;
  letter-spacing:4px;
  text-shadow: 2px 2px 0 #6030a0, 0 0 10px rgba(255,200,255,0.8);
  text-align:left;
  margin-bottom: 3px;
  animation: pfMenuGlow 2s ease-in-out infinite alternate;
}
@keyframes pfMenuGlow {
  from { text-shadow: 2px 2px 0 #6030a0, 0 0 6px rgba(255,180,255,0.5); }
  to   { text-shadow: 2px 2px 0 #6030a0, 0 0 16px rgba(255,220,255,1), 0 0 30px rgba(255,150,255,0.5); }
}
.pf-menu-btn {
  width:100%;
  padding: clamp(6px,1vh,13px) 8px;
  background: linear-gradient(180deg,#ff80b0,#e04878);
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: clamp(10px,1.2vw,15px);
  color:#fff; font-weight:700;
  text-shadow: 1px 1px 0 #901838;
  cursor:pointer; text-align:center;
  box-shadow: 0 3px 0 #a02848, 0 0 8px rgba(255,100,150,0.4);
  transition: all 0.1s;
  line-height:1.4;
  animation: pfBtnGlow 2s ease-in-out infinite alternate;
}
@keyframes pfBtnGlow {
  from { box-shadow: 0 3px 0 #a02848, 0 0 4px rgba(255,100,150,0.3); }
  to   { box-shadow: 0 3px 0 #a02848, 0 0 14px rgba(255,150,180,0.7); }
}
.pf-menu-btn:hover { filter:brightness(1.12); }
.pf-menu-btn.active {
  background: linear-gradient(180deg,#fff8fc,#ffd6ec);
  color:#c04878; text-shadow:none;
  box-shadow: 0 1px 0 #e090b8;
  transform: translateY(2px);
}

/* 오른쪽 상태창 — 사진처럼 위에서 아래까지 꽉 차게 */
.pf-right-overlay {
  position: absolute;
  top: clamp(8px,1.5vh,18px);
  right: clamp(8px,1.2vw,16px);
  width: clamp(170px,36%,340px);
  bottom: clamp(8px,1.5vh,18px);
  z-index: 10;
  background: rgba(240,175,200,0.88);
  border: 2px solid rgba(210,130,160,0.9);
  border-radius: 12px;
  padding: clamp(8px,1.2vh,16px) clamp(8px,1.1vw,14px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pf-panel { display:none; flex-direction:column; gap:clamp(4px,0.7vh,10px); height:100%; }
.pf-panel.active { display:flex; }

.pf-status-title {
  font-size: clamp(9px,1.2vw,15px);
  font-weight:700; color:#c01840;
  text-align:center; letter-spacing:1px;
  flex-shrink:0;
  padding-bottom: clamp(4px,0.5vh,7px);
  border-bottom: 1px solid rgba(200,100,130,0.4);
  animation: pfTitleGlow 2s ease-in-out infinite alternate;
}
@keyframes pfTitleGlow {
  from { text-shadow: 0 0 4px rgba(255,100,130,0.4); }
  to   { text-shadow: 0 0 10px rgba(255,100,130,0.9), 0 0 20px rgba(255,50,100,0.4); }
}
.pf-status-info {
  display:flex; justify-content:space-between;
  font-size: clamp(7px,0.9vw,11px); color:#7a1830;
  flex-shrink:0;
}

.pf-stat-rows { display:flex; flex-direction:column; gap:clamp(4px,0.7vh,10px); flex-shrink:0; }
.pf-stat-row { display:flex; align-items:center; gap:clamp(4px,0.6vw,8px); }
.pf-stat-row .pf-bar-bg { flex: none; width: 30%; }
.pf-stat-label {
  font-size:clamp(9px,1.1vw,14px); font-weight:700; color:#5a1030;
  width:clamp(26px,3.2vw,40px); flex-shrink:0;
}
.pf-stat-lv {
  font-size:clamp(13px,1.8vw,24px); font-weight:900;
  color:#2040c0; font-style:italic;
  text-shadow: 1px 1px 0 #90a8e0, 0 0 8px rgba(100,150,255,0.5);
  width:clamp(52px,6.5vw,80px); flex-shrink:0;
}
.pf-bar-bg {
  flex: 1;
  height:clamp(9px,1.4vh,18px);
  background: linear-gradient(180deg,#d8c8b8,#c0b0a0);
  border: 1.5px solid #b09880;
  border-radius: 3px; overflow:hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}
.pf-bar-fill { height:100%; border-radius:2px; }

.pf-gauge-rows { display:flex; flex-direction:column; gap:clamp(4px,0.7vh,10px); flex-shrink:0; }
.pf-gauge-row { display:flex; align-items:center; gap:clamp(4px,0.6vw,8px); }
.pf-gauge-label {
  font-size:clamp(9px,1.1vw,14px); font-weight:700; color:#5a1030;
  width:clamp(30px,3.8vw,48px); flex-shrink:0;
}
.pf-heart-row {
  display:flex; align-items:center; gap:clamp(4px,0.6vw,8px);
  flex-shrink:0; margin-top: clamp(2px,0.4vh,6px);
}
.pf-hearts { display:flex; gap:clamp(2px,0.4vw,6px); }
.pf-heart { font-size:clamp(12px,1.8vw,24px); }

/* 기타 패널 */
.pf-rows {
  display:flex; flex-direction:column;
  gap:clamp(4px,0.6vh,9px); overflow-y:auto; flex:1;
}
.pf-row {
  display:flex; align-items:center; gap:clamp(4px,0.6vw,8px);
  background:rgba(255,255,255,0.5);
  border:1px solid rgba(240,160,190,0.7);
  border-radius:5px;
  padding:clamp(3px,0.5vh,7px) clamp(6px,0.8vw,10px);
}
.pf-key {
  font-size:clamp(7px,0.85vw,10px); font-weight:700; color:#fff;
  background:linear-gradient(135deg,#ff80b0,#e04878);
  border-radius:3px; padding:2px clamp(4px,0.5vw,7px);
  white-space:nowrap; flex-shrink:0;
  min-width:clamp(36px,4.5vw,56px); text-align:center;
}
.pf-val { font-size:clamp(7px,0.85vw,11px); color:#7a1830; font-weight:500; }
.pf-text-box {
  flex:1; background:rgba(255,255,255,0.55);
  border:1px solid rgba(240,160,190,0.7);
  border-radius:6px; padding:clamp(6px,0.9vh,12px);
  font-size:clamp(8px,0.9vw,11px); color:#7a1830;
  line-height:1.8; overflow-y:auto;
}
.pf-gallery-grid {
  display:grid; grid-template-columns:repeat(3,1fr);
  gap:clamp(4px,0.6vw,8px); flex:1; overflow-y:auto;
}
.pf-gallery-item {
  background:rgba(255,255,255,0.55);
  border:1.5px solid rgba(240,160,190,0.7);
  border-radius:6px; aspect-ratio:1;
  display:flex; align-items:center; justify-content:center;
  font-size:clamp(14px,2.2vw,28px); cursor:pointer;
  transition:transform 0.15s;
}
.pf-gallery-item:hover { transform:scale(1.05); }

/* 하단 대화창 */
.pf-bottom {
  display: flex;
  align-items: flex-end;
  gap: clamp(8px,1.2vw,18px);
  padding: 0 clamp(12px,1.8vw,24px) 0 0;
  background: linear-gradient(180deg,#fce8f4,#f0b8d8);
  border-top: 3px solid #d070a8;
  flex-shrink: 0;
  height: 26%;
  overflow: hidden;
}
.pf-icon-char {
  height: 130%;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 0;
  position: relative;
  bottom: 0;
}
.pf-speech-wrap { flex:1; display:flex; flex-direction:column; gap:clamp(3px,0.5vh,6px); justify-content:center; height:100%; padding: clamp(8px,1.2vh,16px) 0; }
.pf-name-bar {
  display:inline-block;
  background: linear-gradient(90deg,#5888d0,#3868b8);
  color:#fff; font-weight:700;
  font-size:clamp(10px,1.3vw,17px);
  padding:3px clamp(10px,1.2vw,18px);
  border-radius:4px; width:fit-content;
  text-shadow:1px 1px 0 #1840a0;
}
.pf-speech {
  font-size:clamp(10px,1.2vw,16px);
  color:#5a1030; line-height:1.8;
  padding: 0;
  background: transparent;
}

/* ===== 프로필 떠다니는 꾸밈 요소 ===== */
.pf-deco-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.pf-deco-item {
  position: absolute;
  font-size: clamp(10px, 1.4vw, 18px);
  color: rgba(255, 180, 210, 0.85);
  text-shadow:
    0 0 6px rgba(255, 120, 180, 0.8),
    0 0 14px rgba(255, 200, 230, 0.5);
  animation: pfDecoFloat 3s ease-in-out infinite alternate;
  user-select: none;
}
.pf-deco-big {
  font-size: clamp(14px, 1.8vw, 24px) !important;
}
@keyframes pfDecoFloat {
  0%   { transform: translateY(0px) rotate(-5deg); opacity: 0.6; }
  50%  { transform: translateY(-6px) rotate(3deg); opacity: 1; }
  100% { transform: translateY(2px) rotate(-3deg); opacity: 0.7; }
}

/* 상태창 안에도 꾸밈 */
.pf-status-box-inner {
  position: relative;
}
.pf-status-box-inner::before {
  content: '✦ ♪ ✦ ♫ ✦ ♪ ✦';
  display: block;
  text-align: center;
  font-size: clamp(7px, 0.8vw, 10px);
  color: rgba(200, 80, 120, 0.5);
  letter-spacing: 3px;
  margin-bottom: clamp(3px, 0.4vh, 6px);
  animation: pfStars 2.5s ease-in-out infinite alternate;
}

/* 메뉴버튼 앞에 음표 */
.pf-menu-btn::before {
  content: '♪ ';
  font-size: 0.85em;
  opacity: 0.85;
}

/* 하단 대화창 배경 별 */
.pf-bottom {
  position: relative;
}
.pf-bottom::before {
  content: '★ ✦ ♫ ✦ ★ ✦ ♪ ✦ ★ ✦ ♫ ✦ ★';
  position: absolute;
  top: 5px;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(7px, 0.8vw, 10px);
  color: rgba(200, 80, 130, 0.35);
  letter-spacing: 4px;
  pointer-events: none;
  animation: pfStars 3s ease-in-out infinite alternate;
}

/* ===== 갤러리 뷰어 ===== */
.gl-dots {
  display: flex;
  justify-content: center;
  gap: clamp(8px,1.2vw,16px);
  margin: clamp(4px,0.6vh,8px) 0;
  flex-shrink: 0;
}
.gl-dot {
  width: clamp(32px,4.5vw,56px);
  height: clamp(32px,4.5vw,56px);
  border-radius: 50%;
  border: 2.5px solid #ffb6d9;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gl-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  transition: transform 0.2s;
}
.gl-dot.active {
  border-color: #e04878;
  box-shadow: 0 0 12px rgba(255,100,160,0.7);
}
.gl-dot.active img { transform: scale(1.08); }
.gl-dot:hover:not(.active) { border-color: #ff80b0; box-shadow: 0 0 6px rgba(255,150,180,0.4); }

.gl-outfit-label {
  text-align: center;
  font-size: clamp(8px,1vw,12px);
  font-weight: 700;
  color: #c04878;
  flex-shrink: 0;
  margin-bottom: clamp(2px,0.3vh,4px);
}

.gl-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  gap: clamp(4px,0.6vw,8px);
  overflow: hidden;
  min-height: 0;
}

.gl-photo-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,0.3);
}

.gl-photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}

.gl-arrow {
  flex-shrink: 0;
  width: clamp(22px,2.8vw,36px);
  height: clamp(22px,2.8vw,36px);
  border-radius: 50%;
  background: rgba(255,180,210,0.85);
  border: 2px solid #ffb6d9;
  color: #c04878;
  font-size: clamp(14px,1.8vw,22px);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.gl-arrow:hover { background: #ff80b0; color: #fff; }

.gl-counter {
  text-align: center;
  font-size: clamp(8px,0.9vw,11px);
  color: #e890b0;
  flex-shrink: 0;
  margin-top: clamp(2px,0.3vh,4px);
}

/* 갤러리 사진 클릭 커서 */
.gl-photo {
  cursor: zoom-in;
}
.gl-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 0 12px rgba(255,120,180,0.4);
}

/* ── 좋아하는 것 ── */
.pf-likes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px,1vh,12px);
  flex: 1;
}
.pf-like-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px,0.7vh,10px);
  background: rgba(255,255,255,0.6);
  border: 1.5px solid #ffb6d9;
  border-radius: 12px;
  padding: clamp(8px,1.2vh,16px) 4px;
}
.pf-like-icon {
  font-size: clamp(24px,3.5vw,48px);
  line-height: 1;
}
.pf-like-label {
  font-size: clamp(8px,1vw,13px);
  font-weight: 700;
  color: #c04878;
  text-align: center;
}

/* ── 자주듣는 음악 ── */
.pf-music-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px,1.2vh,16px);
  background: rgba(255,255,255,0.6);
  border: 1.5px solid #ffb6d9;
  border-radius: 12px;
  padding: clamp(10px,1.5vh,20px);
}
.pf-album-cover {
  width: clamp(60px,8vw,100px);
  height: clamp(60px,8vw,100px);
  background: linear-gradient(135deg,#ff80b0,#c04878);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px,4vw,48px);
  box-shadow: 0 4px 12px rgba(200,70,120,0.3);
  flex-shrink: 0;
}
.pf-music-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px,0.5vh,8px);
}
.pf-music-title {
  font-size: clamp(10px,1.3vw,17px);
  font-weight: 700;
  color: #7a1830;
  text-align: center;
}
.pf-music-artist {
  font-size: clamp(9px,1.1vw,14px);
  color: #c04878;
  text-align: center;
}

/* ── 최근 고민 ── */
.pf-worry-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px,1.2vh,16px);
}
.pf-worry-emoji {
  font-size: clamp(32px,5vw,64px);
  line-height: 1;
  animation: pfWorryBob 2s ease-in-out infinite alternate;
}
@keyframes pfWorryBob {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
.pf-worry-bubble {
  background: rgba(255,255,255,0.75);
  border: 2px solid #ffb6d9;
  border-radius: 16px;
  padding: clamp(10px,1.5vh,20px) clamp(12px,1.8vw,24px);
  font-size: clamp(9px,1.1vw,15px);
  font-weight: 500;
  color: #7a1830;
  text-align: center;
  line-height: 1.7;
  position: relative;
  width: 90%;
}
.pf-worry-bubble::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: #ffb6d9;
}
.pf-worry-bubble::after {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(255,255,255,0.75);
}

/* ── 한마디 ── */
.pf-word-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px,1vh,12px);
}
.pf-word-char {
  font-size: clamp(36px,5.5vw,70px);
  line-height: 1;
  animation: pfWordPulse 2.5s ease-in-out infinite alternate;
}
@keyframes pfWordPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}
.pf-word-bubble {
  background: linear-gradient(135deg,rgba(255,240,248,0.9),rgba(255,214,236,0.9));
  border: 2px solid #ff80b0;
  border-radius: 20px;
  padding: clamp(12px,1.8vh,24px) clamp(14px,2vw,28px);
  font-size: clamp(10px,1.3vw,17px);
  font-weight: 700;
  color: #7a1830;
  text-align: center;
  line-height: 1.8;
  width: 92%;
  position: relative;
  box-shadow: 0 0 12px rgba(255,100,160,0.2);
}
.pf-word-bubble::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: #ff80b0;
}
.pf-word-bubble::after {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: rgba(255,240,248,0.9);
}

/* ── 좋아하는 것 리본 태그 ── */
.pf-likes-ribbon {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: clamp(6px,1vh,12px);
}
.pf-ribbon-row {
  display: flex;
  align-items: center;
  gap: clamp(6px,0.9vw,12px);
  background: rgba(255,255,255,0.5);
  border: 1px solid #ffd6ec;
  border-radius: 10px;
  padding: clamp(6px,0.9vh,12px) clamp(8px,1vw,14px);
}
.pf-ribbon-ico {
  font-size: clamp(18px,2.4vw,32px);
  flex-shrink: 0;
  line-height: 1;
}
.pf-ribbon-tag {
  background: linear-gradient(90deg,#ff80b0,#e04878);
  color: #fff;
  font-size: clamp(9px,1.1vw,14px);
  font-weight: 700;
  padding: clamp(3px,0.4vh,6px) clamp(8px,1vw,16px);
  border-radius: 999px;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(160,30,70,0.4);
  box-shadow: 0 2px 6px rgba(224,72,120,0.3);
}
.pf-ribbon-star {
  color: #ffb6d9;
  font-size: clamp(8px,0.9vw,12px);
  letter-spacing: 2px;
  animation: pfStars 2s ease-in-out infinite alternate;
  margin-left: auto;
}

/* ===== 언어 선택 버튼 ===== */
.lang-bar {
  position: fixed;
  top: 8px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,180,220,0.85);
  border-radius: 999px;
  padding: 4px 12px;
  backdrop-filter: blur(4px);
}
.lang-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: #7a1030;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
}
.lang-btn:hover { background: rgba(255,255,255,0.4); }
.lang-btn.active { color: #c04878; text-decoration: underline; }
.lang-sep { color: rgba(180,60,100,0.5); font-size: 10px; user-select: none; }
