:root {
  --bg: #f6f6f9; --card: #ffffff; --text: #16161d; --muted: #6b6b7b;
  --line: #e6e6ee; --accent: #6c4cf5; --up: #0b7a3b; --chip: #efeafe;
  --chip-fg: #5534d6; --hot: #c81e43; --hot-bg: #d61f45; --accent-bg: #6c4cf5;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e0e14; --card: #17171f; --text: #ececf3; --muted: #9a9aab;
          --line: #2a2a36; --accent: #a08bff; --up: #3ddc84; --chip: #262040;
          --chip-fg: #a08bff; --hot: #ff6b85; --hot-bg: #d61f45; --accent-bg: #6c4cf5; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
header { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.dday { color: var(--accent); }
.meta { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 26px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.delta { color: var(--up); font-size: 13px; font-weight: 600; }
section { margin-top: 20px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.chart-box { position: relative; height: 280px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.num { text-align: right; white-space: nowrap; }
td a:hover { color: var(--accent); }
.empty { color: var(--muted); font-size: 14px; padding: 24px 0; text-align: center; }
.two { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; } }
.videos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 860px) { .videos { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--line); display: block; }
.video .t { font-size: 13px; font-weight: 600; margin-top: 8px; line-height: 1.35;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video .m { font-size: 12px; color: var(--muted); margin-top: 4px; }
.video:hover .t { color: var(--accent); }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px;
        background: var(--chip); color: var(--chip-fg); margin-right: 4px; }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; position: sticky; top: 0; z-index: 5;
        background: var(--bg); padding: 8px 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; flex: none; }
.tabs a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
          border: 1px solid var(--line); background: var(--card); }
.tabs a.on { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
[data-tab] > section:first-child, [data-tab] > .grid:first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; }
td:first-child, th:first-child { padding-left: 0; white-space: nowrap; }
td:last-child, th:last-child { padding-right: 0; }
.note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.events li:last-child { border-bottom: 0; }
.events .when { min-width: 92px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.events .when b { color: var(--text); }
.events .today { color: var(--accent); font-weight: 800; }
.events .what { font-size: 14px; font-weight: 600; }
.events a.what:hover { color: var(--accent); }
.members { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 860px) { .members { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.member { display: block; }
.member img, .member .nothumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px;
                                background: var(--line); display: block; }
.member .nothumb { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.member .n { font-weight: 800; font-size: 15px; margin-top: 8px; }
.member .c { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.member .t { font-size: 12px; margin-top: 2px; line-height: 1.35;
             display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.member .s { font-size: 12px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
a.member:hover .t { color: var(--accent); }
.goal { margin-top: 2px; }
.goal b { color: var(--text); }
footer { margin-top: 32px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

/* 멤버 카드(버튼) */
button.member { all: unset; display: block; cursor: pointer; }
button.member:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
button.member:hover .t { color: var(--accent); }
.member .more-link { color: var(--accent); font-weight: 600; margin-top: 4px; }

/* 직캠 목록 팝업 */
dialog { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 1px solid var(--line);
         border-radius: 16px; padding: 0 16px 16px; background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dlg-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
            background: var(--card); padding: 16px 0 12px; }
.dlg-head h2 { margin: 0; }
.dlg-close { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px;
             width: 32px; height: 32px; font-size: 14px; cursor: pointer; }

/* 전체 영상 필터 */
.filters { display: grid; gap: 8px; margin-bottom: 14px; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px;
                  padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.era-row button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.era-row button.on, .filters button.on { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.more { display: block; margin: 16px auto 0; border: 1px solid var(--line); background: var(--card); color: var(--text);
        border-radius: 999px; padding: 8px 20px; font: inherit; font-size: 14px; cursor: pointer; }

.thumb { position: relative; }
.thumb .badge { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 700; color: #fff;
                background: rgba(0, 0, 0, .72); padding: 2px 6px; border-radius: 6px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; }
.see-all { font-size: 13px; font-weight: 600; color: var(--accent); }
.dlg-sec + .dlg-sec { margin-top: 20px; }
.dlg-sec h3 { font-size: 14px; margin: 0 0 10px; color: var(--muted); }

/* 멤버 프로필 */
.profile { font-size: 14px; line-height: 1.55; }
.pf-facts { font-weight: 600; margin-bottom: 10px; }
.pf-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.pf-label { color: var(--muted); font-size: 13px; }
.pf-row ul { margin: 0; padding-left: 18px; }
.pf-src { color: var(--muted); font-size: 11px; opacity: .7; text-align: right; margin-top: 20px; }
.pf-src a { text-decoration: underline; }

/* 멤버 탭 */
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.links a:hover { color: var(--accent); border-color: var(--accent); }
.profiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pcard { all: unset; box-sizing: border-box; display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
         border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.pcard:hover { border-color: var(--accent); }
.pcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
          background: var(--chip); color: var(--accent); font-weight: 800; font-size: 20px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
#dlgTitle { display: flex; align-items: center; gap: 12px; }
.dlg-avatar { width: 48px; height: 48px; font-size: 18px; }
.dlg-ko { font-size: 14px; font-weight: 400; color: var(--muted); }
.pinfo .n { font-weight: 800; font-size: 15px; }
.pinfo .c { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.pinfo .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pinfo .more-link { color: var(--accent); font-weight: 600; margin-top: 6px; }

/* 새 영상 */
.thumb .new { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .03em;
              color: #fff; background: var(--hot-bg); padding: 2px 7px; border-radius: 6px; }
.video.is-new img { box-shadow: 0 0 0 2px var(--hot-bg); }
.when-new { color: var(--hot); font-weight: 700; }
.new-count { margin-left: 8px; font-size: 12px; font-weight: 800; color: #fff; background: var(--hot-bg);
             padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }

/* 인스타그램 임베드 */
.ig-row { display: flex; gap: 12px; overflow-x: auto; margin-bottom: 14px; }
.ig-embed { flex: none; width: 326px; max-width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 12px;
            background: #fff; }

/* 생일·서명·역대 프로필 */
.linklike { all: unset; cursor: pointer; font-size: 14px; font-weight: 600; }
.linklike:hover { color: var(--accent); }
.pf-sign { max-width: 220px; max-height: 90px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.pf-history { display: flex; gap: 12px; overflow-x: auto; }
.pf-history figure { margin: 0; flex: none; }
.pf-history img { width: 140px; height: 175px; object-fit: cover; border-radius: 10px; display: block; background: var(--line); }
.pf-history figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 140px; }

/* 앱(PWA) */
.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.install { border: 0; background: var(--accent-bg); color: #fff; font: inherit; font-size: 13px; font-weight: 700;
           padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.install-steps { margin: 0; padding-left: 20px; line-height: 1.9; font-size: 14px; }
#installHelp { width: min(420px, calc(100vw - 32px)); }
/* 노치·홈 인디케이터 영역 */
@supports (padding: env(safe-area-inset-top)) {
  .wrap { padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(48px, env(safe-area-inset-bottom));
          padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
/* 앱으로 열었을 때 */
@media (display-mode: standalone) {
  body { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: contain; }
  .tabs { top: env(safe-area-inset-top, 0); }
}

/* 언어 */
.head-actions { display: flex; gap: 6px; align-items: center; }
.lang { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px;
        padding: 5px 8px; font: inherit; font-size: 12px; }
.muted { color: var(--muted); font-weight: 400; }

/* 응원 */
.votes, .supports { display: grid; gap: 10px; }
.vote, .support { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; font-size: 14px; }
.vote.urgent { border-color: var(--hot); }
.vote.urgent .vote-time { color: var(--hot); font-weight: 700; }
.vote a, .support a { color: var(--accent); font-weight: 600; font-size: 13px; justify-self: start; }
.vote-time { font-size: 13px; }
.chip-on { background: var(--accent-bg); color: #fff; }
.stream { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; }
.links.small a { padding: 3px 10px; font-size: 12px; }
.chart-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.chart-row:last-child { border-bottom: 0; }
.chart-meta { font-size: 14px; }
.chart-meta .rank { margin-left: 8px; font-weight: 800; color: var(--accent); }
.up { color: var(--up); font-weight: 700; font-size: 12px; }
.down { color: var(--hot); font-weight: 700; font-size: 12px; }
.small-chart { height: 140px; margin-top: 6px; }
.linkbtn { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px;
           padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* 영상 아카이브 */
.archive-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.search { flex: 1 1 200px; min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--text);
          border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; }
.sel { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px;
       padding: 8px 10px; font: inherit; font-size: 13px; max-width: 48%; }

/* 입덕 가이드 */
.course { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.course li { position: relative; }
.course .step { position: absolute; z-index: 1; left: -6px; top: -6px; width: 24px; height: 24px; border-radius: 50%;
                background: var(--accent-bg); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.course-note { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.member .tip { color: var(--text); }

/* 푸터 */
footer > div + div { margin-top: 2px; }
.feedback { display: inline-block; margin-bottom: 10px; border: 1px solid var(--accent); color: var(--accent);
            border-radius: 999px; padding: 6px 14px; font-weight: 700; }
[hidden] { display: none !important; }
header .head-right { margin-left: auto; }
.course-note { padding-left: 24px; min-height: 20px; }

/* 스밍·투표 방법 */
.howto { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.howto > summary { cursor: pointer; padding: 12px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; }
.howto > summary::-webkit-details-marker { display: none; }
.howto > summary::after { content: "＋"; color: var(--muted); }
.howto[open] > summary::after { content: "－"; }
.howto-show { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 4px; font-size: 14px; }
.howto-show a { color: var(--accent); font-weight: 600; font-size: 13px; justify-self: start; }
.howto-apps { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.howto-steps { margin: 0; padding: 0 12px 12px 32px; display: grid; gap: 6px; font-size: 14px; }
.muted.small, .note.small { font-size: 12px; }

/* 세계관·앨범 */
.lore p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.albums { display: grid; gap: 8px; }
.album { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 6px; font-size: 14px; }
.tracks { margin: 0; padding-left: 20px; display: grid; gap: 2px; }
#shops { margin-bottom: 10px; }

/* 공식 인스타 피드 */
.ig-feed { display: grid; gap: 8px; }
.feed-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.feed-col { min-width: 0; padding: 0 12px; }
.feed-col:first-child { padding-left: 0; }
.feed-col:last-child { padding-right: 0; }
.feed-col + .feed-col { border-left: 1px solid var(--line); }
.feed-col:only-child { grid-column: 1 / -1; padding: 0; }
.feed-col h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.feed-col .ig-meta .src { display: none; }
.feed-col .ig-post { padding: 10px; }
.feed-col .ig-text { overflow-wrap: anywhere; }
.ig-post { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: inherit; text-decoration: none; }
.ig-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; }
.ig-text { font-size: 14px; line-height: 1.5; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ig-members { display: flex; flex-wrap: wrap; gap: 4px; }

/* 봤어요 */
.seen-btn { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: rgba(255,255,255,.75); font-size: 13px; font-weight: 800; cursor: pointer; }
.video.seen .seen-btn { background: var(--accent-bg); color: #fff; }
.video.seen img { opacity: .55; }
.unseen-btn.on { background: var(--accent-bg); color: #fff; border-color: var(--accent); }

/* 최애 */
.bias .sec-head { gap: 8px; }
.bias .sel { max-width: 50%; }
.bias-bd { font-weight: 700; margin: 4px 0 10px; }
.bias-ig { margin-top: 10px; }
.bias-btn { margin-left: auto; margin-right: 8px; border: 1px solid var(--line); background: none; border-radius: 999px;
  padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.bias-btn.on { color: var(--accent); border-color: var(--accent); }

/* 음방 회차 */
.ep > summary { font-weight: 400; }
.ep .videos { padding: 0 12px 12px; }

/* 기록 */
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline li { position: relative; font-size: 14px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline .tl-record::before, .timeline .tl-debut::before { background: var(--accent-bg); }
.timeline .tl-date { font-size: 12px; color: var(--muted); }
.timeline a { color: inherit; font-weight: 600; }

/* 오늘의 직캠 */
.pick-btn { width: auto; margin: 0; padding: 6px 12px; }
#pick .video { max-width: 360px; }

/* 퀴즈 */
/* 직캠은 주인공이 화면 가운데 → 장면 가운데만 세로로 잘라서 보여주기 (세로 직캠은 딱 영상 부분) */
.quiz-q { font-weight: 700; text-align: center; margin: 0 0 8px; }
.quiz-frame { display: flex; gap: 4px; justify-content: center; max-width: 480px; margin: 0 auto; }
.quiz-cell { position: relative; flex: 1; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 10px; background: var(--line); }
.quiz-img { position: absolute; top: 0; left: 50%; height: 100%; width: auto; max-width: none; transform: translateX(-50%); display: block; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.quiz-opt { padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card, #fff); color: inherit;
  font-size: 15px; font-weight: 700; cursor: pointer; }
.quiz-opt.ok { border-color: #16a34a; background: #16a34a1a; }
.quiz-opt.no { border-color: #ef3b5d; background: #ef3b5d1a; }
.quiz-result { display: grid; gap: 6px; margin-top: 10px; justify-items: start; }
.quiz-result a { color: var(--accent); font-weight: 600; font-size: 13px; }
.quiz-result .more, .quiz-end .more { width: 100%; }
.quiz-end { text-align: center; display: grid; gap: 6px; }
.quiz-big { font-size: 36px; font-weight: 800; }
.quiz-photo { flex: 0 0 min(260px, 70%); aspect-ratio: 3 / 4; }
.quiz-photo .quiz-img { left: 0; width: 100%; height: 100%; transform: none; object-fit: cover; }
.tracks .focus { margin-left: 6px; font-size: 11px; vertical-align: middle; }

/* 직캠 나란히 보기 */
.cmp-open { margin: 0 12px 10px; width: calc(100% - 24px); }
.cmp-pick { display: flex; gap: 8px; align-items: center; justify-content: center; }
.cmp-pick .sel { flex: 1; min-width: 0; }
.cmp-grid { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 720px) { .cmp-grid { grid-template-columns: 1fr 1fr; } }
.cmp-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.cmp-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* 데뷔 전 아카이브 */
.arc-body { padding: 0 12px 12px; }
.arc-month { font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

/* 활동별 사진 */
.era-row { margin-bottom: 10px; }

/* 생일 카드 */
.bday { background: linear-gradient(135deg, #ffe3ec, #efe7ff); }
.bday-card { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; padding: 0; }
.bday-card + .bday-card { margin-top: 10px; }
.bday-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.bday-t { font-size: 18px; font-weight: 800; }
.arc-body .videos, .ep .videos { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
#cmpEp.sel { width: 100%; max-width: none; }

/* 공유 */
.share-btn { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 6px 10px; font-size: 13px;
  font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
#dlgTitle .share-btn { margin-right: 8px; }
#cmpTitle { display: flex; align-items: center; gap: 8px; }
#cmpTitle .share-btn { margin-left: auto; margin-right: 8px; }
.ep-tools { display: flex; justify-content: flex-end; padding: 0 12px 8px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000;
  background: #111; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
@media (max-width: 480px) { #dlgTitle .share-l { display: none; } }
.dlg-ko { white-space: nowrap; }
#dlgTitle { min-width: 0; }
@media (max-width: 480px) { #dlgTitle .bias-l { display: none; } }
.versions { margin: 4px 0 0; padding-left: 18px; }

/* 일정 구분 */
.ev-tabs { margin-bottom: 8px; }
.ev-tabs button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ev-tabs button.on { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.events li.ev-show { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.events li.ev-anniv { box-shadow: inset 3px 0 0 #e8a33d; padding-left: 10px; }
.events li.ev-etc { box-shadow: inset 3px 0 0 var(--line); padding-left: 10px; }
.vote-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* 달력 */
.ev-view { margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.cal-nav { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; width: 32px; height: 32px;
  font-size: 18px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; }
.cal-wd.sun { color: var(--hot); } .cal-wd.sat { color: #3b6fd6; }
.cal-cell { aspect-ratio: 1 / 1; border: 0; background: none; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; padding-top: 6px; gap: 3px; color: var(--text); font: inherit; cursor: pointer; }
.cal-cell.empty { cursor: default; }
.cal-cell.past { color: var(--muted); }
.cal-cell.is-today .cal-d { background: var(--accent-bg); color: #fff; border-radius: 999px; padding: 0 6px; }
.cal-cell.is-sel { background: var(--chip); }
.cal-d { font-size: 13px; font-weight: 600; line-height: 20px; }
.cal-dots { display: flex; gap: 2px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: block; }
.dot-show { background: var(--accent); } .dot-anniv { background: #e8a33d; } .dot-etc { background: var(--muted); }
.cal-sub { margin: 10px 0 2px; }
.cal .events { margin-top: 4px; }
#eventsSection .sec-head { gap: 10px; }
#eventsSection .sec-head .see-all { white-space: nowrap; }
.src { font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; color: #fff; }
.src-ig { background: #c13584; } .src-x { background: #111; }
@media (prefers-color-scheme: dark) { .src-x { background: #444; } }

/* 달력 작게: 칸 높이 고정, PC에선 폭 제한 */
.cal-head { margin: 0 0 4px; }
.cal-head b { font-size: 14px; }
.cal-nav { width: 28px; height: 28px; font-size: 16px; }
.cal-head, .cal-grid { max-width: 420px; margin-left: auto; margin-right: auto; }
.cal-grid { gap: 0; }
.cal-wd { padding: 2px 0; font-size: 10px; }
.cal-cell { aspect-ratio: auto; height: 34px; padding-top: 3px; gap: 1px; border-radius: 8px; }
.cal-d { font-size: 12px; line-height: 18px; }
.cal-cell.is-today .cal-d { padding: 0 5px; }
.dot { width: 5px; height: 5px; }
.cal-sub { margin: 6px 0 0; }

/* 헤더 사진 띠 */
.strip { overflow: hidden; margin: -8px -4px 14px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.strip-track { display: flex; gap: 10px; width: max-content; animation: strip 60s linear infinite; }
.strip:hover .strip-track, .strip:focus-within .strip-track { animation-play-state: paused; }
@keyframes strip { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; } .strip { overflow-x: auto; } }
.strip-m { border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 3px; cursor: pointer; color: var(--muted); font: inherit; }
.strip-m img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
.strip-m span { font-size: 10px; font-weight: 700; letter-spacing: .02em; }

/* 달력 접기 */
.cal-fold { display: block; margin: 4px auto 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }

/* 포토카드 */
#pcTabs { margin-bottom: 10px; }
#pcTabs button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
#pcTabs button.on { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pc { margin: 0; display: grid; gap: 4px; font-size: 12px; font-weight: 700; text-align: center; }
.pc-mem { margin: 8px 0 12px; }
.pc-mem button { padding: 4px 10px; font-size: 12px; }
.pc img { width: 100%; aspect-ratio: 55 / 85; object-fit: cover; border-radius: 8px; background: var(--line); }

/* 달력 칸 안 일정 이름 */
.cal-cell { height: auto; min-height: 52px; padding: 3px 1px 4px; justify-content: flex-start; }
.cal-evs { display: grid; gap: 1px; width: 100%; }
.cal-ev { font-size: 9px; line-height: 13px; font-weight: 700; border-radius: 3px; padding: 0 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-align: center; }
.cal-ev.ev-show { background: var(--chip); color: var(--chip-fg); }
.cal-ev.ev-anniv { background: #fdf0db; color: #8a5a00; }
.cal-ev.ev-etc { background: var(--line); color: var(--text); }
@media (prefers-color-scheme: dark) { .cal-ev.ev-anniv { background: #3a2c12; color: #f3c46b; } }
.cal-more { font-size: 9px; color: var(--muted); font-weight: 700; }
.cal-cell.past .cal-ev { opacity: .6; }
@media (min-width: 720px) { .cal-ev { font-size: 10px; } .cal-head, .cal-grid { max-width: 560px; } }
.cal-ev { padding: 0 1px; letter-spacing: -.02em; }
.cal-cell.is-sel { box-shadow: inset 0 0 0 1px var(--accent); background: var(--chip); }

/* 사이트 사용법 */
.tour-tip { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 4px 4px 4px 12px; border-radius: 12px;
            background: var(--accent-bg); color: #fff; }
.tour-open { flex: 1; text-align: left; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; font-size: 14px;
             padding: 8px 0; cursor: pointer; }
.tour-x { background: none; border: 0; color: inherit; font-size: 14px; width: 36px; height: 36px; cursor: pointer; border-radius: 8px; }
.tour-x:hover, .tour-open:hover { text-decoration: underline; }
.tour-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#tourDlg .tour-list { padding: 4px 0; }
.tour-item { display: grid; grid-template-columns: 32px 1fr; gap: 2px 8px; align-items: start; padding: 10px 12px;
             border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
a.tour-item:hover { border-color: var(--accent); }
.tour-ico { grid-row: span 2; font-size: 20px; line-height: 1.3; text-align: center; }
.tour-item b { font-size: 14px; }
.tour-item span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tour-item .go { color: var(--accent); font-weight: 700; }
.tour-never { text-align: center; margin: 12px 0 0; }
.tour-foot { margin-right: 6px; background: none; font: inherit; cursor: pointer; }
