/* =====================================================================
 *  TEAMJINU 공식홈페이지 스타일 (다크 + 골드)
 * ===================================================================== */
:root {
  --bg:        #0b0c10;
  --bg2:       #121319;
  --card:      #171923;
  --card2:     #1d2030;
  --line:      #262a3a;
  --text:      #e8eaf2;
  --muted:     #9aa0b4;
  --gold:      #ffcf3f;
  --gold-deep: #d4a017;
  --live:      #ff4757;
  --radius:    14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* 수정 : 스크롤바 유무와 무관하게 콘텐츠 폭 고정 (페이지 이동/팝업 시 흔들림 방지) */
  scrollbar-gutter: stable;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ===================== 상단 헤더 ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,12,16,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 20px;
  height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.brand {
  justify-self: start;
  font-size: 22px; font-weight: 900; letter-spacing: 1px;
  display: flex; align-items: center; gap: 8px;
}
.brand-crown { color: var(--gold); font-size: 24px; }
.gnb { justify-self: center; display: flex; gap: 6px; }
.gnb a {
  padding: 8px 16px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--muted);
  transition: all .15s;
}
.gnb a:hover { color: var(--text); background: var(--card); }
.gnb a.active { color: var(--gold); background: rgba(255,207,63,.08); }
.admin-link {
  justify-self: end;
  font-size: 12px; color: var(--muted); padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 8px; transition: all .15s;
}
.admin-link:hover { color: var(--gold); border-color: var(--gold-deep); }

/* ===================== 메인 ===================== */
#app { flex: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---------- 히어로 배너 ---------- */
.hero {
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,207,63,.14), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(120,80,255,.12), transparent 50%),
    linear-gradient(160deg, #171923, #0e0f16);
  border: 1px solid var(--line);
  text-align: center; padding: 52px 20px 46px; margin-bottom: 36px;
  position: relative; overflow: hidden;
}
.hero-crown { font-size: 40px; color: var(--gold); }
.hero-since { font-size: 11px; letter-spacing: 5px; color: var(--muted); margin-top: 6px; }
.hero-title {
  font-size: clamp(38px, 7vw, 64px); font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(180deg, #fff, #ffcf3f 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1.15;
}
.hero-sub { color: var(--muted); letter-spacing: 6px; font-size: 13px; margin-top: 10px; }

/* ---------- 섹션 공통 (수정5 : 제목 크고 굵은 흰색) ---------- */
.sec { margin-bottom: 44px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.sec-head h2 { font-size: 26px; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 10px; }
.sec-head .cnt { color: var(--muted); font-size: 13px; }
.sec-head .more { margin-left: auto; font-size: 13px; color: var(--muted); }
.sec-head .more:hover { color: var(--gold); }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--live);
  display: inline-block; animation: blink 1.2s infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* ---------- 라이브 카드 ---------- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.live-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, border-color .15s;
}
.live-card:hover { transform: translateY(-3px); border-color: var(--gold-deep); }
.live-thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: 14px;
  background: linear-gradient(150deg, #1d2030, #12131a);
}
.thumb-fallback .tf-ic { font-size: 30px; }
.live-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--live); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 6px; letter-spacing: 1px;
  display: inline-flex; align-items: center; gap: 5px;
}
.live-badge .blink { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: blink 1.2s infinite; }
.live-viewers {
  position: absolute; right: 10px; top: 10px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 12px;
  padding: 3px 9px; border-radius: 6px;
}
.live-info { padding: 12px 14px 14px; }
.live-info .li-nick { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.live-info .li-nick img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.live-info .li-title {
  color: var(--muted); font-size: 13px; margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.empty-box {
  border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); text-align: center; padding: 44px 16px; font-size: 14px;
}

/* ---------- 공지 카드 ---------- */
.notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.notice-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: block; transition: border-color .15s, transform .15s;
}
.notice-card:hover { border-color: var(--gold-deep); transform: translateY(-2px); }
.nc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nc-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--card2); }
.nc-nick { font-weight: 700; font-size: 14px; }
.nc-time { color: var(--muted); font-size: 12px; }
.nc-new {
  color: var(--live); font-size: 10px; font-weight: 800; letter-spacing: 1px;
  border: 1px solid var(--live); border-radius: 4px; padding: 1px 5px; margin-left: auto;
}
.nc-text {
  color: #c9cddc; font-size: 13.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-imgs { display: flex; gap: 6px; margin-top: 10px; }
.nc-imgs img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }

/* ---------- 페이지 제목 (수정5 : 크고 굵은 흰색) ---------- */
.page-title-row { margin-bottom: 26px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-title-row h1 { font-size: 34px; font-weight: 900; color: #fff; }
.page-title-row p { color: var(--muted); font-size: 14px; margin-top: 6px; flex-basis: 100%; }
.page-title-row .sg-btn { margin-left: auto; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.member-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 14px 18px; text-align: center;
  transition: transform .15s, border-color .15s;
  cursor: pointer; position: relative;
}

/* ---- 대표 카드 (멤버 페이지 최상단 고정) ---- */
.leader-wrap { display: flex; justify-content: center; margin-bottom: 28px; }
.leader-card {
  width: 100%; max-width: 300px; padding: 30px 18px 22px;
  border-color: var(--gold-deep);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,207,63,.10), transparent 60%),
    var(--card);
}
.leader-card:hover { border-color: var(--gold); }
.leader-card .mc-img { width: 104px; height: 104px; border-color: var(--gold-deep); }
.leader-card .mc-nick { font-size: 19px; }
.mc-role {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #1a1405; font-size: 11px; font-weight: 800; letter-spacing: 2px;
  padding: 3px 12px; border-radius: 999px;
}
.member-card:hover { transform: translateY(-3px); border-color: var(--gold-deep); }
.member-card .mc-img-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.member-card .mc-img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line); background: var(--card2); display: block;
}
/* 관리자가 올린 프로필 사진 : 원형 강제 크롭 없이 둥근 사각형으로 (칸 밖으로 안 튀어나옴) */
.member-card .mc-img.is-photo { width: 96px; height: 96px; border-radius: 14px; }
.mc-live-badge.on-img {
  position: absolute; top: 0; left: -8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.member-card.is-live .mc-img { border-color: var(--live); }
.member-card .mc-nick { font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mc-live-badge {
  background: var(--live); color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 4px; letter-spacing: 1px;
}
.member-card .mc-bid { color: var(--muted); font-size: 12px; margin-top: 4px; }
.member-card .mc-links { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.member-card .mc-links a,
.member-card .mc-links button {
  font-size: 12px; padding: 6px 11px; border-radius: 8px; background: none;
  border: 1px solid var(--line); color: var(--muted); transition: all .15s;
  white-space: nowrap;
}
.member-card .mc-links a:hover,
.member-card .mc-links button:hover { color: var(--gold); border-color: var(--gold-deep); }

/* ---- BJ 등급 뱃지 (choigane 참고 : 파트너=보라 / 베스트=초록 / 일반=회색) ---- */
.grade-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 2px 9px; border-radius: 999px; vertical-align: middle;
}
.g-partner { background: rgba(139,92,246,.16); color: #b79cff; border: 1px solid rgba(139,92,246,.45); }
.g-best    { background: rgba(46,213,115,.13); color: #4cd137; border: 1px solid rgba(46,213,115,.4); }
.g-normal  { background: rgba(154,160,180,.12); color: var(--muted); border: 1px solid var(--line); }

/* ---------- 시그니처 페이지 (ymss.kr/sig 참고) ---------- */
.sig-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sig-tabs button {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 14px;
  transition: all .15s; white-space: nowrap;
}
.sig-tabs button:hover { color: var(--text); border-color: var(--gold-deep); }
.sig-tabs button.active { background: rgba(255,207,63,.1); color: var(--gold); border-color: var(--gold-deep); }

.sig-search-wrap { position: relative; margin-bottom: 22px; }
.sig-search-ic {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; opacity: .55; pointer-events: none;
}
.sig-search {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 14px; padding: 13px 14px 13px 40px; outline: none;
}
.sig-search:focus { border-color: var(--gold-deep); }
.sig-search::placeholder { color: var(--muted); }

.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sig-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: transform .15s, border-color .15s; display: block;
}
.sig-card:hover { transform: translateY(-3px); border-color: var(--gold-deep); }
.sig-thumb {
  position: relative; aspect-ratio: 16/9;
  background: linear-gradient(150deg, #1d2030, #12131a);
  display: flex; align-items: center; justify-content: center;
}
.sig-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sig-play {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--muted); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; padding-left: 3px;
}
.sig-card:hover .sig-play { border-color: var(--gold); color: var(--gold); }
.sig-new {
  position: absolute; top: 8px; left: 8px;
  background: var(--live); color: #fff; font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .5px;
}
/* 등록된 영상 개수 (우측 상단) */
.sig-vcount {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.68); color: var(--gold); font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 6px;
}
.sig-meta {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.sig-price {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--gold); font-size: 12px; font-weight: 800; padding: 2px 8px; white-space: nowrap;
}
.sig-name {
  color: var(--text); font-size: 13.5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 상단 로고 이미지 (관리자 등록 시 ♛ 대체) ---------- */
.brand-logo { height: 34px; max-width: 120px; object-fit: contain; display: block; }

/* ---------- 대문 이미지 (관리자 등록 시 기본 배너 대체) ---------- */
.hero.has-img { padding: 0; }
.hero-img { width: 100%; display: block; max-height: 360px; object-fit: cover; }

/* ---------- 공지사항 목록 (글번호 · 클릭 시 상세 페이지) ---------- */
.sn-list { display: flex; flex-direction: column; gap: 8px; }
.sn-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; transition: border-color .15s;
}
.sn-row:hover { border-color: var(--gold-deep); }
.sn-row:hover .sn-title { color: var(--gold); }
.sn-row.is-pinned { border-color: var(--gold-deep);
  background: radial-gradient(ellipse at 10% 0%, rgba(255,207,63,.07), transparent 55%), var(--card); }
.sn-no {
  min-width: 34px; text-align: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-size: 12px; font-weight: 700; padding: 3px 6px;
}
.sn-title { font-size: 16.5px; font-weight: 800; flex: 1; transition: color .15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-date { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- 공지/건의 상세 페이지 ---------- */
.sn-detail {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px;
}
.sn-d-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px;
}
.sn-d-head h2 { font-size: 23px; font-weight: 900; color: #fff; flex: 1; }
.sn-back { margin-top: 18px; display: flex; justify-content: center; }
.sn-back .sg-btn { display: inline-block; text-align: center; min-width: 140px; }
.sn-content {
  font-size: 15.5px; font-weight: 700; line-height: 1.95; color: #eef0f7;
  word-break: break-word;
}
.sn-content a { color: var(--gold); text-decoration: underline; }
.sn-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sn-imgs img {
  max-width: 100%; width: auto; max-height: 320px; border-radius: 10px;
  border: 1px solid var(--line);
}

/* ---------- 건의사항 : 관리자 공지 박스 ---------- */
.sg-admin-notice {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255,207,63,.09), transparent 55%),
    var(--card);
  border: 1px solid var(--gold-deep); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 14px;
}
.sg-an-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sg-an-head b { color: var(--gold); font-size: 14px; }
.sg-an-head .sg-time { margin-left: auto; }
.sg-an-body { font-size: 14.5px; font-weight: 600; line-height: 1.85; word-break: break-word; }
.sg-an-body a { color: var(--gold); text-decoration: underline; }

/* ---------- 건의사항 페이지 ---------- */
.sg-form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 24px;
}
.sg-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sg-form input, .sg-form textarea {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-size: 14px; outline: none; font-family: inherit;
}
.sg-form input { flex: 1; min-width: 160px; }
.sg-form input:focus, .sg-form textarea:focus { border-color: var(--gold-deep); }
.sg-form textarea { width: 100%; resize: vertical; margin: 10px 0; line-height: 1.7; }
.sg-note { color: var(--muted); font-size: 12px; flex: 1; }
.sg-btn {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: none; border-radius: 10px; color: #1a1405; font-weight: 800;
  padding: 11px 22px; font-size: 14px; white-space: nowrap;
}
.sg-msg { font-size: 13px; margin-top: 8px; min-height: 18px; }
.sg-msg.ok { color: #4cd137; }
.sg-msg.err { color: var(--live); }
.sg-list { display: flex; flex-direction: column; gap: 8px; }
.sg-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; transition: border-color .15s;
}
.sg-item:hover { border-color: var(--gold-deep); }
.sg-writer { font-weight: 800; font-size: 14px; }
.sg-item-note { color: var(--muted); font-size: 13px; flex: 1; }
.sg-time { color: var(--muted); font-size: 12px; }
.sg-view-meta { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.sg-view-content { font-size: 14.5px; line-height: 1.9; word-break: break-word; }
.sg-view-content a { color: var(--gold); text-decoration: underline; }

/* ---------- 개발중 안내 (페스티벌 등 준비중 페이지) ---------- */
.dev-box {
  border: 1px dashed var(--line); border-radius: var(--radius);
  text-align: center; padding: 90px 20px; margin-top: 10px;
}
.dev-ic { font-size: 44px; }
.dev-title {
  font-size: 24px; font-weight: 900; letter-spacing: 4px; margin-top: 14px;
  color: var(--gold);
}
.dev-sub { color: var(--muted); font-size: 14px; line-height: 1.8; margin-top: 12px; }

/* ===================== 프로필 팝업 (choigane 참고) ===================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,6,10,.82);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: modalFade .2s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalUp   { from { transform: translateY(24px); } to { transform: translateY(0); } }
.profile-modal {
  position: relative; width: 100%; max-width: 760px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  animation: modalUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.pm-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.45); border: 1px solid var(--line); color: var(--text);
  font-size: 14px; line-height: 1;
}
.pm-close:hover { border-color: var(--gold-deep); color: var(--gold); }
.pm-info { padding: 34px 30px 28px; display: flex; flex-direction: column; }
.pm-name { font-size: 26px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.pm-chips { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pm-bid { color: var(--muted); font-size: 13px; }
.pm-rows { margin-top: 22px; }
.pm-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 2px; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.pm-row:last-child { border-bottom: none; }
.pm-label { color: var(--muted); font-size: 13px; }
.pm-val { font-weight: 700; }
.pm-val.pm-empty { color: var(--muted); font-weight: 400; opacity: .6; }
.pm-note { color: var(--muted); font-size: 11.5px; margin-top: auto; padding-top: 16px; opacity: .8; }
.pm-days {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  background: rgba(255,207,63,.12); border: 1px solid var(--gold-deep);
  color: var(--gold); font-size: 11px; font-weight: 800;
  padding: 1px 8px; border-radius: 999px;
}
/* 소셜미디어 로고 버튼 (프로필 팝업) */
.sns-row { display: inline-flex; gap: 8px; vertical-align: middle; }
.sns-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s, filter .15s;
}
.sns-btn:hover { transform: translateY(-2px); filter: brightness(1.15); }
.sns-yt { background: #ff0000; }
.sns-ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.pm-actions { margin-top: 12px; }
.pm-go {
  display: block; text-align: center; padding: 11px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 10px; color: #1a1405; font-weight: 800; font-size: 14px;
}
.pm-photo { background: var(--card2); min-height: 380px; }
.pm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 숲 프로필(원형 로고·gif) 폴백일 때 : 크롭 없이 원본 비율 그대로, 상하좌우 여백 유지 */
.pm-photo.is-soop {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #23263a, var(--card2));
}
.pm-photo.is-soop img {
  width: auto; height: auto; max-width: 72%; max-height: 72%;
  object-fit: contain; border-radius: 50%;
  border: 3px solid var(--line);
}
@media (max-width: 640px) {
  .profile-modal { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .pm-photo { order: -1; min-height: 240px; max-height: 300px; }
}

/* ===================== 시그니처 팝업 (ymss 참고) ===================== */
.sig-modal {
  position: relative; width: 100%; max-width: 820px; max-height: 84vh;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 26px 24px; overflow-y: auto;
  animation: modalUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.sm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.sm-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold-deep); background: var(--card2);
}
.sm-title { font-size: 20px; font-weight: 900; }
.sm-title span { color: var(--gold); }
.sm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
}
.sm-card {
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; text-align: center; padding-bottom: 12px; display: block;
  transition: transform .15s, border-color .15s;
}
.sm-card:hover { transform: translateY(-3px); border-color: var(--gold-deep); }
.sm-thumb {
  aspect-ratio: 1/1; background: linear-gradient(150deg, #23263a, #14151e);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.sm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-thumb-ic { font-size: 34px; opacity: .5; }
.sm-count { color: var(--gold); font-weight: 900; font-size: 17px; letter-spacing: .5px; }
.sm-name { color: var(--text); font-size: 13px; font-weight: 600; margin-top: 3px; padding: 0 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-empty { text-align: center; color: var(--muted); padding: 44px 16px; font-size: 14px; line-height: 1.8; }
.sm-empty span { font-size: 12.5px; opacity: .75; }
.sm-empty-ic { font-size: 30px; margin-bottom: 8px; }
.sm-card[data-sigv] { cursor: pointer; }

/* ---------- 입사 주년 축하 팝업 ---------- */
.anniv-modal {
  position: relative; width: 100%; max-width: 400px; text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,207,63,.14), transparent 60%),
    var(--card);
  border: 1px solid var(--gold-deep); border-radius: 20px;
  padding: 34px 26px 24px;
  animation: modalUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.anniv-ic { font-size: 44px; }
.anniv-title { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 3px; margin-top: 10px; }
.anniv-body { font-size: 17px; line-height: 1.8; margin-top: 12px; }
.anniv-year { color: var(--gold); }
.anniv-sub { color: var(--muted); font-size: 13px; margin-top: 10px; }
.anniv-btns { display: flex; gap: 8px; margin-top: 22px; }
.anniv-btns button {
  flex: 1; padding: 11px; border-radius: 10px; font-size: 13px; font-weight: 700;
}
.anniv-hide { background: none; border: 1px solid var(--line); color: var(--muted); }
.anniv-hide:hover { border-color: var(--gold-deep); color: var(--gold); }
.anniv-close {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: none; color: #1a1405;
}

/* ---------- 시그 영상 목록 팝업 (누가 춤춘 영상인지) ---------- */
.sigv-modal {
  position: relative; width: 100%; max-width: 420px; max-height: 80vh;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; overflow-y: auto;
  animation: modalUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.sigv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 17px; }
.sigv-list { display: flex; flex-direction: column; gap: 8px; }
.sigv-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .15s;
}
.sigv-row:hover { border-color: var(--gold-deep); }
.sigv-name { font-weight: 700; font-size: 14px; }
.sigv-go { color: var(--gold); font-size: 12.5px; }
.sigv-row { width: 100%; cursor: pointer; color: var(--text); font-family: inherit; }

/* ---------- 영상 재생 팝업 (임베드 플레이어) ---------- */
.video-modal {
  position: relative; width: 100%; max-width: 880px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; animation: modalUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.vm-head { font-size: 16px; margin-bottom: 12px; padding-right: 40px; display: flex; align-items: center; gap: 10px; }
.vm-dancer-solo { color: var(--gold); font-size: 14px; margin: -6px 0 10px; }
/* 춤춘 사람 선택 탭 (여러 영상일 때) */
.vm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.vm-tab {
  background: var(--card2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 13.5px; font-weight: 700; padding: 8px 18px;
  transition: all .15s;
}
.vm-tab:hover { color: var(--text); border-color: var(--gold-deep); }
.vm-tab.active {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-color: var(--gold-deep); color: #1a1405;
}
.vm-noembed {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px; text-align: center; line-height: 1.8;
}
.vm-frame {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 10px; overflow: hidden;
}
.vm-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.a-video-row .v-move { padding: 10px 11px; flex: 0; }

/* ===================== 푸터 ===================== */
.site-footer { border-top: 1px solid var(--line); background: var(--bg2); }
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 28px 20px; text-align: center; }
.f-brand { font-weight: 900; letter-spacing: 2px; }
.f-brand span { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 8px; letter-spacing: 3px; }
.f-sub { color: var(--muted); font-size: 12px; margin-top: 8px; letter-spacing: 2px; }

/* ===================== 관리자 : 로그인 ===================== */
.admin-body { background: var(--bg); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 40px 32px; text-align: center;
}
.login-logo { font-size: 38px; color: var(--gold); }
.login-card h1 { font-size: 22px; letter-spacing: 2px; margin-top: 10px; }
.login-card h1 span { color: var(--gold); font-size: 13px; vertical-align: middle; margin-left: 6px; letter-spacing: 3px; }
.login-desc { color: var(--muted); font-size: 13px; margin: 10px 0 22px; }
.login-card input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 13px 14px; font-size: 15px; outline: none;
}
.login-card input:focus { border-color: var(--gold-deep); }
.login-card button[type=submit] {
  width: 100%; margin-top: 12px; padding: 13px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: none; border-radius: 10px; color: #1a1405; font-weight: 800; font-size: 15px;
}
.login-err { color: var(--live); font-size: 13px; margin-top: 12px; min-height: 18px; }
.login-back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 13px; }
.login-back:hover { color: var(--gold); }

/* ===================== 관리자 : 대시보드 ===================== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-side {
  width: 220px; flex-shrink: 0; background: var(--bg2);
  border-right: 1px solid var(--line); padding: 24px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.admin-brand { font-weight: 900; letter-spacing: 1px; padding: 0 10px 18px; line-height: 1.5; }
.admin-brand span { color: var(--gold); font-size: 12px; font-weight: 600; }
.a-nav {
  width: 100%; text-align: left; background: none; border: none; color: var(--muted);
  padding: 11px 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.a-nav em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--muted); opacity: .7; }
.a-nav:hover { background: var(--card); color: var(--text); }
.a-nav.active { background: rgba(255,207,63,.1); color: var(--gold); }
/* 상단 배치 : 홈페이지 보기 + 로그아웃 (메뉴 위) */
.admin-side-foot {
  display: flex; gap: 8px; padding: 0 4px 14px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.a-home {
  flex: 1; text-align: center; font-size: 13px; font-weight: 700; color: #1a1405;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 8px; padding: 9px 6px; white-space: nowrap;
}
.a-home:hover { filter: brightness(1.08); }
#logoutBtn {
  flex: 1; background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 9px 6px; border-radius: 8px; font-size: 13px; white-space: nowrap;
}
#logoutBtn:hover { border-color: var(--live); color: var(--live); }
.admin-main { flex: 1; padding: 32px; max-width: 900px; }
.admin-main h1 { font-size: 22px; margin-bottom: 6px; }
.admin-main .a-desc { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.a-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.a-row { display: flex; gap: 10px; flex-wrap: wrap; }
.a-row input, .a-row select {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 14px; outline: none; flex: 1; min-width: 140px;
}
.a-row input:focus { border-color: var(--gold-deep); }
.a-btn {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: none; border-radius: 8px; color: #1a1405; font-weight: 800;
  padding: 10px 20px; font-size: 14px;
}
.a-btn.ghost { background: none; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.a-btn.ghost:hover { border-color: var(--live); color: var(--live); }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { text-align: left; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.a-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.a-table tr:last-child td { border-bottom: none; }
.a-table img.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; background: var(--card2); }
.a-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.a-msg.ok { color: #4cd137; }
.a-msg.err { color: var(--live); }
.a-placeholder { color: var(--muted); text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.a-btn.ghost.gold:hover { border-color: var(--gold-deep); color: var(--gold); }
.a-sub-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.a-sub-head img.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--card2); }
.a-file-label {
  display: inline-block; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 600;
  padding: 10px 16px; cursor: pointer; white-space: nowrap;
}
.a-file-label:hover { border-color: var(--gold-deep); color: var(--gold); }
.a-video-row .v-del { padding: 10px 14px; flex: 0; }
.a-textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 12px; font-size: 14px; outline: none; resize: vertical;
  font-family: inherit; line-height: 1.7;
}
.a-textarea:focus { border-color: var(--gold-deep); }
/* ---------- 공지 서식 에디터 (관리자) ---------- */
.a-ed-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--line); border-bottom: none;
  border-radius: 8px 8px 0 0; padding: 8px 10px;
}
.a-ed-toolbar button, .a-ed-toolbar select {
  background: none; border: 1px solid transparent; border-radius: 6px;
  color: var(--text); font-size: 13px; padding: 5px 9px; cursor: pointer;
}
.a-ed-toolbar select { background: var(--bg2); border-color: var(--line); }
.a-ed-toolbar button:hover { border-color: var(--gold-deep); color: var(--gold); }
.a-ed-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.a-ed-color {
  display: inline-flex; align-items: center; gap: 2px; cursor: pointer;
  padding: 3px 6px; border-radius: 6px; border: 1px solid transparent;
}
.a-ed-color:hover { border-color: var(--gold-deep); }
.a-ed-color span { font-weight: 900; font-size: 13px; border-bottom: 3px solid var(--gold); line-height: 1.1; }
.a-ed-color input { width: 20px; height: 20px; border: none; background: none; padding: 0; cursor: pointer; }
.a-editor {
  min-height: 180px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 0 0 8px 8px; color: var(--text); padding: 14px;
  font-size: 14px; line-height: 1.8; outline: none; overflow-y: auto; max-height: 420px;
}
.a-editor:focus { border-color: var(--gold-deep); }
.a-editor:empty::before { content: attr(data-placeholder); color: var(--muted); opacity: .6; }
.a-editor a { color: var(--gold); text-decoration: underline; }

.nt-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-img { position: relative; display: inline-block; }
.nt-img img { height: 64px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.nt-img button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--live); border: none; color: #fff;
  font-size: 10px; line-height: 1;
}
.a-hint {
  color: var(--muted); font-size: 12px; line-height: 1.7;
  background: var(--bg2); border: 1px dashed var(--line); border-radius: 8px;
  padding: 9px 12px;
}
.a-hint b { color: var(--gold); }
/* 멤버 프로필 편집 — '잘하는 시그' 체크박스 */
.pf-sigs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px;
  background: var(--bg2); border: 1px dashed var(--line); border-radius: 8px; padding: 12px;
  font-size: 13px; color: var(--muted);
}
.pf-sig-chk {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--text); font-size: 13.5px; padding: 4px 2px;
}
.pf-sig-chk input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }

/* ===================== 반응형 ===================== */
@media (max-width: 720px) {
  .header-inner { gap: 12px; padding: 0 14px; }
  .brand { font-size: 18px; }
  .gnb a { padding: 8px 10px; font-size: 14px; }
  .admin-layout { flex-direction: column; }
  .admin-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-brand { padding: 0 8px; }
  .admin-side-foot { margin-top: 0; margin-left: auto; flex-direction: row; }
  .admin-main { padding: 20px 14px; }
}
