/* cyworld-demo 전체 스타일 — 스킨은 CSS 변수(--page-bg 등)로만 표현 (레트로 미니홈피 프레임) */

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

:root {
  --page-bg: linear-gradient(180deg, #aee1f9, #d8f0fb);
  --frame-bg: #ffffff;
  --accent: #3d9be9;
  --panel-bg: #eef7fd;
  --text: #333;
  --line: rgba(0, 0, 0, .12);
}

body {
  font-family: "돋움", Dotum, "맑은 고딕", "Malgun Gothic", sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
}

a { color: inherit; }
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  background: var(--accent);
  color: #fff;
}
button:hover { filter: brightness(1.08); }
input[type="text"], input[type="password"], textarea, select {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  color: #333;
}

.flash {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  animation: flash-fade 4s forwards;
}
@keyframes flash-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* ---------- 미니홈피 고정 프레임 ---------- */
.hompy-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 12px;
}

.mini-frame {
  width: 960px;
  max-width: 100%;
  background: var(--frame-bg);
  border: 2px solid rgba(0, 0, 0, .25);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  overflow: hidden;
  color: var(--text);
}

.frame-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-bg);
}
.counter { font-size: 12px; }
.counter strong { color: #e2564b; }
.frame-title {
  flex: 1;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.frame-links { display: flex; gap: 10px; font-size: 12px; white-space: nowrap; }
.frame-links a { text-decoration: none; }
.frame-links a:hover { text-decoration: underline; }

.frame-body { display: flex; min-height: 520px; }

/* ---------- 좌측 사이드바 ---------- */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel-bg);
}

.panel {
  background: var(--frame-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.panel-title { font-weight: bold; margin-bottom: 8px; }

.profile-panel .mood { font-size: 12px; margin-bottom: 6px; }
.mood-icon { font-size: 16px; }
.profile-panel .nickname { font-weight: bold; }
.profile-panel small { font-weight: normal; color: #888; }

/* 미니룸 — 벽/바닥 그라디언트 + 미니미 */
.miniroom {
  position: relative;
  height: 190px;
  overflow: hidden;
  padding: 0;
  --wall: linear-gradient(180deg, #fdf6e3, #f5e8c8);
  --floor: linear-gradient(180deg, #d9a066, #b97a3c);
}
.miniroom-wall { position: absolute; inset: 0 0 32%; background: var(--wall); }
.miniroom-floor {
  position: absolute; inset: 68% 0 0;
  background: var(--floor);
  border-top: 2px solid rgba(0, 0, 0, .12);
}
.minimi {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  width: 76px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2));
  z-index: 2;
  image-rendering: pixelated; /* 저해상 PNG 도트 확대 시 선명하게 (SVG에는 영향 없음) */
}

/* 미니룸 소품 — 좌표는 방 기준 %, 크기는 방 폭 대비 % */
.furniture-item {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15));
}
.furniture-item.draggable { cursor: grab; touch-action: none; }
.furniture-item.draggable:active { cursor: grabbing; z-index: 3; }

.layout-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.layout-toolbar form { display: inline-flex; }
.miniroom-label {
  position: absolute;
  top: 6px; left: 8px;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(0, 0, 0, .35);
  text-transform: uppercase;
}

.ilchon-list { list-style: none; }
.ilchon-list li { padding: 3px 0; }
.ilchon-list a { text-decoration: none; display: flex; gap: 6px; align-items: baseline; }
.ilchon-list a:hover .ilchon-name { text-decoration: underline; }
.ilchon-name { font-weight: bold; color: var(--accent); }
.ilchon-list small { color: #999; }

.ilchon-form { display: flex; gap: 4px; margin-top: 8px; }
.ilchon-form input { flex: 1; min-width: 0; }

/* ---------- 우측 콘텐츠 ---------- */
.content-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.tab-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: var(--panel-bg);
  text-decoration: none;
  font-size: 12px;
}
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: bold;
}
.tab-right { margin-left: auto; display: flex; gap: 4px; }
.tab-btn.manage { background: var(--frame-bg); }

.tab-content { padding: 16px; overflow-y: auto; }

.greeting-box, .pyeong-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  background: var(--frame-bg);
}
.greeting-text { line-height: 1.6; }

.pyeong-list { list-style: none; }
.pyeong-list li {
  padding: 6px 2px;
  border-bottom: 1px dashed var(--line);
  line-height: 1.5;
}
.pyeong-list li:last-child { border-bottom: none; }
.pyeong-list small { color: #999; }
.pyeong-content { font-weight: bold; }

.inline-form { display: inline-flex; gap: 4px; margin: 4px 0; }
.inline-form input[type="text"] { width: 180px; }

.write-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.write-form textarea { resize: vertical; }
.write-form button { align-self: flex-end; }
.secret-label { font-size: 12px; color: #666; }

.post-list { list-style: none; }
.post-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--frame-bg);
}
.post-item.secret { background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(0,0,0,.02) 12px 24px); }
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #999;
  margin-bottom: 6px;
}
.post-content { line-height: 1.6; word-break: break-word; }
.btn-del { background: #c0574f; padding: 2px 8px; font-size: 11px; }

.empty-note { color: #999; padding: 8px 2px; }

/* ---------- 일반 페이지 (메인/상점/꾸미기) ---------- */
.page { padding: 30px 12px; display: flex; justify-content: center; align-items: flex-start; }

.page-box {
  width: 860px;
  max-width: 100%;
  background: var(--frame-bg);
  border: 2px solid rgba(0, 0, 0, .25);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  padding: 24px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 20px; }
.page-head a { margin-left: 10px; font-size: 12px; }
.acorn-balance { color: #8a5a2e; }

.page-box h2 {
  font-size: 14px;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.profile-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.profile-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #666; }
.profile-form button { align-self: flex-start; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.item-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.item-card.applied { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.item-preview { width: 100%; height: 80px; object-fit: contain; image-rendering: pixelated; }
.item-preview.swatch { border-radius: 8px; border: 1px solid var(--line); }
.item-name { font-weight: bold; }
.item-price { font-size: 12px; color: #8a5a2e; }
.badge {
  font-size: 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 2px 10px;
}
.badge.owned { background: #7cab6c; }

/* ---------- 메인 포털 (헤더·섹션) ---------- */
html { scroll-behavior: smooth; }

.page.portal {
  flex-direction: column;
  align-items: center;
  padding: 0 0 40px;
  /* 배경 사진: Pexels #3958020 (Pexels License — 상업 사용 가능, 출처 표기 불요)
     파스텔 오버레이로 톤을 맞추고 카드 가독성을 확보한다 */
  background:
    linear-gradient(180deg, rgba(174, 225, 249, .72), rgba(233, 246, 252, .9)),
    url('../img/main_bg.jpg') center top / cover no-repeat fixed;
}

.site-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-logo {
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 1px;
  text-decoration: none;
}
.site-logo span { color: #f47b20; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
}
.site-nav a:hover { background: var(--panel-bg); color: var(--accent); }
.site-nav a.nav-my { background: var(--accent); color: #fff; }
.site-nav a.nav-my:hover { filter: brightness(1.08); }

.portal-body {
  width: 860px;
  max-width: 100%;
  padding: 26px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.portal-section {
  background: var(--frame-bg);
  border: 2px solid rgba(0, 0, 0, .18);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  padding: 24px;
  scroll-margin-top: 70px;
}
.portal-section h2 { font-size: 17px; margin-bottom: 12px; }
.section-lead { color: #666; margin-bottom: 16px; line-height: 1.6; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.feature-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-bg);
}
.feature-icon { font-size: 26px; margin-bottom: 6px; }
.feature-card h3 { font-size: 13px; margin-bottom: 6px; }
.feature-card p { font-size: 12px; color: #666; line-height: 1.6; }

.howto-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.howto-steps li { line-height: 1.7; }

.news-columns { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.news-col { flex: 2; min-width: 280px; }

.trend-box {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff7f2;
}
.trend-head { font-weight: bold; margin-bottom: 10px; }
.trend-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.trend-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.5;
}
.trend-list a:hover { text-decoration: underline; color: #f47b20; }
.trend-rank {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-weight: bold;
  color: #f47b20;
  font-size: 11px;
}
.trend-source { margin-top: 10px; font-size: 10px; color: #b09a8c; line-height: 1.5; }

.news-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.news-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.news-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.news-head small { color: #999; }
.news-list p { line-height: 1.6; color: #555; }

.newbie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.newbie-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  background: var(--frame-bg);
  color: var(--text);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.newbie-card:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); filter: none; }
.newbie-card img { width: 56px; height: 56px; object-fit: contain; image-rendering: pixelated; }
.newbie-card small { color: #999; font-size: 11px; }
.newbie-greeting {
  font-size: 11px;
  color: #777;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  text-align: center;
  color: #999;
  font-size: 12px;
  padding: 10px 0 0;
}

@media (max-width: 600px) {
  .site-header { flex-direction: column; gap: 8px; }
}

/* ---------- 메인 페이지 ---------- */
.main-box { text-align: center; }
.main-logo { font-size: 40px; letter-spacing: 2px; margin: 10px 0 6px; }
.main-logo span { color: #f47b20; }
.main-logo small { font-size: 14px; color: #999; letter-spacing: 0; }
.main-tagline { color: #777; margin-bottom: 22px; }

.main-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: 20px; }
.big-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 26px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: bold;
}
.big-btn:hover { filter: brightness(1.08); }

.auth-columns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  text-align: left;
}
.auth-form {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-form h2 { font-size: 15px; }
.auth-form button.accent { background: #f47b20; }
.form-note { font-size: 11px; color: #999; }

.search-form { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.search-form input { width: 280px; }

.search-results { text-align: left; max-width: 480px; margin: 0 auto; }
.search-results ul { list-style: none; }
.search-results li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.search-results a { text-decoration: none; }
.search-results a:hover { text-decoration: underline; }

/* ---------- 우측 세로 메뉴 (v1.5 — 전 메뉴 노출, 등급 미달은 자물쇠) ---------- */
.right-menu {
  width: 104px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 8px;
  border-left: 1px solid var(--line);
  background: var(--panel-bg);
}
.rmenu-btn {
  display: block;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  background: var(--frame-bg);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}
.rmenu-btn:hover { border-color: var(--accent); }
.rmenu-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  border-color: var(--accent);
}
.rmenu-btn.locked { opacity: .55; }

/* 가입 캐릭터 선택 */
.char-select { border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.char-select-title { font-size: 11px; color: #888; }
.char-options { display: flex; gap: 8px; margin-top: 6px; }
.char-option {
  flex: 1;
  text-align: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  font-size: 11px;
}
.char-option img { width: 48px; display: block; margin: 0 auto 4px; }
.char-option:has(input:checked) { border-color: #f47b20; background: #fff4ea; }
.char-option input { display: none; }

/* 프로필·관리 탭 */
.profile-table { width: 100%; border-collapse: collapse; }
.profile-table th, .profile-table td {
  padding: 6px 8px;
  border-bottom: 1px dashed var(--line);
  text-align: left;
  font-size: 12px;
}
.profile-table th { width: 120px; color: #888; font-weight: normal; }
.grade-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .08);
  margin-top: 4px;
  overflow: hidden;
}
.grade-bar-fill { height: 100%; background: var(--accent); }
.manage-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; align-items: flex-start; }

/* 잠금·준비 중 페이지 */
.locked-box {
  text-align: center;
  padding: 40px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--frame-bg);
}
.locked-icon { font-size: 40px; margin-bottom: 10px; }
.locked-box h2 { font-size: 16px; margin-bottom: 10px; }
.locked-box p { line-height: 1.7; }

/* 미니룸 확대 보기 */
.miniroom-large { height: 320px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.miniroom-large .minimi { width: 110px; }

/* ---------- 크리에이터 스튜디오 (도트 에디터) ---------- */
.studio-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.dot-grid {
  display: grid;
  grid-template-columns: repeat(16, 20px);
  grid-template-rows: repeat(16, 20px);
  border: 1px solid var(--line);
  width: fit-content;
  background:
    repeating-conic-gradient(#f3f3f3 0% 25%, #ffffff 0% 50%) 0 0 / 20px 20px;
  touch-action: none;
  user-select: none;
}
.dot-cell { border: 1px dotted rgba(0, 0, 0, .06); }
.dot-palette { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; max-width: 330px; }
.dot-color {
  width: 24px; height: 24px;
  border: 2px solid rgba(0, 0, 0, .2);
  border-radius: 5px;
  padding: 0;
}
.dot-color.selected { border-color: #f47b20; box-shadow: 0 0 0 2px #f47b20; }
.dot-color.eraser { background: #fff; color: #999; font-size: 12px; }
.studio-meta { display: flex; flex-direction: column; gap: 10px; min-width: 220px; flex: 1; max-width: 320px; }
.studio-meta label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #666; }
.accent-btn, .studio-meta button[type="submit"] { background: #f47b20; }
.creator-label { font-size: 11px; color: #a06a2c; }

/* 관리자 콘솔 */
.admin-search { justify-content: flex-start; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
}
.admin-table th { background: var(--panel-bg); }
.admin-table .num { text-align: right; }
.admin-table .plus { color: #2e7d32; }
.admin-table .minus { color: #c0392b; }
.admin-table input[type="number"] { width: 90px; }
.admin-table input[type="text"] { width: 110px; }

/* 미니미 말풍선·동작 버튼 */
.minimi-bubble {
  position: absolute;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 4;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
}
.action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.action-label { font-size: 12px; color: #888; margin-right: 4px; }
.action-bar button { background: var(--accent); }

/* AI 초안 생성 (BYOK) */
.ai-box {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  background: #fbf7ff;
}
.ai-form { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-form select, .ai-form input { min-width: 0; }
.ai-form input#aiKey { flex: 1 1 220px; }
.ai-form input#aiPrompt { flex: 1 1 200px; }
.ai-form button { background: #7b52c7; }

/* 반응형 — 좁은 화면에서 사이드바를 위로 */
@media (max-width: 760px) {
  .frame-body { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .right-menu {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    border-top: 1px solid var(--line);
    order: -1;
  }
  .rmenu-btn { border-radius: 8px; }
}

/* 알림 배지 (프레임 상단바) */
.notif-badge {
  display: inline-block;
  min-width: 16px;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 9px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 16px;
}

/* 알림함 목록 */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.notif-item.unread { background: #fffbe8; font-weight: 600; }
.notif-item time { color: #999; font-size: 12px; white-space: nowrap; }

/* 관리자 콘솔 — 카카오톡 통보 */
.kakao-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #fffdf5;
}
.kakao-box code { background: #f3f0e8; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.kakao-connect-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: #fee500;
  color: #191919;
  font-weight: 700;
  text-decoration: none;
}
.kakao-error { color: #c0392b; }

/* 동시 접속 미니룸 — 방문자 미니미·말풍선 채팅·대화 초대 */
.minimi-guest {
  position: absolute;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  animation: guest-bob 2.6s ease-in-out infinite;
}
.minimi-guest img {
  display: block;
  margin: 0 auto;
  width: 58px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2));
}
.miniroom-large .minimi-guest img { width: 88px; }
.guest-name {
  font-size: 10px;
  background: rgba(255, 255, 255, .78);
  border-radius: 6px;
  padding: 0 4px;
  white-space: nowrap;
}
@keyframes guest-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
.room-chat-bar { display: flex; gap: 4px; }
.room-chat-bar input { flex: 1; min-width: 0; }
.room-visitors { margin-bottom: 8px; }
.visitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
  font-size: 12px;
}
.visitor-row small { color: #2e7d32; }

/* 갤러리(사진첩) */
.gallery-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gallery-form input[type="file"] { flex: 1 1 200px; min-width: 0; }
.gallery-form input[type="text"] { flex: 1 1 160px; min-width: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.photo-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.photo-card img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.photo-card figcaption { padding: 6px 8px; font-size: 12px; }
.photo-category {
  display: inline-block;
  padding: 0 6px;
  margin-bottom: 2px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
}
.photo-caption { display: block; word-break: break-all; }
.photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #999;
  font-size: 11px;
  margin-top: 2px;
}
