/* 7일 챌린지 (앱 안): 앱의 깔끔한 톤 그대로, 강조는 주황 하나 */

.ch-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent-weak); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

/* 홈 맨 위: 참가 전 초대 */
.ch-invite { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 12px; padding: 16px 20px; border: 0; border-radius: var(--r-lg); background: var(--dark); color: #fff; text-align: left; cursor: pointer; }
.ch-invite .ch-tag { background: rgba(255, 207, 92, .16); color: #ffcf5c; flex: none; }
.ch-invite-txt { flex: 1; min-width: 0; display: grid; }
.ch-invite-txt b { font-size: 16px; }
.ch-invite-txt small { font-size: 14px; color: var(--dark-muted); }
.ch-invite svg { color: var(--dark-muted); flex: none; }
.ch-invite:hover { background: var(--dark-2); }
.ch-invite.soon { cursor: default; }
.ch-invite.soon:hover { background: var(--dark); }

/* 홈 맨 위: 오늘의 미션 */
.ch-home { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; margin: 0 0 12px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent-weak-hover); }
.ch-home.done { display: flex; width: 100%; border: 0; text-align: left; cursor: pointer; }
.ch-home.done .ch-home-txt { flex: 1; }
.ch-home-txt { display: grid; gap: 2px; min-width: 0; }
.ch-home-txt .ch-tag { justify-self: start; margin-bottom: 6px; }
.ch-home-txt b { font-size: 17px; letter-spacing: -0.02em; }
.ch-home-txt small { font-size: 14px; color: var(--muted); }
.ch-home-actions { display: flex; align-items: center; gap: 14px; }

/* 7칸 진행 */
.ch-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ch-dots li { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--grey-100); color: var(--grey-500); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-dots li.hit { background: var(--accent); color: #fff; }
.ch-dots li.now { background: var(--surface); color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); }
.ch-dots li.boss:not(.hit) { color: var(--accent-ink); }

/* 면접 시작 전 한 줄 안내 */
.ch-mode-note { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-weak); color: var(--grey-800); font-size: 14px; }
.ch-mode-note.on { background: var(--accent-weak); color: var(--accent-ink); font-weight: 600; }
.ch-mode-note .text-btn { margin-left: auto; font-size: 14px; }

/* 챌린지 화면 */
.ch-join { padding: 28px; }
.ch-join h2 { margin: 0; font-size: 22px; }
.ch-join p { margin: 8px 0 20px; color: var(--muted); }

.ch-now { padding: 28px; }
.ch-now-top { display: flex; align-items: center; justify-content: space-between; }
.ch-now-day { font-size: 14px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.ch-now h2 { margin: 14px 0 0; font-size: 26px; letter-spacing: -0.03em; }
.ch-now p { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.ch-now p b { color: var(--ink); }
.ch-now .btn { margin-top: 20px; }
.ch-now.cleared .ch-tag { background: var(--good-weak); color: #027a4a; }
.ch-late { display: flex; gap: 6px; align-items: center; margin-top: 16px !important; font-size: 14px !important; color: var(--warn) !important; }

.ch-track { margin-top: 12px; padding: 24px 24px 12px; }
.ch-track .ch-dots { justify-content: space-between; max-width: 340px; }
.ch-days { margin: 18px 0 0; padding: 0; list-style: none; }
.ch-days li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.ch-day-no { font-size: 13px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.ch-day-txt { display: grid; min-width: 0; }
.ch-day-txt b { font-size: 16px; }
.ch-day-txt small { font-size: 14px; color: var(--muted); }
.ch-day-state { font-size: 13px; font-weight: 600; color: var(--faint); white-space: nowrap; }
.ch-days li.hit .ch-day-no, .ch-days li.hit .ch-day-state { color: var(--good); }
.ch-days li.now .ch-day-no, .ch-days li.now .ch-day-state { color: var(--accent-ink); }
.ch-days li.now b { color: var(--ink); }
.ch-days li:not(.hit):not(.now) .ch-day-txt { opacity: .6; }

.ch-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.ch-info .card { display: flex; align-items: center; gap: 12px; padding: 18px; }
.ch-info .ico { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 12px; background: var(--grey-100); color: var(--ink-2); }
.ch-info b { display: block; font-size: 15px; }
.ch-info small { display: block; font-size: 13px; color: var(--muted); }
.ch-foot { margin: 20px 0 0; font-size: 13px; color: var(--faint); }
.ch-foot .text-btn { margin-left: 6px; font-size: 13px; color: var(--faint); }

/* 완주: 면접 마스터 카드 */
.ch-finish { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: center; padding: 32px; border-radius: var(--r-lg); background: #0b1626; color: #fff; }
.ch-finish-txt h2 { margin: 12px 0 0; font-size: 30px; line-height: 1.3; letter-spacing: -0.035em; }
.ch-finish-txt p { margin: 10px 0 22px; color: #a3b6cf; }
.ch-finish-txt .ch-tag { background: rgba(255, 207, 92, .16); color: #ffcf5c; }

.mcard { position: relative; padding: 9px; border-radius: 26px; background: linear-gradient(160deg, #13233a, #0a1424); color: #f2f7ff; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 214, 150, .35); text-align: left; }
.mcard-art { position: relative; aspect-ratio: 1; border-radius: 19px; overflow: hidden; }
.mcard-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard-top { position: absolute; top: 12px; left: 14px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: rgba(255, 255, 255, .9); }
.mcard-body { padding: 16px 12px 8px; }
.mcard-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: #ffcf5c; }
.mcard-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.mcard-title h3 { margin: 0; font-size: 26px; letter-spacing: -0.04em; color: #fff; }
.mcard-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(255, 207, 92, .16); color: #ffcf5c; font-size: 12px; font-weight: 700; }
.mcard-who { margin-top: 2px; font-size: 13px; color: #a3b6cf; }
.mcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(170, 210, 255, .14); }
.mcard-stats div + div { padding-left: 12px; border-left: 1px solid rgba(170, 210, 255, .14); }
.mcard-stats b { display: block; font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; }
.mcard-stats span { font-size: 11px; color: #a3b6cf; }

/* 면접이 끝난 화면: 클리어 한 줄 */
.ch-clear-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 90, 31, .16); color: #ff9a6b; font-size: 14px; font-weight: 700; }
.ch-clear-chip.off { background: rgba(255, 255, 255, .08); color: var(--dark-muted); font-weight: 500; }

/* 7일째: 축하 화면 */
.ch-celebrate { position: relative; max-width: 520px; margin: 0 auto; }
.ch-celebrate .ch-tag { background: rgba(255, 207, 92, .16); color: #ffcf5c; letter-spacing: .08em; }
.ch-celebrate h2 { margin: 14px 0 8px; line-height: 1.25; }
.ch-celebrate p { color: var(--dark-muted); }
.ch-celebrate-card { width: min(280px, 70vw); margin: 22px auto 24px; transform: rotate(-2deg); animation: chCardIn .9s cubic-bezier(.2, 1.2, .3, 1) both .2s; }
@keyframes chCardIn { from { opacity: 0; transform: translateY(30px) rotate(-8deg) scale(.9); } }
.ch-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.ch-burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: hsl(calc(var(--i) * 20 + 10) 95% 62%); transform: rotate(calc(var(--i) * 20deg)) translateY(0); opacity: 0; animation: chBurst 1.6s cubic-bezier(.1, .7, .3, 1) forwards calc(var(--i) * 15ms + .15s); }
@keyframes chBurst { 20% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--i) * 20deg)) translateY(-320px) rotate(220deg); } }
.dialog .dialog-sub { color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .ch-home { grid-template-columns: 1fr; gap: 14px; }
  .ch-info { grid-template-columns: 1fr; }
  .ch-finish { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px; }
  .ch-finish-card { width: min(320px, 100%); }
  .ch-days li { grid-template-columns: 52px 1fr; }
  .ch-day-state { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-celebrate-card, .ch-burst i { animation: none; opacity: 1; }
  .ch-burst { display: none; }
}

/* 휴대폰 위쪽 메뉴: 챌린지 메뉴가 생기면 5칸으로 */
@media (max-width: 860px) {
  .steps:has(> [data-view="challenge"]:not([hidden])) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* 왼쪽 아래 소개 박스: 1/2 모톡 소개 · 2/2 챌린지 (6초마다) */
.promo { transition: transform .15s, opacity .25s; }
.promo.swap { opacity: 0; }
.promo-count { position: absolute; top: 12px; right: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.promo.ice { background: linear-gradient(90deg, rgba(6, 13, 24, .9) 0%, rgba(6, 13, 24, .55) 45%, transparent 65%), url('assets/challenge/promo-thumb.webp') right center / cover no-repeat, #060d18; }
.promo.ice .promo-eyebrow { color: #ffcf5c; }
.promo.ice .promo-link { color: #a3b6cf; }
.promo.ice .promo-moki { display: none; }
