/* ── 카페 방문자 페이지 + 위젯 공용 스타일 ──
   카페별 디자인 값은 CSS 변수(--c-*)로 주입됨 */
body.cafe-page {
  /* 카페 페이지 공통 콘텐츠 폭 — 헤더·그리드·게시판이 함께 사용 */
  --page-w: min(1500px, 95vw);
  background: var(--c-bg, var(--paper));
  color: var(--c-text, var(--ink));
  background-size: cover; background-attachment: fixed; background-position: center;
}

/* ── 카페 공통 헤더 바 ── */
.cafe-nav {
  display: flex; align-items: center; gap: clamp(8px, 2vw, 18px);
  max-width: var(--page-w, 1080px); margin: 0 auto; padding: 10px 16px;
  flex-wrap: wrap;
}
.cafe-nav-wrap {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-card, var(--card));
  border-bottom: 1px solid var(--line);
}
.cn-main {
  font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; flex-shrink: 0;
}
.cn-main:hover { color: var(--c-primary, var(--brand)); border-color: var(--c-primary, var(--brand)); }
.cn-name { font-family: var(--font-display); font-size: clamp(18px, 3vw, 23px); color: var(--c-primary, var(--brand)); }
.cn-tabs { display: flex; gap: 4px; }
.cn-tab {
  padding: 6px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
}
.cn-tab:hover { background: var(--brand-soft); color: var(--c-primary, var(--brand)); }
.cn-tab.on { background: var(--c-primary, var(--brand)); color: #fff; }
.cn-right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cn-who { font-size: 13px; color: var(--muted); }

/* 카페 소개 문구 (홈 상단) */
.cafe-desc {
  max-width: var(--page-w, 1080px); margin: 0 auto; padding: 14px 16px 0;
  color: var(--muted); font-size: 14px;
}

/* ── 12칸 그리드 캔버스 ── */
.cafe-grid {
  max-width: var(--page-w, 1080px); margin: 0 auto; padding: 12px 16px 60px;
  display: grid;
  /* 24칸 × 16px 행 — 구 12칸×44px의 2배 정밀 격자 (좌표 2배 시 렌더 크기 동일) */
  grid-template-columns: repeat(24, 1fr);
  grid-auto-rows: 16px;
  gap: 12px;
}

/* 위젯 카드 — 기본은 깔끔(장식 없음), 스타일은 위젯 설정에서 선택 */
.widget {
  --wg-c: var(--c-primary, var(--brand));
  background: var(--c-card, var(--card));
  border: 1px solid var(--line);
  border-radius: var(--c-radius, var(--radius));
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.widget-body { flex: 1; overflow: auto; padding: 14px; }

/* 위젯 스타일 변형 (스트리머 선택) */
.wg-style-tab::before, .wg-style-grad::before {
  content: '';
  display: block; height: 5px; flex: 0 0 5px;
}
.wg-style-tab::before { background: var(--wg-c); }
.wg-style-grad::before {
  background: linear-gradient(90deg, var(--wg-c) 0 38%, var(--c-accent, var(--amber)) 38% 52%, transparent 52%);
}
.wg-style-border { border: 2px solid var(--wg-c); }
.wg-style-fill { background: color-mix(in srgb, var(--wg-c) 10%, var(--c-card, var(--card))); }

/* 리치 텍스트 본문 (CKEditor 결과물) */
.rich-content { font-size: 14px; word-break: break-word; }
.rich-content p { margin: 0 0 .6em; }
.rich-content h2, .rich-content h3, .rich-content h4, .rich-content h5 { margin: .8em 0 .4em; line-height: 1.35; }
.rich-content h2 { font-size: 1.5em; }
.rich-content h3 { font-size: 1.28em; }
.rich-content h4 { font-size: 1.12em; }
.rich-content h5 { font-size: 1em; }
.rich-content ul, .rich-content ol { margin: 0 0 .6em; padding-left: 1.4em; }
.rich-content blockquote {
  border-left: 3px solid var(--c-primary, var(--brand));
  margin: .6em 0; padding: .3em .9em; color: var(--muted);
  background: var(--brand-soft); border-radius: 0 8px 8px 0;
}
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-content figure { margin: .6em 0; }
.rich-content figure.image { text-align: center; }
.rich-content figcaption { font-size: 12px; color: var(--muted); }
.rich-content table { border-collapse: collapse; max-width: 100%; margin: .6em 0; }
.rich-content td, .rich-content th { border: 1px solid var(--line); padding: 5px 9px; font-size: 13px; }
.rich-content a { color: var(--c-primary, var(--brand)); text-decoration: underline; }
/* 표는 좁은 화면에서 가로 스크롤로 (본문 자체가 밀리지 않게) */
.rich-content figure.table { overflow-x: auto; }
.rich-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.rich-content pre {
  background: var(--brand-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; overflow-x: auto; font-size: 13px; margin: .7em 0;
}
.rich-content pre code { background: none; padding: 0; }
.rich-content code {
  background: var(--brand-soft); border-radius: 4px; padding: 1px 5px; font-size: .92em;
  font-family: Consolas, 'D2Coding', monospace;
}
.rich-content mark { padding: 0 2px; border-radius: 3px; }
.rich-content .todo-list { list-style: none; padding-left: .2em; }
.rich-content .todo-list li { margin: .2em 0; }
.rich-content .todo-list input[type="checkbox"] { margin-right: 6px; }
/* 영상 임베드 — 인라인 position:absolute는 서버 정화에서 지워지므로 여기서 채움 */
.rich-content figure.media { margin: .8em 0; }
.rich-content div[data-oembed-url] > div { position: relative; }
.rich-content div[data-oembed-url] iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

/* 본문 꾸미기 프리셋 (에디터 '문단 스타일') — common.js CK_STYLES·서버 sanitize와 3중 동기화 */
.rich-content .rc-lead, .ck-content .rc-lead { font-size: 1.2em; font-weight: 700; line-height: 1.6; }
.rich-content .rc-box, .ck-content .rc-box {
  background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; margin: .7em 0;
}
.rich-content .rc-box-pink, .ck-content .rc-box-pink {
  background: #fdf2f8; border: 1px solid #fbcfe8; border-radius: 12px; padding: 14px 16px; margin: .7em 0;
}
.rich-content .rc-notice, .ck-content .rc-notice {
  border-left: 4px solid var(--c-accent, var(--amber)); background: #fffbeb;
  border-radius: 0 10px 10px 0; padding: 12px 16px; margin: .7em 0; font-weight: 600;
}
.rich-content .rc-dashed, .ck-content .rc-dashed {
  border: 2px dashed var(--c-primary, var(--brand)); border-radius: 12px; padding: 14px 16px; margin: .7em 0;
}
.rich-content .rc-center-big, .ck-content .rc-center-big {
  text-align: center; font-size: 1.35em; font-weight: 800; letter-spacing: -.01em; margin: .9em 0;
}
.rich-content .rc-underline, .ck-content .rc-underline {
  display: inline-block; background: linear-gradient(transparent 62%, var(--brand-soft) 62%);
  padding: 0 4px; border-bottom: 3px solid var(--c-primary, var(--brand));
}
.rich-content .rc-tag, .ck-content .rc-tag {
  display: inline-block; background: var(--c-primary, var(--brand)); color: #fff;
  border-radius: 999px; padding: 4px 14px; font-size: 1em;
}
.rich-content .rc-bubble, .ck-content .rc-bubble {
  position: relative; background: var(--brand-soft); border: 0; border-radius: 14px;
  padding: 14px 18px; margin: .7em 0 1.2em; color: inherit;
}
.rich-content .rc-bubble::after, .ck-content .rc-bubble::after {
  content: ''; position: absolute; left: 26px; bottom: -10px;
  border: 10px solid transparent; border-top-color: var(--brand-soft); border-bottom: 0;
}

/* CKEditor 편집 영역 — 넉넉한 작성 공간 + 여러 줄 툴바 */
.ck-editor__editable_inline { min-height: 420px; padding: 14px 18px !important; }
.modal .ck-editor__editable_inline { min-height: 220px; }
.ck.ck-editor__main > .ck-editor__editable { font-size: 15px; line-height: 1.7; }
.ck.ck-toolbar { row-gap: 2px; }
.rich-editor { border-radius: 10px; overflow: hidden; }
.rich-editor-sm .ck-editor__editable_inline { min-height: 200px; }
.rich-count {
  text-align: right; font-size: 12px; color: var(--muted);
  padding: 5px 10px; border: 1px solid var(--ck-color-base-border, var(--line)); border-top: 0;
  border-radius: 0 0 var(--ck-border-radius, 4px) var(--ck-border-radius, 4px);
}
/* CKEditor 드롭다운·풍선이 모달(z-index 1000) 뒤에 숨지 않게.
   변수명이 --ck-z-modal → --ck-z-panel로 바뀌었고, 벤더 CSS가 나중에 로드되므로 :root보다 센 html:root로 지정 */
html:root { --ck-z-panel: 3000; }
/* 모바일: 툴바가 화면을 다 먹지 않게 살짝 압축 */
@media (max-width: 640px) {
  .ck-editor__editable_inline { min-height: 300px; }
  .ck.ck-toolbar .ck-toolbar__items { row-gap: 0; }
}

/* 모바일: 1열 스택 (정렬 순서는 JS가 y,x 순으로 DOM에 배치) */
@media (max-width: 719px) {
  .cafe-grid { display: flex; flex-direction: column; }
  .widget { min-height: 120px; }
  .widget[data-mh] { max-height: 420px; }
  /* 좁은 화면에서 캘린더 셀·글자 최적화 */
  .cal-cell { min-height: 42px; padding: 2px; }
  .cal-evt { font-size: 10px; padding: 1px 3px; }
  .wg-cal-title { font-size: 14px; }
}

/* 태블릿(720~1023px): JS가 위젯을 반폭(12칸)/전폭(24칸)으로 재배열 */
@media (min-width: 720px) and (max-width: 1023px) {
  .cafe-grid { gap: 10px; }
}

/* ── 위젯 내부 공통 ── */
.wg-title { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.wg-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wg-title-row .wg-title { margin-bottom: 0; }
.wg-more { font-size: 12px; color: var(--muted); }
.wg-more:hover { color: var(--c-primary, var(--brand)); }
.wg-chip {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px;
  background: var(--brand-soft); color: var(--c-primary, var(--brand)); font-weight: 600;
}

/* 프로필 */
.wg-profile { text-align: center; }
.wg-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.wg-avatar-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 34px; background: var(--brand-soft); }
.wg-profile-name { font-weight: 800; font-size: 17px; }
.wg-profile-intro { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.wg-profile-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* 공지 */
.wg-notice-body { font-size: 14px; }

/* 캘린더 */
.wg-cal-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.wg-cal-title { font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.cal-dow > div { padding: 2px 0; }
.cal-cell { min-height: 52px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; font-size: 11px; overflow: hidden; }
.cal-empty { border: none; }
.cal-today { border-color: var(--c-primary, var(--brand)); box-shadow: inset 0 0 0 1px var(--c-primary, var(--brand)); }
.cal-day { color: var(--muted); font-weight: 700; }
.cal-evt {
  display: block; width: 100%; text-align: left; border: none; border-radius: 5px;
  padding: 1px 5px; margin-top: 2px; font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 게시판 */
.wg-board-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wg-board-item:last-child { border-bottom: none; }
.wg-board-item:hover .wg-board-title { color: var(--c-primary, var(--brand)); }
.wg-board-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wg-board-title b { color: var(--c-primary, var(--brand)); font-weight: 700; }
.wg-board-meta { color: var(--muted); font-size: 12px; flex-shrink: 0; }

/* 갤러리 */
.wg-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.wg-gallery-thumb { border: none; padding: 0; background: none; border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.wg-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 방명록 */
.wg-gb { display: flex; flex-direction: column; height: 100%; }
.wg-gb-list { flex: 1; overflow: auto; }
.wg-gb-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.wg-gb-head { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.wg-gb-head span { color: var(--muted); font-size: 11px; }
.wg-gb-del { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 11px; }
.wg-gb-del:hover { color: var(--danger); }
.wg-gb-write { display: flex; gap: 6px; margin-top: 8px; align-items: flex-end; }
.wg-gb-write textarea { flex: 1; }
.wg-gb-login { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 0 0; }

/* 투표 */
.wg-poll-opt {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px;
  font-size: 13px; cursor: pointer; overflow: hidden;
}
.wg-poll-opt.mine { border-color: var(--c-primary, var(--brand)); }
.wg-poll-text { position: relative; z-index: 1; flex: 1; }
.wg-poll-pct { position: relative; z-index: 1; font-size: 12px; color: var(--muted); }
.wg-poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand-soft); z-index: 0; }
.wg-poll-opt input { position: relative; z-index: 1; }
.wg-poll-vote { margin-top: 4px; }

/* D-day */
.wg-dday { text-align: center; display: flex; flex-direction: column; justify-content: center; height: 100%; }
.wg-dday-num { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); color: var(--c-primary, var(--brand)); }
.wg-dday-title { font-weight: 700; font-size: 14px; }
.wg-dday-date { font-size: 12px; color: var(--muted); }

/* 링크 모음 */
.wg-link-btn {
  display: block; text-align: center; padding: 10px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 7px; font-size: 14px; font-weight: 600;
}
.wg-link-btn:hover { border-color: var(--c-primary, var(--brand)); background: var(--brand-soft); }

/* 영상 */
.wg-video { position: relative; width: 100%; aspect-ratio: 16/9; }
.wg-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; border-radius: 8px; }

/* 배너 */
.wg-banner { height: 100%; }
.wg-banner a { display: block; height: 100%; }
.wg-banner-img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }

/* 방문자 */
.wg-visitors { text-align: center; }
.wg-vis-row { display: flex; justify-content: space-between; padding: 4px 12px; font-size: 14px; }
.wg-vis-row b { color: var(--c-primary, var(--brand)); }

/* ── 신규 위젯 (v0.3.0) ── */

/* 여백 위젯 — 방문자 페이지에서 카드 자체를 투명하게 */
.widget.wg-ghost { background: transparent; border: none; box-shadow: none; }

/* 섹션 제목 */
.wg-heading { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.wg-heading-title { font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 26px); color: var(--c-primary, var(--brand)); }
.wg-heading-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* 이미지 */
.wg-image { height: 100%; display: flex; flex-direction: column; margin: 0; }
.wg-image img { flex: 1; width: 100%; min-height: 0; border-radius: 8px; }
.wg-image figcaption { font-size: 12px; color: var(--muted); text-align: center; padding-top: 6px; }

/* SNS 모음 */
.wg-sns { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.wg-sns-btn {
  display: flex; align-items: center; gap: 7px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600;
  overflow: hidden; white-space: nowrap;
}
.wg-sns-btn:hover { border-color: var(--c-primary, var(--brand)); background: var(--brand-soft); }
.wg-sns-ico { font-size: 16px; flex-shrink: 0; }

/* 해시태그 */
.wg-tags { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }

/* 라이브 방송 */
.wg-live {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 100%; text-align: center; border-radius: 10px;
  background: color-mix(in srgb, var(--c-primary, var(--brand)) 6%, transparent);
}
.wg-live:hover { background: var(--brand-soft); }
.wg-live-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #fff;
  background: #E5484D; border-radius: 999px; padding: 3px 10px;
}
.wg-live-ico { font-size: 30px; }
.wg-live-name { font-weight: 800; font-size: 15px; }
.wg-live-note { font-size: 12px; color: var(--muted); }
.wg-live-badge-off { background: var(--muted); letter-spacing: .5px; }

/* 치지직 방송 중 카드 — 썸네일 위 그라데이션, 제목·시청자 수 */
.wg-live-on {
  position: relative; overflow: hidden; justify-content: flex-end; align-items: flex-start;
  gap: 4px; padding: 14px; text-align: left; background: #17191c;
}
.wg-live-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wg-live-on::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,0) 70%);
}
.wg-live-on .wg-live-badge, .wg-live-title, .wg-live-meta { position: relative; z-index: 1; }
.wg-live-on .wg-live-badge { position: absolute; top: 12px; left: 12px; z-index: 1; }
.wg-live-title {
  color: #fff; font-weight: 800; font-size: 15px; line-height: 1.35; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wg-live-meta { color: rgba(255,255,255,.85); font-size: 12px; }
.wg-live-pulse { animation: wgLivePulse 1.6s ease-in-out infinite; }
@keyframes wgLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,72,77,.55); }
  60% { box-shadow: 0 0 0 7px rgba(229,72,77,0); }
}
@media (prefers-reduced-motion: reduce) { .wg-live-pulse { animation: none; } }

/* 주간 방송표 */
.wg-tt-row { display: flex; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.wg-tt-row:last-child { border-bottom: none; }
.wg-tt-row.today { background: var(--brand-soft); border-radius: 8px; }
.wg-tt-row.today .wg-tt-day { color: var(--c-primary, var(--brand)); }
.wg-tt-day { font-weight: 800; width: 22px; flex-shrink: 0; text-align: center; }
.wg-tt-val { flex: 1; }
.wg-tt-val i { color: var(--muted); font-style: normal; }

/* 카운트다운 */
.wg-count { text-align: center; display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 2px; }
.wg-count-title { font-weight: 700; font-size: 14px; }
.wg-count-num { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 30px); color: var(--c-primary, var(--brand)); font-variant-numeric: tabular-nums; }

/* 후원 안내 */
.wg-dona { display: flex; flex-direction: column; height: 100%; }
.wg-dona-msg { flex: 1; font-size: 13px; }
.wg-dona-btn { text-align: center; }

/* 목표 게이지 */
.wg-mile { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.wg-mile-bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wg-mile-bar span { display: block; height: 100%; border-radius: 999px; background: var(--c-primary, var(--brand)); transition: width .6s ease; }
.wg-mile-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.wg-mile-meta b { color: var(--c-primary, var(--brand)); }

/* 요즘 하는 게임 */
.wg-game { display: flex; flex-direction: column; height: 100%; }
.wg-game-img { flex: 1; width: 100%; min-height: 0; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.wg-game-name { font-weight: 800; font-size: 15px; }
.wg-game-cmt { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 정보 카드 */
.wg-info-row { display: flex; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wg-info-row:last-child { border-bottom: none; }
.wg-info-k { font-weight: 700; color: var(--muted); width: 34%; flex-shrink: 0; }
.wg-info-v { flex: 1; }

/* 타임라인 */
.wg-tl-list { border-left: 2px solid var(--c-primary, var(--brand)); margin-left: 5px; padding-left: 14px; }
.wg-tl-item { position: relative; padding-bottom: 12px; font-size: 13px; }
.wg-tl-item::before {
  content: ''; position: absolute; left: -19px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--c-primary, var(--brand));
}
.wg-tl-when { font-size: 12px; font-weight: 700; color: var(--c-primary, var(--brand)); }

/* 자주 묻는 질문 */
.wg-faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; font-size: 13px; }
.wg-faq-item summary { cursor: pointer; font-weight: 700; padding: 5px 2px; }
.wg-faq-item summary:hover { color: var(--c-primary, var(--brand)); }
.wg-faq-a { padding: 4px 2px 8px 14px; color: var(--muted); }

/* 카페 규칙 */
.wg-rules-list { margin: 0; padding-left: 1.4em; font-size: 13px; }
.wg-rules-list li { margin-bottom: 6px; }

/* 음악 */
.wg-music-frame { width: 100%; height: 100%; border: none; border-radius: 10px; }

/* 지도 */
.wg-map { display: flex; flex-direction: column; height: 100%; }
.wg-map iframe { flex: 1; width: 100%; min-height: 0; border: none; border-radius: 8px; }
.wg-map-cap { font-size: 12px; color: var(--muted); padding-top: 6px; text-align: center; }

/* 오늘의 한마디 */
.wg-quote { display: flex; flex-direction: column; justify-content: center; height: 100%; text-align: center; }
.wg-quote-mark { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--c-primary, var(--brand)); }
.wg-quote-text { font-size: 14px; font-weight: 600; }
.wg-quote-author { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 전광판 */
.wg-marquee { overflow: hidden; height: 100%; display: flex; align-items: center; }
.wg-marquee-track {
  display: flex; width: max-content; white-space: nowrap;
  animation: wg-marquee-move linear infinite;
}
.wg-marquee-track span { padding-right: 60px; font-weight: 700; font-size: clamp(14px, 1.8vw, 18px); color: var(--c-primary, var(--brand)); }
@keyframes wg-marquee-move { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .wg-marquee-track { animation: none; }
}

/* 시계 */
.wg-clock { text-align: center; display: flex; flex-direction: column; justify-content: center; height: 100%; }
.wg-clock-time { font-family: var(--font-display); font-size: clamp(24px, 3vw, 36px); color: var(--c-primary, var(--brand)); font-variant-numeric: tabular-nums; }
.wg-clock-date { font-size: 13px; color: var(--muted); }
.wg-clock-title { font-size: 13px; font-weight: 700; margin-top: 4px; }

/* 시간대 인사말 */
.wg-greet { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; font-size: clamp(15px, 1.8vw, 18px); font-weight: 700; }
.wg-greet-ico { font-size: 26px; }

/* 오늘의 운세 */
.wg-fortune { display: flex; flex-direction: column; height: 100%; }
.wg-fortune-text { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; font-weight: 600; }
.wg-fortune-empty { color: var(--muted); font-weight: 400; font-size: 13px; }
.wg-fortune-hint { font-size: 11px; color: var(--muted); text-align: center; }
.wg-fortune-btn { align-self: center; }

/* 랜덤 뽑기 */
.wg-pick { display: flex; flex-direction: column; height: 100%; }
.wg-pick-result {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: clamp(16px, 2vw, 20px); font-weight: 800; color: var(--c-primary, var(--brand));
}
.wg-pick-result.done { animation: wg-pick-pop .5s ease; }
@keyframes wg-pick-pop { 30% { transform: scale(1.25); } }
.wg-pick-btn { align-self: center; }
@media (prefers-reduced-motion: reduce) {
  .wg-pick-result.done { animation: none; }
}

/* ── 팝업 ── */
.popup-card { max-width: 400px; }
.popup-card img { border-radius: 10px; margin-bottom: 10px; }
.popup-card .popup-body { font-size: 14px; }
.popup-card .popup-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 16px;
}
.popup-card .popup-today { font-size: 12px; color: var(--muted); background: none; border: none; }
.popup-card .popup-today:hover { color: var(--ink); text-decoration: underline; }

/* ══════ 신규 위젯 (v0.7.0) ══════ */

/* ── 기본 확장 ── */
.wg-divider { display: flex; align-items: center; justify-content: center; height: 100%; }
.wg-divider-line { width: 100%; border-top: 2px solid var(--line); }
.wg-divider-glyphs { color: var(--c-primary, var(--brand)); font-size: 15px; letter-spacing: 4px; white-space: nowrap; overflow: hidden; }

.wg-bigbtn-wrap { display: flex; align-items: center; justify-content: center; height: 100%; }
.wg-bigbtn {
  display: block; width: 100%; text-align: center; padding: clamp(12px, 2vh, 20px);
  border-radius: 12px; font-size: clamp(15px, 1.8vw, 18px); font-weight: 800;
  background: var(--c-primary, var(--brand)); color: #fff;
}
.wg-bigbtn:hover { filter: brightness(1.08); }
.wg-bigbtn.outline { background: transparent; color: var(--c-primary, var(--brand)); border: 2px solid var(--c-primary, var(--brand)); }

.wg-linkcard { display: flex; flex-direction: column; height: 100%; border-radius: 10px; overflow: hidden; }
.wg-linkcard-img { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.wg-linkcard-body { padding: 10px 4px 0; }
.wg-linkcard-title { font-weight: 800; font-size: 15px; }
a.wg-linkcard:hover .wg-linkcard-title { color: var(--c-primary, var(--brand)); }
.wg-linkcard-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── 방송·일정 확장 ── */
.wg-anniv-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.wg-anniv-row:last-child { border-bottom: none; }
.wg-anniv-dday { color: var(--c-primary, var(--brand)); font-variant-numeric: tabular-nums; }
.wg-anniv-dday.today { background: var(--c-primary, var(--brand)); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 12px; }

.wg-cmd-row { display: flex; gap: 9px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.wg-cmd-row:last-child { border-bottom: none; }
.wg-cmd-key {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 700;
  background: var(--brand-soft); color: var(--c-primary, var(--brand));
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; flex-shrink: 0;
}
.wg-cmd-desc { color: var(--muted); }

.wg-status { display: flex; align-items: center; justify-content: center; gap: 12px; height: 100%; }
.wg-status-ico { font-size: 30px; }
.wg-status-name { font-size: 14px; }
.wg-status-name b { color: var(--c-primary, var(--brand)); }
.wg-status-msg { font-size: 12px; color: var(--muted); margin-top: 2px; }

.wg-chant-row { padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wg-chant-row:last-child { border-bottom: none; }
.wg-chant-part { display: block; font-size: 11px; color: var(--muted); }
.wg-chant-call { color: var(--c-primary, var(--brand)); font-size: 14px; }

.wg-credits { display: flex; flex-direction: column; height: 100%; }
.wg-credits-title { font-weight: 800; font-size: 15px; text-align: center; margin-bottom: 8px; }
.wg-credits-stage { flex: 1; overflow: hidden; position: relative; }
.wg-credits-roll { animation: wg-credits-move linear infinite; }
@keyframes wg-credits-move { from { transform: translateY(100%); } to { transform: translateY(-100%); } }
.wg-credits-name { text-align: center; font-size: 14px; padding: 5px 0; }
.wg-credits-end { color: var(--c-primary, var(--brand)); font-weight: 800; }

/* ── 소통·참여 확장 ── */
.wg-chatlog-box { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px; }
.wg-chatlog-line { padding: 3px 0; display: flex; gap: 7px; align-items: baseline; }
.wg-chatlog-line b { flex-shrink: 0; }

.wg-versus { display: flex; flex-direction: column; height: 100%; justify-content: center; gap: 8px; }
.wg-versus-q { text-align: center; font-weight: 800; font-size: 15px; }
.wg-versus-arena { display: flex; align-items: center; gap: 10px; }
.wg-versus-side {
  flex: 1; padding: 14px 8px; border: 2px solid var(--line); border-radius: 12px;
  font-size: 14px; font-weight: 700; background: var(--c-card, var(--card)); cursor: pointer;
}
.wg-versus-side:hover { border-color: var(--c-primary, var(--brand)); }
.wg-versus-side.picked { border-color: var(--c-primary, var(--brand)); background: var(--brand-soft); color: var(--c-primary, var(--brand)); }
.wg-versus-vs { font-family: var(--font-display); font-weight: 800; color: var(--c-accent, var(--amber)); }
.wg-versus-hint { text-align: center; font-size: 11px; color: var(--muted); }

/* ── 미디어 확장 ── */
.wg-slide { position: relative; height: 100%; border-radius: 10px; overflow: hidden; }
.wg-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.wg-slide-img.on { opacity: 1; }
.wg-slide-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 1; }
.wg-slide-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.wg-slide-dot.on { background: #fff; }

.wg-ba { position: relative; height: 100%; border-radius: 10px; overflow: hidden; }
.wg-ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wg-ba-handle { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.4); transform: translateX(-50%); pointer-events: none; }
.wg-ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.wg-ba-label { position: absolute; bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; padding: 2px 9px; pointer-events: none; }
.wg-ba-la { left: 8px; } .wg-ba-lb { right: 8px; }

/* ── 꾸미기·장식 ── */
.wg-sticker { display: flex; align-items: center; justify-content: center; height: 100%; line-height: 1; }

.wg-emojiart { display: flex; align-items: center; justify-content: center; height: 100%; white-space: pre; text-align: center; font-size: clamp(14px, 2vw, 22px); line-height: 1.25; overflow: auto; }

.wg-neon { display: flex; align-items: center; justify-content: center; height: 100%; background: #14121e; border-radius: 10px; }
.wg-neon-text {
  font-family: var(--font-display); font-size: clamp(18px, 2.6vw, 30px); color: var(--neon, #ff5ec4);
  text-shadow: 0 0 6px var(--neon), 0 0 18px var(--neon), 0 0 40px var(--neon);
  animation: wg-neon-flicker 3.2s infinite;
}
@keyframes wg-neon-flicker { 0%, 100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: .55; } 94% { opacity: 1; } 97% { opacity: .75; } 98% { opacity: 1; } }

.wg-rainbow { display: flex; align-items: center; justify-content: center; height: 100%; }
.wg-rainbow-text {
  font-weight: 800; font-size: clamp(16px, 2.2vw, 24px);
  background: linear-gradient(90deg, #ff5e7e, #ffb14d, #ffe14d, #6de37b, #5cc9ff, #b385ff, #ff5e7e);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wg-rainbow-move 4s linear infinite;
}
@keyframes wg-rainbow-move { to { background-position: 200% 0; } }

.wg-sparkle { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; overflow: hidden; }
.wg-sparkle-text { font-weight: 800; font-size: clamp(15px, 2vw, 22px); color: var(--c-primary, var(--brand)); }
.wg-sparkle-star { position: absolute; top: 12%; color: var(--c-accent, var(--amber)); font-size: 13px; animation: wg-sparkle-tw 1.8s ease-in-out infinite; }
@keyframes wg-sparkle-tw { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.2); } }

.wg-type { display: flex; align-items: center; justify-content: center; height: 100%; font-family: ui-monospace, Consolas, monospace; font-size: clamp(14px, 1.9vw, 19px); font-weight: 600; }
.wg-type-cursor { color: var(--c-primary, var(--brand)); animation: wg-blink 1s steps(1) infinite; }
@keyframes wg-blink { 50% { opacity: 0; } }

.wg-ribbon { display: flex; align-items: center; justify-content: center; height: 100%; }
.wg-ribbon-body {
  position: relative; background: var(--c-primary, var(--brand)); color: #fff;
  font-weight: 800; font-size: clamp(14px, 1.9vw, 19px); padding: 10px 26px;
  border-radius: 4px; box-shadow: var(--shadow);
}
.wg-ribbon-body::before, .wg-ribbon-body::after {
  content: ''; position: absolute; top: 7px; border: 12px solid color-mix(in srgb, var(--c-primary, var(--brand)) 75%, #000); z-index: -1;
}
.wg-ribbon-body::before { left: -16px; border-left-color: transparent; }
.wg-ribbon-body::after { right: -16px; border-right-color: transparent; }

.wg-postit {
  position: relative; height: 100%; padding: 22px 14px 14px; border-radius: 3px;
  box-shadow: 2px 3px 8px rgba(0,0,0,.16); transform: rotate(-1.5deg); color: #4a4633;
}
.wg-postit-text { font-size: 14px; line-height: 1.55; overflow: auto; height: 100%; }
.wg-postit-tape {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 64px; height: 18px; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.07);
}

.wg-pola { position: relative; height: 100%; background: #fff; padding: 10px 10px 0; box-shadow: 3px 4px 12px rgba(0,0,0,.2); display: flex; flex-direction: column; }
.wg-pola img { flex: 1; width: 100%; min-height: 0; object-fit: cover; }
.wg-pola-cap { text-align: center; padding: 8px 2px; font-size: 13px; color: #555; min-height: 32px; }

.wg-strip { height: 100%; background: #1b1b21; padding: 10px; display: flex; flex-direction: column; gap: 7px; border-radius: 4px; box-shadow: 3px 4px 12px rgba(0,0,0,.25); }
.wg-strip img { flex: 1; width: 100%; min-height: 0; object-fit: cover; }
.wg-strip-cap { text-align: center; color: #ddd; font-size: 11px; letter-spacing: 1px; }

.wg-ticket { display: flex; height: 100%; border: 2px dashed var(--c-primary, var(--brand)); border-radius: 12px; overflow: hidden; }
.wg-ticket-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 16px; }
.wg-ticket-title { font-family: var(--font-display); font-size: clamp(15px, 2vw, 20px); color: var(--c-primary, var(--brand)); }
.wg-ticket-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wg-ticket-stub {
  display: flex; align-items: center; justify-content: center; padding: 0 14px;
  border-left: 2px dashed var(--c-primary, var(--brand)); background: var(--brand-soft);
  font-weight: 800; font-size: 13px; color: var(--c-primary, var(--brand)); writing-mode: vertical-rl;
}

.wg-stamp { display: flex; align-items: center; justify-content: center; height: 100%; }
.wg-stamp span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: min(100%, 110px); aspect-ratio: 1; border-radius: 50%;
  border: 3px double #d04a4a; color: #d04a4a; font-weight: 800; font-size: 13px;
  transform: rotate(-14deg); padding: 8px; opacity: .9;
}

.wg-speech { display: flex; align-items: center; gap: 10px; height: 100%; }
.wg-speech-char { font-size: clamp(30px, 4vw, 44px); }
.wg-speech-bubble {
  position: relative; background: var(--brand-soft); border-radius: 14px; padding: 10px 14px;
  font-size: 14px; font-weight: 600;
}
.wg-speech-bubble::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  border: 8px solid transparent; border-right-color: var(--brand-soft); border-left: none;
}

.wg-barcode { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 6px; }
.wg-barcode-bars { display: flex; gap: 2px; align-items: stretch; height: 42%; }
.wg-barcode-bars span { background: var(--c-text, var(--ink)); }
.wg-barcode-text { font-family: ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: 2px; color: var(--muted); }

.wg-cassette { height: 100%; background: #2e2a3a; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wg-cassette-label { background: #f5eede; border-radius: 5px; padding: 6px 9px; font-size: 12px; font-weight: 700; color: #444; display: flex; gap: 7px; align-items: center; overflow: hidden; white-space: nowrap; }
.wg-cassette-side { background: #d04a4a; color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 11px; flex-shrink: 0; }
.wg-cassette-window { flex: 1; background: #1c1926; border-radius: 6px; display: flex; align-items: center; justify-content: space-around; padding: 6px; }
.wg-cassette-reel { width: 26px; height: 26px; border-radius: 50%; border: 4px dashed #b7b0cf; animation: wg-spin 2.4s linear infinite; }
.wg-cassette-reel.slow { animation-duration: 3.6s; }
.wg-cassette-tape { flex: 1; height: 3px; background: #6b6383; margin: 0 6px; }
@keyframes wg-spin { to { transform: rotate(360deg); } }

.wg-vinyl { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 8px; }
.wg-vinyl-disc {
  width: min(72%, 130px); aspect-ratio: 1; border-radius: 50%;
  background: repeating-radial-gradient(circle, #23232a 0 3px, #2d2d36 3px 6px);
  display: flex; align-items: center; justify-content: center;
  animation: wg-spin 5s linear infinite;
}
.wg-vinyl-center { width: 38%; aspect-ratio: 1; border-radius: 50%; background: var(--c-primary, var(--brand)); color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 15px; }
.wg-vinyl-center img { width: 100%; height: 100%; object-fit: cover; }
.wg-vinyl-title { font-size: 13px; font-weight: 700; text-align: center; }

.wg-lights { display: flex; align-items: center; justify-content: space-around; height: 100%; border-top: 2px solid color-mix(in srgb, var(--c-text, var(--ink)) 25%, transparent); border-radius: 2px; }
.wg-lights-bulb {
  width: 13px; height: 17px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--bulb); margin-top: 4px;
  animation: wg-lights-glow 1.6s ease-in-out infinite;
}
@keyframes wg-lights-glow { 0%, 100% { filter: brightness(.75); box-shadow: none; } 50% { filter: brightness(1.15); box-shadow: 0 0 10px var(--bulb); } }

.wg-window { display: flex; flex-direction: column; height: 100%; }
.wg-window-sky { position: relative; flex: 1; border: 6px solid #8a6b4f; border-radius: 8px; overflow: hidden; }
.wg-window-bar-h { position: absolute; left: 0; right: 0; top: 50%; height: 5px; background: #8a6b4f; }
.wg-window-bar-v { position: absolute; top: 0; bottom: 0; left: 50%; width: 5px; background: #8a6b4f; }
.wg-window-sun { position: absolute; top: 14%; right: 16%; width: 26px; height: 26px; border-radius: 50%; background: #FFE14D; box-shadow: 0 0 18px #ffe14daa; }
.wg-window-moon { position: absolute; top: 12%; right: 18%; width: 22px; height: 22px; border-radius: 50%; background: #FFF6D8; box-shadow: 0 0 14px #fff6d888; }
.wg-window-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: wg-sparkle-tw 2.2s ease-in-out infinite; }
.wg-window-sill { text-align: center; font-size: 12px; color: var(--muted); padding-top: 7px; }

.wg-candle { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 6px; }
.wg-candle-emoji { font-size: clamp(30px, 4vw, 44px); animation: wg-candle-sway 2.6s ease-in-out infinite; }
.wg-candle-glow { position: absolute; top: 22%; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, rgba(255,190,80,.4), transparent 70%); animation: wg-candle-glowp 2.6s ease-in-out infinite; }
.wg-candle.fire .wg-candle-glow { background: radial-gradient(circle, rgba(255,120,50,.45), transparent 70%); }
.wg-candle-text { font-size: 13px; font-weight: 600; }
@keyframes wg-candle-sway { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.05); } }
@keyframes wg-candle-glowp { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

.wg-disco { position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; overflow: hidden; }
.wg-disco-string { width: 2px; height: 12px; background: var(--muted); }
.wg-disco-ball { font-size: clamp(30px, 4vw, 46px); animation: wg-disco-swing 3s ease-in-out infinite; }
.wg-disco-spark { position: absolute; top: 45%; font-size: 12px; color: var(--c-accent, var(--amber)); animation: wg-sparkle-tw 1.4s ease-in-out infinite; }
.wg-disco-text { margin-top: auto; font-weight: 800; font-size: 13px; letter-spacing: 2px; color: var(--c-primary, var(--brand)); }
@keyframes wg-disco-swing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

.wg-parti { position: relative; height: 100%; overflow: hidden; border-radius: 10px; }
.wg-parti-p { position: absolute; top: -14%; animation: wg-parti-fall linear infinite; opacity: .85; }
.wg-parti.rise .wg-parti-p { top: auto; bottom: -14%; animation-name: wg-parti-rise; }
.wg-parti-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: clamp(15px, 2vw, 21px); pointer-events: none;
}
@keyframes wg-parti-fall { to { transform: translateY(320px) rotate(180deg); } }
@keyframes wg-parti-rise { to { transform: translateY(-320px); } }

.wg-aqua { position: relative; height: 100%; border-radius: 10px; overflow: hidden; background: linear-gradient(to bottom, #BDE7F5, #7FC4E8); }
.wg-aqua-fish { position: absolute; left: -30px; font-size: 21px; animation: wg-aqua-swim linear infinite; }
.wg-aqua-weed { position: absolute; bottom: 2px; left: 8px; font-size: 19px; }
.wg-aqua-bubble { position: absolute; bottom: -8px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8); animation: wg-aqua-up 4s linear infinite; }
@keyframes wg-aqua-swim {
  0% { transform: translateX(0) scaleX(1); }
  49% { transform: translateX(min(88vw, 640px)) scaleX(1); }
  50% { transform: translateX(min(88vw, 640px)) scaleX(-1); }
  100% { transform: translateX(0) scaleX(-1); }
}
@keyframes wg-aqua-up { to { transform: translateY(-160px); opacity: 0; } }

.wg-retro { height: 100%; display: flex; flex-direction: column; border: 2px solid #9a9ab0; border-radius: 6px; overflow: hidden; box-shadow: 3px 3px 0 rgba(0,0,0,.15); }
.wg-retro-bar { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, #35399f, #7a7fd9); color: #fff; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.wg-retro-btns i { font-style: normal; background: #d6d6e2; color: #333; border: 1px solid #888; font-size: 9px; padding: 0 4px; margin-left: 3px; }
.wg-retro-body { flex: 1; background: #ececf4; color: #333; padding: 11px; font-size: 13px; overflow: auto; }

.wg-term { height: 100%; display: flex; flex-direction: column; background: #101418; border-radius: 8px; overflow: hidden; }
.wg-term-bar { display: flex; gap: 5px; padding: 8px 10px; background: #1c2229; }
.wg-term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.wg-term-bar i:nth-child(2) { background: #febc2e; }
.wg-term-bar i:nth-child(3) { background: #28c840; }
.wg-term-body { flex: 1; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: #5cff8a; overflow: auto; }
.wg-term-line { padding: 2px 0; word-break: break-all; }
.wg-term-prompt { color: #4dc9ff; }
.wg-term-cursor { animation: wg-blink 1s steps(1) infinite; }

.wg-construct {
  display: flex; align-items: center; justify-content: center; gap: 12px; height: 100%;
  border: 4px solid; border-image: repeating-linear-gradient(45deg, #f5c518 0 12px, #23211c 12px 24px) 4;
}
.wg-construct-ico { font-size: 24px; animation: wg-blink 1.4s steps(1) infinite; }
.wg-construct-text { font-weight: 800; font-size: clamp(13px, 1.8vw, 16px); }

.wg-menu { height: 100%; background: #2f3a33; border-radius: 10px; padding: 14px; color: #f2ead9; overflow: auto; }
.wg-menu-title { text-align: center; font-family: var(--font-display); font-size: 17px; border-bottom: 1px dashed #f2ead966; padding-bottom: 8px; margin-bottom: 9px; }
.wg-menu-row { display: flex; align-items: baseline; gap: 7px; padding: 5px 0; font-size: 13px; }
.wg-menu-dots { flex: 1; border-bottom: 1px dotted #f2ead955; }
.wg-menu-price { font-weight: 700; }

.wg-books-shelf { display: flex; align-items: flex-end; gap: 3px; padding: 0 4px; }
.wg-books-spine {
  flex: 1; min-width: 0; border-radius: 3px 3px 0 0; color: #fff; font-size: 10px; font-weight: 700;
  writing-mode: vertical-rl; padding: 8px 0; text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.wg-books-board { height: 7px; background: #8a6b4f; border-radius: 3px; }

.wg-stat-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.wg-stat-name { width: 32%; flex-shrink: 0; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wg-stat-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wg-stat-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-primary, var(--brand)), var(--c-accent, var(--amber))); }
.wg-stat-val { font-variant-numeric: tabular-nums; color: var(--c-primary, var(--brand)); width: 26px; text-align: right; }

.wg-loading { display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 8px; }
.wg-loading-label { font-size: 13px; font-weight: 600; }
.wg-loading-label b { color: var(--c-primary, var(--brand)); }
.wg-loading-track { height: 16px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wg-loading-fill {
  display: block; height: 100%; border-radius: 999px;
  background: repeating-linear-gradient(45deg, var(--c-primary, var(--brand)) 0 10px, color-mix(in srgb, var(--c-primary, var(--brand)) 70%, #fff) 10px 20px);
  background-size: 28px 100%; animation: wg-loading-move 1s linear infinite;
}
@keyframes wg-loading-move { to { background-position: 28px 0; } }

.wg-podium-stage { display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: calc(100% - 34px); }
.wg-podium-col { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 30%; }
.wg-podium-name { font-size: 12px; font-weight: 700; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.wg-podium-block { width: 100%; display: flex; align-items: flex-start; justify-content: center; font-size: 22px; padding-top: 6px; background: var(--brand-soft); border-radius: 8px 8px 0 0; }
.wg-podium-col.first .wg-podium-block { height: 74px; background: color-mix(in srgb, #FFD24D 40%, var(--brand-soft)); }
.wg-podium-col.second .wg-podium-block { height: 52px; }
.wg-podium-col.third .wg-podium-block { height: 38px; }

.wg-fav { display: flex; flex-direction: column; height: 100%; text-align: center; }
.wg-fav-frame {
  flex: 1; min-height: 0; border-radius: 12px; overflow: hidden;
  border: 3px solid transparent;
  background: linear-gradient(var(--c-card, var(--card)), var(--c-card, var(--card))) padding-box,
    linear-gradient(135deg, #ff9ac4, #ffd24d, #9ac8ff) border-box;
}
.wg-fav-frame img { width: 100%; height: 100%; object-fit: cover; }
.wg-fav-empty { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 38px; }
.wg-fav-name { font-weight: 800; font-size: 15px; margin-top: 8px; }
.wg-fav-reason { font-size: 12px; color: var(--muted); margin-top: 3px; }

.wg-achv-row { display: flex; align-items: center; gap: 9px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.wg-achv-row:last-child { border-bottom: none; }
.wg-achv-row.done { color: var(--c-text, var(--ink)); font-weight: 600; }
.wg-achv-ico { flex-shrink: 0; }

.wg-check-row { display: flex; align-items: center; gap: 8px; padding: 5px 2px; font-size: 13px; }
.wg-check-row.done { color: var(--muted); text-decoration: line-through; }

.wg-daysheet { height: 100%; display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-align: center; }
.wg-daysheet-head { width: 100%; background: #d04a4a; color: #fff; font-weight: 800; font-size: 13px; padding: 6px 0; }
.wg-daysheet-num { font-family: var(--font-display); font-size: clamp(38px, 6vw, 58px); line-height: 1.1; margin-top: auto; }
.wg-daysheet-num.red { color: #d04a4a; }
.wg-daysheet-num.blue { color: #3a6fd8; }
.wg-daysheet-dow { font-size: 14px; font-weight: 700; margin-bottom: auto; }
.wg-daysheet-note { font-size: 11px; color: var(--muted); padding: 0 8px 10px; }

.wg-flip { display: flex; align-items: center; justify-content: center; gap: 7px; height: 100%; }
.wg-flip i { font-style: normal; font-weight: 800; color: var(--muted); }
.wg-flip-card {
  background: #23222b; color: #fff; font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px); font-variant-numeric: tabular-nums;
  padding: 8px 12px; border-radius: 9px; position: relative; overflow: hidden;
}
.wg-flip-card::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255,255,255,.22); }
.wg-flip-card.tickflip { animation: wg-flip-tick .45s ease; }
@keyframes wg-flip-tick { 0% { transform: rotateX(-70deg); } 100% { transform: rotateX(0); } }

.wg-moon { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 4px; background: linear-gradient(to bottom, #171c38, #2a3158); border-radius: 10px; color: #eef1ff; }
.wg-moon-emoji { font-size: clamp(30px, 4vw, 44px); }
.wg-moon-name { font-weight: 700; font-size: 14px; }
.wg-moon-note { font-size: 11px; color: #b8c0e8; }

.wg-moodw { display: flex; align-items: center; justify-content: center; gap: 12px; height: 100%; }
.wg-moodw-ico { font-size: 32px; }
.wg-moodw-name { font-size: 14px; }
.wg-moodw-name b { color: var(--c-primary, var(--brand)); }
.wg-moodw-msg { font-size: 12px; color: var(--muted); margin-top: 2px; }

.wg-cake { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 4px; text-align: center; }
.wg-cake-candles { font-size: 19px; cursor: pointer; min-height: 26px; }
.wg-cake-flame { display: inline-block; animation: wg-candle-sway 1.8s ease-in-out infinite; }
.wg-cake-body { font-size: clamp(34px, 5vw, 50px); line-height: 1.15; }
.wg-cake-text { font-size: 13px; font-weight: 600; }

.wg-fw { position: relative; height: 100%; background: #171c38; border-radius: 10px; overflow: hidden; cursor: pointer; }
.wg-fw-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #dfe5ff; font-weight: 700; font-size: 14px; pointer-events: none; }
.wg-fw-p { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; animation: wg-fw-burst .85s ease-out forwards; }
@keyframes wg-fw-burst { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

.wg-heart { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 6px; overflow: hidden; }
.wg-heart-btn { border: none; background: none; font-size: clamp(32px, 4.5vw, 46px); cursor: pointer; transition: transform .12s ease; padding: 0; line-height: 1; }
.wg-heart-btn:active { transform: scale(1.25); }
.wg-heart-count { font-size: 12px; color: var(--muted); }
.wg-heart-count b { color: var(--c-primary, var(--brand)); }
.wg-heart-text { font-size: 12px; }
.wg-heart-float { position: absolute; bottom: 38%; font-size: 18px; pointer-events: none; animation: wg-heart-up 1.1s ease-out forwards; }
@keyframes wg-heart-up { to { transform: translateY(-64px) scale(1.4); opacity: 0; } }

/* ── 재미·운세 확장 ── */
.wg-tarot { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 8px; }
.wg-tarot-card {
  flex: 1; min-height: 0; width: min(62%, 110px); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid var(--c-primary, var(--brand)); font-size: 30px;
}
.wg-tarot-card.back { background: repeating-linear-gradient(45deg, var(--brand-soft) 0 8px, transparent 8px 16px); cursor: pointer; }
.wg-tarot-card.back:hover { transform: translateY(-2px); }
.wg-tarot-card.open { animation: wg-tarot-open .5s ease; }
@keyframes wg-tarot-open { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.wg-tarot-emoji { font-size: clamp(28px, 3.6vw, 40px); }
.wg-tarot-name { font-size: 13px; font-weight: 800; color: var(--c-primary, var(--brand)); }
.wg-tarot-text { text-align: center; font-size: 13px; }

.wg-ball { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 8px; }
.wg-ball-q { width: 100%; }
.wg-ball-orb { border: none; background: none; font-size: clamp(34px, 4.6vw, 48px); cursor: pointer; padding: 0; line-height: 1; }
.wg-ball-orb.shake { animation: wg-ball-shake .8s ease; }
@keyframes wg-ball-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-10deg); } 80% { transform: rotate(6deg); } }
.wg-ball-a { text-align: center; font-size: 13px; font-weight: 600; min-height: 20px; }

.wg-compli, .wg-todayme, .wg-petname { display: flex; flex-direction: column; height: 100%; }
.wg-compli-text, .wg-todayme-text, .wg-petname-out {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-size: 14px; gap: 2px;
}
.wg-todayme-text b, .wg-petname-out b { color: var(--c-primary, var(--brand)); font-size: 17px; }
.wg-compli-btn, .wg-todayme-btn, .wg-petname-btn { align-self: center; }

.wg-match { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.wg-match-inputs { display: flex; align-items: center; gap: 6px; }
.wg-match-inputs input { flex: 1; min-width: 0; }
.wg-match-btn { align-self: center; }
.wg-match-result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; }
.wg-match-pct { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); color: var(--c-primary, var(--brand)); }
.wg-match-hint { color: var(--muted); font-size: 12px; }

.wg-bio-form { display: flex; gap: 6px; margin-bottom: 6px; }
.wg-bio-form input { flex: 1; min-width: 0; }
.wg-bio-hint { color: var(--muted); font-size: 12px; text-align: center; padding: 12px 0; }

/* ── 미니게임 ── */
.wg-dice { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 8px; }
.wg-dice-faces { display: flex; gap: 8px; font-size: clamp(38px, 5vw, 54px); line-height: 1; }
.wg-coin { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 6px; }
.wg-coin-face { font-size: clamp(34px, 4.6vw, 48px); line-height: 1; display: inline-block; }
.wg-coin-face.spin { animation: wg-coin-spin .9s ease; }
@keyframes wg-coin-spin { from { transform: rotateY(0); } to { transform: rotateY(1080deg); } }
.wg-coin-result { font-size: 13px; }

.wg-rps { display: flex; flex-direction: column; height: 100%; }
.wg-rps-result { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; }
.wg-rps-btns { display: flex; justify-content: center; gap: 8px; }
.wg-rps-hand { border: 1px solid var(--line); background: var(--c-card, var(--card)); border-radius: 12px; font-size: 24px; padding: 7px 12px; cursor: pointer; }
.wg-rps-hand:hover { border-color: var(--c-primary, var(--brand)); background: var(--brand-soft); }
.wg-rps-score { text-align: center; font-size: 11px; color: var(--muted); margin-top: 7px; }

.wg-slots { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 7px; }
.wg-slots-reels { display: flex; gap: 6px; background: var(--brand-soft); border-radius: 12px; padding: 8px 14px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1; }
.wg-slots-msg { font-size: 13px; min-height: 18px; }

.wg-roul { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.wg-roul-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; width: 100%; }
.wg-roul-pin { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 1; color: var(--c-primary, var(--brand)); font-size: 15px; }
.wg-roul-wheel {
  height: 100%; aspect-ratio: 1; max-width: 100%; border-radius: 50%;
  border: 4px solid var(--c-card, var(--card)); box-shadow: var(--shadow);
  transition: transform 3.2s cubic-bezier(.15, .75, .25, 1);
}
.wg-roul-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 9px; font-size: 11px; }
.wg-roul-chip { display: inline-flex; align-items: center; gap: 4px; }
.wg-roul-chip i { width: 9px; height: 9px; border-radius: 50%; }
.wg-roul-result { font-size: 13px; min-height: 18px; }

.wg-lotto { display: flex; flex-direction: column; height: 100%; }
.wg-lotto-balls { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.wg-lotto-ball {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px; box-shadow: inset -2px -3px 5px rgba(0,0,0,.18);
}
.wg-lotto-empty { color: var(--muted); font-size: 13px; }
.wg-lotto-btn { align-self: center; }

.wg-scratch { display: flex; flex-direction: column; height: 100%; gap: 6px; }
.wg-scratch-area { position: relative; flex: 1; min-height: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.wg-scratch-prize { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: clamp(15px, 2vw, 20px); color: var(--c-primary, var(--brand)); background: var(--brand-soft); }
.wg-scratch-cv { position: absolute; inset: 0; touch-action: none; }

.wg-updown { display: flex; flex-direction: column; height: 100%; }
.wg-updown-msg { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; }
.wg-updown-form { display: flex; gap: 6px; }
.wg-updown-form input { flex: 1; min-width: 0; }

.wg-memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wg-memory-card {
  position: relative; aspect-ratio: 1; border: none; border-radius: 9px; cursor: pointer;
  background: var(--brand-soft); font-size: clamp(18px, 2.4vw, 26px); padding: 0; overflow: hidden;
}
.wg-memory-card .front { display: none; }
.wg-memory-card.open .front, .wg-memory-card.hit .front { display: block; }
.wg-memory-card.open .back, .wg-memory-card.hit .back { display: none; }
.wg-memory-card.hit { background: color-mix(in srgb, var(--c-primary, var(--brand)) 18%, var(--c-card, var(--card))); cursor: default; }
.wg-memory-moves { font-size: 12px; color: var(--muted); }

.wg-react { display: flex; flex-direction: column; height: 100%; gap: 7px; }
.wg-react-pad {
  flex: 1; border: none; border-radius: 12px; cursor: pointer;
  background: var(--brand-soft); font-size: 15px; font-weight: 800; color: var(--c-text, var(--ink));
}
.wg-react.wait .wg-react-pad { background: #E5484D; color: #fff; }
.wg-react.go .wg-react-pad { background: #2FAE62; color: #fff; }
.wg-react-best { text-align: center; font-size: 12px; color: var(--muted); }
.wg-react-best b { color: var(--c-primary, var(--brand)); }

.wg-clicker { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.wg-clicker-info { text-align: center; font-size: 13px; min-height: 18px; }
.wg-clicker-info b { color: var(--c-primary, var(--brand)); }
.wg-clicker-btn {
  flex: 1; border: none; border-radius: 12px; cursor: pointer;
  background: var(--c-primary, var(--brand)); color: #fff; font-size: 16px; font-weight: 800;
}
.wg-clicker-btn:active { filter: brightness(1.12); }

.wg-typing { display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 8px; }
.wg-typing-sent { text-align: center; font-size: 14px; font-weight: 700; background: var(--brand-soft); border-radius: 9px; padding: 9px; }
.wg-typing-result { text-align: center; font-size: 12px; min-height: 16px; }
.wg-typing-result b { color: var(--c-primary, var(--brand)); }

/* ── 신규 위젯 (v1.9.0 — 팬카페·연동) ── */
.wg-checkin { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-checkin-btn { align-self: flex-start; }
.wg-checkin-done { font-weight: 800; color: var(--c-primary, var(--brand)); font-size: 15px; }
.wg-checkin-streak { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.wg-checkin-today { font-size: 13px; }
.wg-checkin-today b { color: var(--c-primary, var(--brand)); }
.wg-checkin-list { display: flex; flex-wrap: wrap; gap: 4px; overflow-y: auto; min-height: 0; }
.wg-checkin-chip { font-size: 12px; background: var(--brand-soft); border-radius: 99px; padding: 2px 9px; }

.wg-ranking { display: flex; flex-direction: column; gap: 7px; height: 100%; }
.wg-ranking-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.wg-ranking-row { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.wg-ranking-no { width: 24px; text-align: center; font-weight: 800; flex-shrink: 0; }
.wg-ranking-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wg-ranking-grade { font-style: normal; font-size: 11px; color: var(--c-primary, var(--brand)); background: var(--brand-soft); border-radius: 99px; padding: 1px 7px; margin-left: 3px; }
.wg-ranking-pts { flex-shrink: 0; font-size: 12px; color: var(--muted); }
/* 닉네임 옆 칭호 배지 (게시판 목록·글·댓글 — 스트리머가 멤버 관리 탭에서 부여, v1.11.0). 랭킹은 .wg-ranking-grade와 같은 모양 */
.nick-badge { font-style: normal; font-size: 11px; color: var(--c-primary, var(--brand)); background: var(--brand-soft); border-radius: 99px; padding: 1px 7px; margin-left: 3px; white-space: nowrap; }
.wg-ranking-hint { font-size: 11px; color: var(--muted); }

.wg-hotposts { display: flex; flex-direction: column; gap: 4px; height: 100%; overflow-y: auto; }
.wg-hot-no { color: var(--c-primary, var(--brand)); }

.wg-inbox { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-inbox-desc { font-size: 13px; color: var(--muted); }
.wg-inbox-ta { flex: 1; min-height: 0; resize: none; }
.wg-inbox-send { align-self: flex-end; }

.wg-raffle { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-raffle-desc { font-size: 13px; }
.wg-raffle-meta { font-size: 12px; color: var(--muted); }
.wg-raffle-meta b { color: var(--c-primary, var(--brand)); }
.wg-raffle-btn { align-self: flex-start; }
.wg-raffle-entered { font-weight: 700; color: var(--c-primary, var(--brand)); font-size: 14px; }
.wg-raffle-closed { font-size: 13px; color: var(--muted); }
.wg-raffle-winners { font-weight: 800; font-size: 14px; }
.wg-raffle-winners > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; font-weight: 400; }

.wg-ytlatest { display: flex; flex-direction: column; gap: 7px; height: 100%; color: inherit; text-decoration: none; }
.wg-ytlatest-thumb { position: relative; flex: 1; min-height: 0; border-radius: 10px; overflow: hidden; background: #000; }
.wg-ytlatest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wg-ytlatest-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.62);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; padding-left: 4px;
}
.wg-ytlatest:hover .wg-ytlatest-play { background: var(--c-primary, var(--brand)); }
.wg-ytlatest-title { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wg-ytlatest-meta { font-size: 12px; color: var(--muted); }

.wg-discord { display: flex; flex-direction: column; justify-content: center; gap: 7px; height: 100%; }
.wg-discord-name { font-weight: 800; font-size: 14px; }
.wg-discord-online { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.wg-discord-online b { color: var(--c-primary, var(--brand)); }
.wg-discord-dot { width: 9px; height: 9px; border-radius: 50%; background: #2FAE62; flex-shrink: 0; }
.wg-discord-join { align-self: flex-start; }

/* ── 신규 위젯 (v1.11.0 — 카페 데이터 표시·투고) ── */
.wg-nextsched { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-ns-main { border-left: 4px solid var(--c-primary, var(--brand)); padding: 4px 0 4px 12px; }
.wg-ns-name { font-weight: 800; font-size: 15px; }
.wg-ns-when { font-size: 12px; color: var(--muted); }
.wg-ns-count { font-size: 14px; margin-top: 4px; }
.wg-ns-count b { color: var(--c-primary, var(--brand)); font-size: 16px; }
.wg-ns-clock { font-family: var(--font-display); font-size: 20px; color: var(--c-primary, var(--brand)); letter-spacing: 1px; }
.wg-ns-live { color: var(--danger); }
.wg-ns-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.wg-ns-row { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.wg-ns-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wg-ns-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-ns-row-when { color: var(--muted); font-size: 12px; flex-shrink: 0; }

.wg-lp-board { font-size: 11px; color: var(--muted); background: var(--paper); border-radius: 99px; padding: 1px 7px; margin-right: 5px; white-space: nowrap; }

.wg-rc { display: flex; flex-direction: column; height: 100%; }
.wg-rc-list { flex: 1; overflow-y: auto; min-height: 0; }
.wg-rc-item { display: block; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wg-rc-item:last-child { border-bottom: none; }
.wg-rc-item:hover .wg-rc-text { color: var(--c-primary, var(--brand)); }
.wg-rc-head { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.wg-rc-head span { color: var(--muted); margin-left: auto; font-size: 11px; }
.wg-rc-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wg-rc-post { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wg-stamps { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-st-nav { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.wg-st-btn { border: 1px solid var(--line); background: var(--card); border-radius: 6px; width: 24px; height: 24px; line-height: 1; font-size: 14px; }
.wg-st-btn:hover { border-color: var(--c-primary, var(--brand)); color: var(--c-primary, var(--brand)); }
.wg-st-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wg-st-wd { text-align: center; font-size: 10px; color: var(--muted); font-weight: 700; }
.wg-st-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--paper); font-size: 12px; color: var(--muted); }
.wg-st-on { background: var(--brand-soft); }
.wg-st-stamp { font-size: clamp(14px, 2.2vw, 20px); line-height: 1; }
.wg-st-today { outline: 2px solid var(--c-primary, var(--brand)); outline-offset: -2px; color: var(--c-primary, var(--brand)); font-weight: 800; }
.wg-st-future { opacity: .45; }
.wg-st-blank { background: none; }
.wg-st-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.wg-st-foot b { color: var(--c-primary, var(--brand)); }
.wg-st-done { font-weight: 700; color: var(--c-primary, var(--brand)); }

.wg-honor { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-honor-desc { font-size: 12px; color: var(--muted); }
.wg-honor-list { display: flex; flex-wrap: wrap; gap: 6px; overflow-y: auto; min-height: 0; }
.wg-honor-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px 4px 12px; }

.wg-fanart { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-fa-desc { font-size: 12px; color: var(--muted); }
.wg-fa-grid { overflow-y: auto; min-height: 0; align-content: start; }
.wg-fa-cap { margin-top: 10px; font-size: 14px; }
.wg-fa-cap small { color: var(--muted); font-size: 12px; }


/* ── 주간 방송표 (일정연동) — v1.13.3 ── */
.wg-wt { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.wg-wt .wg-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wg-wt-range { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.wg-wt-rows { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.wg-wt-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 6px; border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent; border-radius: 8px 0 0 8px;
}
.wg-wt-row:last-child { border-bottom: none; }
.wg-wt-row.today { background: var(--brand-soft); border-left-color: var(--c-primary, var(--brand)); }
.wg-wt-row.today .wg-wt-day b { color: var(--c-primary, var(--brand)); }
.wg-wt-day { width: 42px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.wg-wt-day b { font-size: 14px; font-weight: 800; }
.wg-wt-day span { font-size: 11px; color: var(--muted); }
.wg-wt-evts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 1px; }
.wg-wt-ev { border-left: 3px solid var(--wt-c, var(--brand)); background: var(--paper); border-radius: 0 8px 8px 0; padding: 4px 8px; }
.wg-wt-ev-top { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.wg-wt-time { font-size: 12px; font-weight: 700; color: var(--wt-c, var(--brand)); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wg-wt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wg-wt-live { font-size: 11px; font-weight: 800; color: var(--danger); flex-shrink: 0; }
.wg-wt-live::before { content: '● '; }
.wg-wt-ev.live { background: color-mix(in srgb, var(--wt-c, var(--brand)) 12%, transparent); }
.wg-wt-memo { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.wg-wt-off { font-size: 12px; color: var(--muted); padding: 3px 2px; }
.wg-wt-row.rest .wg-wt-day b { color: var(--muted); }
.wg-wt-hint { margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 719px) {
  .wg-wt-day { width: 36px; }
  .wg-wt-name { white-space: normal; }
}

/* 신규 위젯 애니메이션 — 모션 최소화 설정 시 전부 비활성 */
@media (prefers-reduced-motion: reduce) {
  .wg-credits-roll, .wg-neon-text, .wg-rainbow-text, .wg-sparkle-star, .wg-type-cursor,
  .wg-cassette-reel, .wg-vinyl-disc, .wg-lights-bulb, .wg-window-star, .wg-candle-emoji,
  .wg-candle-glow, .wg-disco-ball, .wg-disco-spark, .wg-parti-p, .wg-aqua-fish, .wg-aqua-bubble,
  .wg-term-cursor, .wg-construct-ico, .wg-loading-fill, .wg-flip-card.tickflip, .wg-cake-flame,
  .wg-fw-p, .wg-heart-float, .wg-tarot-card.open, .wg-ball-orb.shake, .wg-coin-face.spin {
    animation: none;
  }
  .wg-roul-wheel { transition: none; }
}

/* ── 카페 방문자 페이지 편의 요소 (v1.12.2 고도화) ── */
/* 맨 위로 — 오른쪽 아래는 플로팅 채팅 자리라 왼쪽 아래 */
.cafe-top-btn {
  position: fixed; left: 18px; bottom: 18px; z-index: 400;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--c-card, var(--card));
  color: var(--c-primary, var(--brand)); font-size: 19px; font-weight: 800;
  box-shadow: var(--shadow); cursor: pointer;
}
.cafe-top-btn:hover { border-color: var(--c-primary, var(--brand)); }
@media (max-width: 719px) { .cafe-top-btn { left: 12px; bottom: 12px; } }

/* 첫 로드 때 그리드가 부드럽게 등장 (조율된 한 번의 순간 — reduced-motion은 common.css 전역 규칙이 끔) */
.cafe-grid { animation: cafe-grid-in .3s ease; }
@keyframes cafe-grid-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
