* { box-sizing: border-box; }
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
body {
  font-family: 'Pretendard', -apple-system, 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  margin: 0; background: #f4f5f8; color: #17181c; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.icon { display: inline-flex; flex-shrink: 0; }
.icon svg { display: block; }

/* ===== 공통 헤더 ===== */
header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px 32px; background: rgba(255,255,255,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid #eceef2;
  position: sticky; top: 0; z-index: 20;
}
.logo { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; text-decoration: none; color: #17181c; flex-shrink: 0; letter-spacing: -0.01em; }
.logo-badge {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(150deg, #5b93ff 0%, #4285F4 55%, #2e5fc9 100%);
  box-shadow: 0 2px 8px rgba(66,133,244,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.logo span { color: #4285F4; }
.back-link { font-size: 13px; color: #6b6c74; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color 0.15s ease; }
.back-link:hover { color: #4285F4; }

/* 검색창을 정중앙보다 살짝 왼쪽에 오도록 좌우 여백 비율을 다르게 줌 (index.html 전용) */
.header-spacer-left { flex: 0.6; }
.header-spacer-right { flex: 2.4; }

.search-wrap { position: relative; width: 420px; flex-shrink: 0; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9a9ba3; pointer-events: none; z-index: 1; }
.search-box { width: 260px; padding: 11px 18px; border-radius: 22px; border: 1.5px solid #e2e3e8; font-size: 13.5px; background: #fff; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.search-box:focus { outline: none; border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,0.12); }
.search-wrap .search-box { width: 100%; padding-left: 42px; }

.search-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: #fff; border: 1px solid #eceef2; border-radius: 16px;
  box-shadow: 0 20px 50px -15px rgba(23,24,28,0.18); overflow-y: auto; max-height: 360px;
}
.search-dropdown.hidden { display: none; }
.search-dropdown-label { font-size: 11px; color: #9a9ba3; font-weight: 700; padding: 12px 18px 6px; letter-spacing: 0.02em; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; text-decoration: none; color: inherit; cursor: pointer; transition: background 0.12s ease; }
.search-result-item:hover { background: #f6f8fc; }
.search-result-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.search-result-info { min-width: 0; flex: 1; }
.search-result-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 11.5px; color: #8a8b93; margin-top: 2px; }
.search-result-empty { padding: 18px; text-align: center; font-size: 12.5px; color: #8a8b93; }
.dropdown-add-btn {
  display: inline-flex; align-items: center; gap: 5px; margin: 10px auto 0;
  background: linear-gradient(150deg, #5b93ff, #4285F4); color: #fff; border: none;
  border-radius: 16px; padding: 8px 16px; font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(66,133,244,0.3); transition: transform 0.15s ease;
}
.dropdown-add-btn:hover { transform: translateY(-1px); }
.dropdown-add-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.page { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.page-narrow { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }

/* ===== 홈: 히어로 ===== */
.hero {
  background: linear-gradient(150deg, #5b93ff 0%, #4285F4 30%, #8a4fe0 65%, #e8175d 100%);
  border-radius: 24px; padding: 46px 42px; color: #fff; position: relative; overflow: hidden; margin-bottom: 30px;
  box-shadow: 0 30px 60px -25px rgba(66,133,244,0.45);
}
.hero::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(255,255,255,0.09); top: -140px; right: -80px; }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.07); bottom: -100px; right: 140px; }
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.85; text-transform: uppercase; }
.hero h1 { font-size: 31px; font-weight: 800; margin: 12px 0 8px; line-height: 1.38; letter-spacing: -0.01em; }
.hero p { font-size: 14px; opacity: 0.92; margin: 0 0 26px; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-stat { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); border-radius: 14px; padding: 13px 19px; min-width: 130px; backdrop-filter: blur(6px); }
.hero-stat .num { display: block; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-stat .label { display: block; font-size: 11px; opacity: 0.85; margin-top: 3px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-btn {
  background: #fff; color: #4285F4; font-weight: 700; font-size: 13px; padding: 12px 22px 12px 24px;
  border-radius: 24px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,0.12); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.16); }
.cta-btn.ghost { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.4); box-shadow: none; }
.cta-btn.ghost:hover { background: rgba(255,255,255,0.22); }
.update-note { font-size: 12px; color: #6b6c74; margin: -16px 0 20px; padding-left: 4px; display: flex; align-items: center; gap: 6px; }
.update-note .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #34A853; box-shadow: 0 0 0 3px rgba(52,168,83,0.18); }

/* ===== 홈: 순위 카드 ===== */
.ranking-card { background: #fff; border-radius: 20px; padding: 26px 28px; border: 1px solid #eceef2; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.25); }
.ranking-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.ranking-header h2 { font-size: 17px; margin: 0; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 4px; background: #f4f5f8; padding: 4px; border-radius: 13px; }
.tab-btn { border: none; background: none; font-size: 12px; font-weight: 700; color: #6b6c74; padding: 8px 14px; border-radius: 10px; cursor: pointer; transition: all 0.15s ease; }
.tab-btn.active { background: #fff; color: #17181c; box-shadow: 0 2px 8px rgba(23,24,28,0.1); }
.notice { font-size: 11.5px; color: #6b6c74; background: #f8f9fb; border: 1px solid #eceef2; border-radius: 10px; padding: 10px 14px; margin: 16px 0 22px; display: flex; align-items: center; gap: 7px; }
.ranking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 30px; }
@media (max-width: 720px) { .ranking-grid { grid-template-columns: 1fr; } }
.rank-row { display: flex; align-items: center; gap: 13px; padding: 13px 6px; border-bottom: 1px solid #f2f3f5; text-decoration: none; color: inherit; border-radius: 10px; transition: background 0.12s ease; }
.rank-row:hover { background: #f8f9fb; }
.rank-num { width: 22px; font-size: 15px; font-weight: 800; color: #c4c5cc; text-align: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rank-num.top3 { color: #e8175d; }
.rank-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.rank-info { min-width: 0; flex: 1; }
.rank-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { font-size: 11.5px; color: #8a8b93; margin-top: 3px; }
.rank-meta .hl { color: #4285F4; font-weight: 800; }
footer.site-footer { text-align: center; font-size: 11px; color: #a8a9b0; padding: 28px 0 8px; line-height: 1.9; }
footer.site-footer a { color: #a8a9b0; text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s ease; }
footer.site-footer a:hover { color: #4285F4; }
footer.site-footer .footer-links { margin-top: 2px; }
footer.site-footer .footer-links .sep { margin: 0 8px; color: #d5d6db; }

/* ===== 검색 → 추가 흐름 ===== */
.search-notice { background: #fff8e1; border-bottom: 1px solid #ffe082; padding: 12px 32px; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 13px; color: #6b5900; }
.search-notice.hidden { display: none; }
.add-from-search-btn { background: linear-gradient(150deg, #5b93ff, #4285F4); color: #fff; border: none; border-radius: 16px; padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: 0 4px 12px rgba(66,133,244,0.3); transition: transform 0.15s ease; }
.add-from-search-btn:hover { transform: translateY(-1px); }
.add-from-search-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.success-toast { position: fixed; top: 20px; right: 20px; background: #16321f; color: #7fe3a3; padding: 15px 20px; border-radius: 12px; font-size: 13px; line-height: 1.5; box-shadow: 0 20px 40px -15px rgba(0,0,0,0.35); z-index: 200; max-width: 300px; }
.success-toast.hidden { display: none; }
.mini-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 300; }
.mini-modal.hidden { display: none; }
.mini-modal-backdrop { position: absolute; inset: 0; background: rgba(17,18,22,0.55); backdrop-filter: blur(3px); }
.mini-modal-content { position: relative; background: #fff; border-radius: 18px; padding: 32px 28px; width: 320px; text-align: center; box-shadow: 0 30px 70px -15px rgba(23,24,28,0.35); }
.mini-modal-icon { color: #e8175d; display: flex; justify-content: center; margin-bottom: 12px; }
.mini-modal-content h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.mini-modal-content p { font-size: 12.5px; color: #6b6c74; line-height: 1.55; margin: 0 0 20px; }
.mini-modal-btn { background: #17181c; color: #fff; border: none; border-radius: 10px; padding: 11px 24px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.15s ease; }
.mini-modal-btn:hover { background: #333; }

/* ===== 목록 페이지 ===== */
.toolbar { padding: 14px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border-bottom: 1px solid #eceef2; }
#sortSelect { padding: 9px 12px; border: 1px solid #e2e3e8; border-radius: 10px; font-size: 13px; background: #fff; color: #444; }
.tag-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip { border: 1px solid #e2e3e8; background: #fff; border-radius: 14px; padding: 5px 13px; font-size: 12px; cursor: pointer; color: #555; transition: all 0.15s ease; }
.tag-chip.active { background: #4285F4; color: #fff; border-color: #4285F4; box-shadow: 0 3px 10px rgba(66,133,244,0.3); }
.tag-chip.small { padding: 2px 8px; margin-right: 4px; cursor: default; background: #eef2ff; color: #3355cc; border: none; display: inline-block; font-size: 11px; }
.tag-chip.removable { display: inline-flex; align-items: center; gap: 4px; background: #eef2ff; border-radius: 12px; padding: 4px 8px; font-size: 12px; margin: 2px 4px 2px 0; color: #3355cc; }
.tag-chip.removable .remove-tag { border: none; background: none; cursor: pointer; color: #999; display: flex; }

.channel-list { background: #fff; border-radius: 16px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.25); border: 1px solid #eceef2; overflow: hidden; }
.channel-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #f2f3f5; cursor: pointer; text-decoration: none; color: inherit; transition: background 0.12s ease; }
.channel-item:last-child { border-bottom: none; }
.channel-item:hover { background: #f8f9fb; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #e8eaed; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.avatar.large { width: 64px; height: 64px; }
.channel-info { flex: 1; min-width: 0; }
.channel-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.channel-name { font-weight: 700; font-size: 15px; }
.external-link { font-size: 12px; color: #9a9ba3; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.external-link:hover { color: #4285F4; }
.channel-tags { margin-top: 6px; }
.channel-meta { margin-top: 6px; font-size: 12px; color: #8a8b93; }
.channel-stats { text-align: right; font-size: 12px; color: #6b6c74; min-width: 150px; flex-shrink: 0; }
.channel-stats .stat-row { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.channel-stats .stat-label { color: #9a9ba3; }
.channel-stats .stat-value { font-weight: 600; color: #17181c; font-variant-numeric: tabular-nums; }
.growth-up { color: #1e7e34 !important; }
.growth-down { color: #c0392b !important; }
.empty { text-align: center; color: #9a9ba3; padding: 32px; font-size: 13px; }

/* ===== 등록 페이지 ===== */
.page-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.page-title h1 { font-size: 20px; margin: 0; }
.page-sub { font-size: 13px; color: #888; margin: 0 0 24px; }
.page-tabs { display: flex; gap: 4px; border-bottom: 2px solid #eee; margin-bottom: 24px; }
.page-tab-btn { border: none; background: none; font-size: 14px; font-weight: 700; color: #9a9ba3; padding: 12px 18px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 7px; transition: color 0.15s ease; }
.page-tab-btn.active { color: #e8175d; border-bottom-color: #e8175d; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.card { background: #fff; border-radius: 18px; border: 1px solid #eceef2; padding: 28px; margin-bottom: 20px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.2); }
.card h3 { font-size: 14px; margin: 0 0 14px; font-weight: 700; }
.field-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.text-input { width: 100%; padding: 14px 16px; border: 1px solid #e2e3e8; border-radius: 12px; font-size: 14px; margin-bottom: 8px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.text-input:focus { outline: none; border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,0.12); }
.format-list { list-style: none; padding: 0; margin: 14px 0 20px; font-size: 12.5px; color: #555; }
.format-list li { padding: 5px 0; display: flex; align-items: center; gap: 8px; }
.format-list .ok { color: #1e7e34; display: inline-flex; }
.format-list .no { color: #c0392b; display: inline-flex; }
.format-list code { background: #f4f5f8; padding: 2px 7px; border-radius: 5px; font-size: 12px; }
.submit-btn { width: 100%; background: linear-gradient(150deg, #5b93ff, #4285F4 55%, #8a4fe0); color: #fff; border: none; border-radius: 12px; padding: 15px; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(66,133,244,0.5); transition: transform 0.15s ease; }
.submit-btn:hover { transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.ai-textarea { width: 100%; min-height: 130px; padding: 14px 16px; border: 1px solid #e2e3e8; border-radius: 12px; font-size: 13px; resize: vertical; font-family: inherit; margin-bottom: 10px; transition: border-color 0.15s ease; }
.ai-textarea:focus { outline: none; border-color: #4285F4; }
.extract-btn { background: #f4f5f8; border: 1px solid #e2e3e8; border-radius: 10px; padding: 10px 18px; font-size: 13px; font-weight: 700; cursor: pointer; color: #333; display: inline-flex; align-items: center; gap: 7px; transition: background 0.15s ease; }
.extract-btn:hover { background: #eceef2; }
.ai-note { font-size: 11.5px; color: #9a9ba3; margin-top: 8px; }
.extract-result { margin-top: 18px; }
.extract-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid #eceef2; border-radius: 10px; margin-bottom: 6px; font-size: 13px; }
.extract-item code { color: #555; font-size: 12px; }
.collect-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b6c74; margin-bottom: 18px; }
.collect-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #34A853; box-shadow: 0 0 0 3px rgba(52,168,83,0.18); }
.collect-btn { background: linear-gradient(150deg, #ff5b8a, #e8175d); color: #fff; border: none; border-radius: 12px; padding: 15px 26px; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(232,23,93,0.5); transition: transform 0.15s ease; }
.collect-btn:hover { transform: translateY(-1px); }
.collect-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.collect-progress { margin-top: 16px; font-size: 12.5px; color: #4285F4; display: none; }
.table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.table-header h2 { font-size: 15px; margin: 0; font-weight: 800; }
.fail-toggle { font-size: 12px; color: #c0392b; background: #fdecea; border: none; border-radius: 14px; padding: 7px 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: #9a9ba3; font-weight: 700; font-size: 11.5px; padding: 8px 10px; border-bottom: 1px solid #eceef2; }
td { padding: 12px 10px; border-bottom: 1px solid #f4f5f8; vertical-align: middle; }
.ch-cell { display: flex; align-items: center; gap: 10px; }
.ch-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.ch-name { font-weight: 700; }
.status-badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; }
.status-badge.ok { background: #e6f4ea; color: #1e7e34; }
.status-badge.fail { background: #fdecea; color: #c0392b; }

/* ===== 채널 상세 페이지 ===== */
.channel-header-card { position: relative; background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid #eceef2; margin-bottom: 18px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.25); }
.channel-banner-wrap { width: 100%; height: 180px; overflow: hidden; position: relative; background: #eee; }
.channel-banner { width: 100%; height: 100%; object-fit: cover; display: block; }
.channel-banner-wrap.blurred .channel-banner { filter: blur(22px) saturate(1.3) brightness(0.95); transform: scale(1.3); }
.channel-banner-wrap.blurred::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.08); }
.channel-header-avatar {
  position: absolute; left: 24px; top: 140px;
  width: 96px; height: 96px; border-radius: 50%; border: 4px solid #fff;
  object-fit: cover; background: #eee; box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.channel-header-info { padding: 14px 24px 20px 136px; }
.channel-header-name { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: #17181c; }
.channel-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.visit-btn { background: #f4f5f8; border: 1px solid #eceef2; border-radius: 18px; padding: 8px 16px; font-size: 13px; font-weight: 700; color: #333; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: border-color 0.15s ease; }
.visit-btn:hover { border-color: #4285F4; }
.handle-chip { background: #f4f5f8; border-radius: 18px; padding: 8px 14px; font-size: 13px; color: #6b6c74; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 14px; padding: 14px; text-align: center; border: 1px solid #eceef2; box-shadow: 0 12px 30px -22px rgba(23,24,28,0.3); }
.stat-card .label { display: block; font-size: 11px; color: #9a9ba3; font-weight: 600; }
.stat-card .value { display: block; font-size: 16px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; }

.chart-card { background: #fff; border: 1px solid #eceef2; border-radius: 18px; padding: 22px; margin-bottom: 18px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.22); }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chart-title { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.info-icon { color: #c4c5cc; display: inline-flex; }
.chart-wrap { height: 200px; position: relative; margin-top: 14px; }
.growth-rate-title { font-size: 13px; font-weight: 800; margin: 20px 0 10px; color: #333; }
.growth-rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.growth-rate-box { background: #f8f9fb; border-radius: 12px; padding: 13px; }
.growth-rate-box .label { font-size: 12px; color: #9a9ba3; }
.growth-rate-box .value { font-size: 16px; font-weight: 800; margin-top: 6px; color: #222; font-variant-numeric: tabular-nums; }
.growth-rate-box .value.up { color: #e8175d; }
.growth-rate-box .value.down { color: #3366cc; }

.description-card { padding: 20px 22px; }
.channel-description { margin: 6px 0 0; font-size: 13px; line-height: 1.65; color: #444; white-space: pre-line; max-height: 90px; overflow: hidden; }
.channel-description.expanded { max-height: none; }
.description-toggle { border: none; background: none; color: #4285F4; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.description-toggle.hidden-btn { display: none; }
.description-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.history-toggle-btn { border: none; background: none; color: #6b6c74; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; transition: color 0.15s ease; }
.history-toggle-btn:hover { color: #4285F4; }

.history-panel { margin-top: 14px; border-top: 1px solid #eceef2; padding-top: 12px; max-height: 340px; overflow-y: auto; }
.history-panel.hidden { display: none; }
.history-entry { padding: 10px 0; border-bottom: 1px solid #f4f5f8; }
.history-entry:last-child { border-bottom: none; }
.history-date { font-size: 11px; color: #9a9ba3; }
.history-field { font-size: 12px; font-weight: 800; color: #333; margin-top: 2px; }
.history-change { font-size: 12px; color: #555; margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.history-from { color: #c0392b; text-decoration: line-through; opacity: 0.7; }
.history-arrow { color: #c4c5cc; }
.history-to { color: #1e7e34; font-weight: 700; }
.no-history { font-size: 12px; color: #9a9ba3; padding: 6px 0; }
.history-avatar-change { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.history-avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #eee; }
.history-banner-change { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.history-banner-row { display: flex; align-items: center; gap: 8px; }
.history-banner-label { font-size: 10px; font-weight: 800; width: 28px; flex-shrink: 0; }
.history-banner-label.from { color: #c0392b; }
.history-banner-label.to { color: #1e7e34; }
.history-banner-img { width: 100%; height: 56px; object-fit: cover; border-radius: 8px; background: #eee; }
.history-desc-change { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.history-desc-block { background: #f8f9fb; border-radius: 10px; padding: 9px 11px; }
.history-desc-label { font-size: 10px; font-weight: 800; }
.history-desc-label.from { color: #c0392b; }
.history-desc-label.to { color: #1e7e34; }
.history-desc-text { margin: 5px 0 0; font-size: 12px; line-height: 1.55; color: #444; white-space: pre-line; }

.tag-editor { background: #fff; border-radius: 18px; border: 1px solid #eceef2; padding: 18px 20px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.22); }
#addTagForm { display: flex; gap: 8px; margin-top: 10px; }
#addTagForm input { flex: 1; padding: 9px 13px; border: 1px solid #e2e3e8; border-radius: 10px; font-size: 12.5px; transition: border-color 0.15s ease; }
#addTagForm input:focus { outline: none; border-color: #4285F4; }
#addTagForm button { padding: 9px 18px; border: none; border-radius: 10px; background: linear-gradient(150deg, #5b93ff, #4285F4); color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(66,133,244,0.3); }

/* ===================================================================
   ===== 채널 상세 페이지 - 뷰스탯 스타일 리뉴얼 (2026-08 추가분) =====
   여기서부터는 channel.html의 새 레이아웃 전용 클래스입니다.
   =================================================================== */
.page-wide { max-width: 1080px; margin: 0 auto; padding: 24px 20px 70px; }

/* ----- 채널 아이덴티티 바 ----- */
.ch-identity-card {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: #fff; border: 1px solid #eceef2; border-radius: 18px;
  padding: 20px 24px; margin-bottom: 14px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.22);
}
.ch-identity-avatar {
  width: 76px; height: 76px; border-radius: 20px; object-fit: cover; background: #eee;
  flex-shrink: 0; box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.ch-identity-info { min-width: 0; margin-right: auto; }
.ch-identity-name { margin: 0 0 5px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.ch-identity-sub { font-size: 13px; color: #6b6c74; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-identity-sub .dot-sep { color: #c4c5cc; }
.ch-identity-visit { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: #4285F4; font-weight: 700; font-size: 12.5px; }
.ch-identity-metrics { display: flex; gap: 26px; flex-wrap: wrap; }
.identity-metric { text-align: right; }
.identity-metric .label { display: block; font-size: 11px; color: #9a9ba3; font-weight: 700; letter-spacing: 0.02em; }
.identity-metric .value { display: block; font-size: 20px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ----- 서브 탭 ----- */
.ch-subnav { display: flex; gap: 4px; background: #fff; border: 1px solid #eceef2; border-radius: 14px; padding: 5px; margin-bottom: 18px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.22); overflow-x: auto; }
.ch-subnav-btn { border: none; background: none; font-size: 13px; font-weight: 700; color: #6b6c74; padding: 9px 16px; border-radius: 10px; cursor: pointer; white-space: nowrap; transition: all 0.15s ease; }
.ch-subnav-btn.active { background: #17181c; color: #fff; }
.ch-subnav-btn.disabled { color: #c4c5cc; cursor: default; }

/* ----- 분석 2단 그리드 ----- */
.analytics-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.analytics-main, .analytics-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 880px) { .analytics-grid { grid-template-columns: 1fr; } }

.mini-stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 560px) { .mini-stats-row { grid-template-columns: 1fr; } }
.mini-stat-card {
  background: #fff; border: 1.5px solid #eceef2; border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 12px 30px -22px rgba(23,24,28,0.3); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; text-align: left;
}
.mini-stat-card:hover { border-color: #d7d9e0; }
.mini-stat-card.active { border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,0.12), 0 12px 30px -22px rgba(23,24,28,0.3); }
.mini-stat-label { font-size: 11px; color: #9a9ba3; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.mini-stat-value { font-size: 21px; font-weight: 800; margin-top: 7px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mini-stat-value.soon { color: #c4c5cc; font-weight: 700; }
.mini-stat-period { font-size: 10.5px; color: #c4c5cc; margin-top: 3px; font-weight: 600; }
.mini-stat-badge-row { margin-top: 10px; }

.change-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 3px 9px 3px 7px; border-radius: 12px; }
.change-badge.up { background: rgba(30,126,52,0.1); color: #1e7e34; }
.change-badge.down { background: rgba(192,57,43,0.1); color: #c0392b; }
.change-badge.big { min-width: 132px; flex-shrink: 0; }
.change-badge svg { display: block; }

/* ----- 메인 차트 카드 ----- */
.chart-toggle-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.chart-view-toggle { display: flex; gap: 14px; }
.chart-view-toggle button { border: none; background: none; font-size: 16px; font-weight: 800; color: #c4c5cc; cursor: pointer; padding: 0; }
.chart-view-toggle button.active { color: #17181c; }
.chart-view-toggle .sep { color: #e2e3e8; font-weight: 400; }

.range-tabs { display: flex; gap: 4px; background: #f4f5f8; padding: 4px; border-radius: 12px; }
.range-tab-btn { border: none; background: none; font-size: 12px; font-weight: 700; color: #6b6c74; padding: 7px 13px; border-radius: 9px; cursor: pointer; transition: all 0.15s ease; }
.range-tab-btn.active { background: #fff; color: #17181c; box-shadow: 0 2px 8px rgba(23,24,28,0.1); }

.chart-summary { margin-top: 18px; }
.chart-summary .big-number { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.chart-summary .change-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; flex-wrap: wrap; }
.change-period { color: #9a9ba3; font-weight: 600; }

.chart-wrap-lg { height: 270px; position: relative; margin-top: 18px; }
.growth-rate-section { margin-top: 22px; }
@media (max-width: 480px) { .growth-rate-grid { grid-template-columns: repeat(2, 1fr); } }

/* ----- 준비 중 플레이스홀더 (최근 영상 / 롱폼·숏폼) ----- */
.soon-placeholder { margin-top: 14px; padding: 30px 16px; text-align: center; border-radius: 12px; background: #f4f5f8; border: 1.5px dashed #eceef2; }
.soon-icon { font-size: 26px; opacity: 0.55; margin-bottom: 8px; }
.soon-text { font-size: 12.5px; color: #9a9ba3; line-height: 1.55; }
.mock-tag { display: inline-block; font-size: 9.5px; font-weight: 800; color: #b98900; background: #fff8e1; border: 1px solid #ffe082; padding: 2px 7px; border-radius: 6px; margin-left: 7px; vertical-align: middle; }

/* ----- 일별 변화량 테이블 ----- */
.table-scroll { overflow-x: auto; margin-top: 14px; }
.day-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.day-table th { text-align: right; color: #9a9ba3; font-weight: 700; font-size: 11px; padding: 8px 12px; border-bottom: 1px solid #eceef2; }
.day-table th:nth-child(1), .day-table th:nth-child(2) { text-align: left; }
.day-table td { text-align: right; padding: 10px 12px; border-bottom: 1px solid #f2f3f5; font-variant-numeric: tabular-nums; }
.day-table td:nth-child(1), .day-table td:nth-child(2) { text-align: left; color: #6b6c74; }
.day-table tr:last-child td { border-bottom: none; }
.day-table .up { color: #1e7e34; font-weight: 700; }
.day-table .down { color: #c0392b; font-weight: 700; }
.day-table .muted { color: #c4c5cc; }
.day-table tr.summary-row td { background: #f4f5f8; font-weight: 800; }
.day-table tr.summary-row:first-of-type td { border-top: 2px solid #eceef2; }

.section-gap { margin-bottom: 14px; }

/* ===== 법적 고지 페이지 (개인정보처리방침 / 서비스 약관) ===== */
.legal-page { max-width: 720px; margin: 0 auto; padding: 36px 20px 70px; }
.legal-header { margin-bottom: 28px; }
.legal-header h1 { font-size: 24px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.legal-header .legal-meta { font-size: 12.5px; color: #9a9ba3; }
.legal-card { background: #fff; border: 1px solid #eceef2; border-radius: 18px; padding: 32px 34px; box-shadow: 0 20px 50px -30px rgba(23,24,28,0.22); }
.legal-card section { margin-bottom: 26px; }
.legal-card section:last-child { margin-bottom: 0; }
.legal-card h2 { font-size: 15.5px; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.legal-card h2 .num { color: #4285F4; font-variant-numeric: tabular-nums; }
.legal-card p { font-size: 13.5px; line-height: 1.75; color: #444; margin: 0 0 10px; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul { margin: 8px 0 10px; padding-left: 20px; }
.legal-card li { font-size: 13.5px; line-height: 1.75; color: #444; margin-bottom: 4px; }
.legal-card table.legal-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.legal-table th, .legal-table td { border: 1px solid #eceef2; padding: 9px 12px; text-align: left; vertical-align: top; }
.legal-table th { background: #f8f9fb; font-weight: 700; color: #333; width: 130px; }
.legal-card a { color: #4285F4; text-decoration: none; }
.legal-card a:hover { text-decoration: underline; }
.legal-note { background: #f8f9fb; border: 1px solid #eceef2; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #6b6c74; line-height: 1.6; }
.legal-placeholder { color: #c0392b; background: #fdecea; padding: 1px 6px; border-radius: 5px; font-weight: 700; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -6px 0 24px; font-size: 12.5px; }
.legal-toc a { color: #6b6c74; text-decoration: none; }
.legal-toc a:hover { color: #4285F4; }
