.cp-greet { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 12px; animation: fade-in-up .4s ease; }
.cp-greet h1 { font-size: 20px; font-weight: 700; }
.cp-greet p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cp-greet-stats { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.cp-greet-stat b { color: var(--primary-light); font-weight: 700; font-size: 14px; }
.cp-greet-sep { color: var(--card-border); }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cp-brand-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(5,150,105,.05)); border: 1px solid rgba(99,102,241,.18); margin-bottom: 12px; }
.cp-brand-banner .cp-brand-icon { font-size: 22px; filter: drop-shadow(0 0 8px var(--primary-glow)); }
.cp-brand-banner .cp-brand-text { flex: 1; }
.cp-brand-banner .cp-brand-name { font-size: 16px; font-weight: 800; background: linear-gradient(135deg, var(--primary-light), var(--emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cp-brand-banner .cp-brand-slogan { font-size: 10px; color: var(--text-muted); margin-top: 1px; letter-spacing: .5px; }
.cp-pending-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--amber); background: rgba(255,202,40,.1); border: 1px solid rgba(255,202,40,.22); padding: 5px 12px; border-radius: 20px; }
.cp-pending-badge.zero { color: var(--emerald); background: rgba(5,150,105,.1); border-color: rgba(5,150,105,.2); }

.cp-view { display: flex; flex-direction: column; gap: 12px; }
.cp-ch-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cp-ch-chip { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: rgba(15,23,42,.02); cursor: pointer; transition: all .2s; white-space: nowrap; flex-shrink: 0; color: var(--text-primary); }
.cp-ch-chip.active { background: rgba(99,102,241,.14); border-color: var(--primary); }
.cp-ch-chip span { font-size: 12px; font-weight: 600; }
.cp-chip-badge { font-size: 10px !important; color: var(--text-muted); background: rgba(15,23,42,.05); padding: 1px 6px; border-radius: 6px; }

.cp-hero { padding: 20px 16px; text-align: center; position: relative; overflow: hidden; }
.cp-hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(99,102,241,.05) 0%, transparent 50%); animation: hero-glow 4s ease-in-out infinite; pointer-events: none; }
@keyframes hero-glow { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.cp-hero-title { font-size: 17px; font-weight: 700; position: relative; }
.cp-hero-progress { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; position: relative; }
.cp-hero-progress-bar { width: 100px; height: 4px; border-radius: 2px; background: rgba(15,23,42,.06); overflow: hidden; }
.cp-hero-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--emerald)); transition: width .6s; }
.cp-hero-progress-text { font-size: 11px; font-weight: 600; color: var(--emerald); }
.cp-galaxy-wrap { display: flex; justify-content: center; padding: 8px 0 4px; position: relative; }
.galaxy-planet { filter: drop-shadow(0 0 18px var(--planet-glow, rgba(129,140,248,.3))); transition: filter .8s; }
@keyframes today-pulse { 0%, 100% { r: 5; opacity: 1; } 50% { r: 7; opacity: .6; } }
.galaxy-today-dot { animation: today-pulse 1.6s ease-in-out infinite; }

.cp-task-card { padding: 14px; border-radius: var(--radius); background: rgba(15,23,42,.025); border: 1px solid var(--card-border); text-align: left; position: relative; overflow: hidden; }
.cp-task-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--primary), var(--primary-light)); border-radius: 0 2px 2px 0; }
.cp-task-head { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; display: flex; justify-content: space-between; }
.cp-task-day { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: rgba(99,102,241,.12); color: var(--primary-light); font-size: 11px; font-weight: 700; }
.cp-task-pct { font-size: 12px; font-weight: 700; color: var(--emerald); }
.cp-task-title { font-size: 15px; font-weight: 600; line-height: 1.6; }
.cp-task-desc { font-size: 13px; color: var(--text-secondary); margin-top: 6px; line-height: 1.6; }
.cp-task-tip { font-size: 12px; color: var(--text-muted); margin-top: 8px; display: flex; align-items: flex-start; gap: 5px; line-height: 1.5; }
.cp-task-tip i { color: var(--amber); margin-top: 2px; }

.cp-btn-checkin { width: 100%; padding: 16px; font-size: 17px; font-weight: 700; border: none; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--emerald), #10B981); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .25s; position: relative; overflow: hidden; box-shadow: 0 6px 28px var(--emerald-glow); }
.cp-btn-checkin:active { transform: scale(.98); }
.cp-btn-checkin:disabled { opacity: .6; cursor: not-allowed; }
.cp-btn-checkin.done { background: rgba(5,150,105,.12); color: var(--emerald); box-shadow: none; border: 1px solid rgba(5,150,105,.25); cursor: default; }
.cp-sub-actions { display: flex; gap: 8px; margin-top: 10px; }
.cp-sub-actions button { flex: 1; }
.cp-text-display { padding: 14px; border-radius: var(--radius); background: rgba(15,23,42,.025); border: 1px solid rgba(15,23,42,.06); margin-bottom: 10px; }
.cp-text-display-head { font-size: 12px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cp-text-display-body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }

.cp-fab { position: fixed; right: max(20px, calc((100vw - var(--cp-axis, 680px)) / 2 + 20px)); bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(99,102,241,.35); z-index: 50; transition: transform .2s, box-shadow .2s; }
.cp-fab:active { transform: scale(.9); }
.cp-fab:hover { box-shadow: 0 6px 28px rgba(99,91,255,.5); }
a[title="关于我们"], a[aria-label="关于我们"] { bottom: 150px !important; }
@media (max-width: 768px) {
  a[title="关于我们"], a[aria-label="关于我们"] { bottom: calc(146px + env(safe-area-inset-bottom, 0px)) !important; }
}

.cp-ai-card { padding: 16px 14px 15px; border-radius: var(--radius-lg); border: 1px solid rgba(167,139,250,.28); background: var(--ai-grad-soft); text-align: left; position: relative; overflow: hidden; box-shadow: 0 10px 28px -14px var(--ai-glow); animation: ai-card-in .45s ease; }
.cp-ai-card::before { content: ''; position: absolute; top: -46px; right: -46px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(167,139,250,.22), transparent 70%); pointer-events: none; }
.cp-ai-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--ai-grad); opacity: .9; }
@keyframes ai-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cp-ai-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.cp-ai-head i { width: 26px; height: 26px; border-radius: 8px; background: var(--ai-grad); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px var(--ai-glow); }
.cp-ai-head .cp-ai-badge { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--primary-light); background: rgba(129,140,248,.12); border: 1px solid rgba(129,140,248,.2); padding: 2px 9px; border-radius: 10px; letter-spacing: .3px; }
.cp-ai-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; white-space: pre-wrap; }
.cp-md, .cp-weekly-md { font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; word-break: break-word; }
.cp-md > *:first-child, .cp-weekly-md > *:first-child { margin-top: 0; }
.cp-md > *:last-child, .cp-weekly-md > *:last-child { margin-bottom: 0; }
.cp-md p, .cp-weekly-md p { margin: 6px 0; }
.cp-md strong, .cp-weekly-md strong { color: var(--text-primary); font-weight: 660; }
.cp-md h1, .cp-md h2, .cp-md h3, .cp-md h4, .cp-weekly-md h1, .cp-weekly-md h2, .cp-weekly-md h3, .cp-weekly-md h4 { color: var(--text-primary); font-weight: 700; margin: 10px 0 6px; line-height: 1.4; }
.cp-md h1, .cp-weekly-md h1 { font-size: 16px; } .cp-md h2, .cp-weekly-md h2 { font-size: 15px; } .cp-md h3, .cp-weekly-md h3 { font-size: 14px; }
.cp-md ul, .cp-weekly-md ul, .cp-md ol, .cp-weekly-md ol { margin: 6px 0 6px 18px; padding: 0; }
.cp-md li, .cp-weekly-md li { margin: 3px 0; }
.cp-md blockquote, .cp-weekly-md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--ai-grad); border-radius: 0 8px 8px 0; background: rgba(129,140,248,.06); color: var(--text-secondary); }
.cp-md code:not(pre code), .cp-weekly-md code { background: rgba(167,139,250,.16); color: var(--primary-light); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.cp-md a, .cp-weekly-md a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 2px; }
.cp-md hr, .cp-weekly-md hr { border: none; border-top: 1px solid var(--card-border); margin: 10px 0; }
.cp-md pre, .cp-weekly-md pre { background: rgba(2,6,23,.55); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; margin: 8px 0; }
.cp-md pre code, .cp-weekly-md pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-primary); background: transparent; padding: 0; }
.cp-chest-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--amber); background: rgba(255,202,40,.1); padding: 4px 10px; border-radius: 12px; }
.cp-tomorrow { margin-top: 10px; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.cp-weekly-meta { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

.cp-stat { text-align: center; padding: 8px 4px; border-radius: var(--radius-sm); background: rgba(15,23,42,.02); border: 1px solid rgba(15,23,42,.04); transition: all .2s; }
.cp-stat:hover { background: rgba(15,23,42,.04); transform: translateY(-1px); }
.cp-stat-icon { font-size: 11px; margin-bottom: 2px; }
.cp-stat-num { font-size: 22px; font-weight: 800; }
.cp-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.cp-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.cp-step-dot { flex: 1; height: 4px; border-radius: 2px; background: rgba(15,23,42,.06); }
.cp-step-dot.on { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.cp-create-tip { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.cp-gen-status { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-size: 13px; color: var(--text-secondary); }
.cp-gen-spinner { width: 18px; height: 18px; border: 2px solid var(--card-border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.cp-gen-panel { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.cp-gen-orbit { position: relative; width: 120px; height: 120px; margin: 0 auto 14px; }
.cp-gen-orb-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; box-shadow: 0 0 28px var(--primary-glow); animation: gen-float 2.6s ease-in-out infinite; }
.cp-gen-orb-core i { animation: gen-rocket 1.4s ease-in-out infinite; }
@keyframes gen-float { 0%,100% { transform: translate(-50%, -50%) translateY(0); } 50% { transform: translate(-50%, -50%) translateY(-5px); } }
@keyframes gen-rocket { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(-12deg); } }
.cp-gen-ring { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1.5px solid var(--primary-glow); transform: translate(-50%, -50%); pointer-events: none; }
.cp-gen-ring.r1 { width: 100%; height: 100%; animation: gen-ring 2.2s ease-out infinite; }
.cp-gen-ring.r2 { width: 70%; height: 70%; animation: gen-ring 2.2s ease-out .8s infinite; }
@keyframes gen-ring { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); } 60% { opacity: .8; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
.cp-gen-title { font-size: 15px; font-weight: 700; text-align: center; }
.cp-gen-label { font-size: 12px; color: var(--text-muted); margin-top: 5px; text-align: center; }
.cp-gen-label b { color: var(--primary-light); }
.cp-gen-track { display: flex; gap: 5px; margin: 14px 0 8px; width: 100%; justify-content: center; }
.cp-gen-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--card-border); transition: all .25s ease; }
.cp-gen-dot.on { background: linear-gradient(135deg, var(--primary), var(--purple)); box-shadow: 0 0 8px var(--primary-glow); transform: scale(1.12); }
@media (max-width: 480px) { .cp-gen-dot { width: 9px; height: 9px; } .cp-gen-track { gap: 4px; } }
.cp-gen-status-line { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--text-secondary); min-height: 20px; }
.cp-typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.cp-typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--primary-light); animation: gen-blink 1.2s ease-in-out infinite; }
.cp-typing-dots i:nth-child(2) { animation-delay: .2s; } .cp-typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes gen-blink { 0%,100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.cp-gen-skel { width: 100%; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cp-gen-skel-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(15,23,42,.03); border: 1px solid var(--card-border); transition: opacity .4s ease; }
.cp-gen-skel-dot { width: 34px; height: 34px; border-radius: 50%; background: rgba(148,163,184,.1); flex-shrink: 0; animation: shimmer 1.5s ease-in-out infinite; }
.cp-gen-skel-lines { flex: 1; }
.cp-gen-skel-line { height: 11px; border-radius: 4px; background: rgba(148,163,184,.1); margin-bottom: 8px; animation: shimmer 1.5s ease-in-out infinite; }
.cp-gen-skel-line.w60 { width: 60%; } .cp-gen-skel-line.w40 { width: 40%; margin-bottom: 0; }
.cp-plan-list { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; margin: 12px 0; }
.cp-plan-day { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(15,23,42,.025); border: 1px solid var(--card-border); }
.cp-plan-day-head { font-size: 12px; font-weight: 600; color: var(--primary-light); margin-bottom: 3px; }
.cp-plan-day-title { font-size: 13px; font-weight: 600; }
.cp-plan-day-desc { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.5; }
.cp-plan-day-tip { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.cp-form-row { margin-bottom: 14px; }
.cp-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cp-sugg-chip { font-size: 11px; color: var(--text-secondary); border: 1px dashed var(--card-border); padding: 4px 10px; border-radius: 12px; background: none; cursor: pointer; }
.cp-adjust { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--card-border); }
.cp-adjust-row { display: flex; gap: 8px; }
.cp-adjust-row .cp-field { flex: 1; min-width: 0; font-size: 13px; }
.cp-adjust-btn { width: auto; flex-shrink: 0; padding: 11px 16px; font-size: 13px; }
.cp-miles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.cp-miles-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-right: 2px; }
.cp-miles-chip { font-size: 11px; color: var(--primary-light); background: rgba(129,140,248,.1); border: 1px solid rgba(129,140,248,.2); padding: 3px 9px; border-radius: 12px; }
.cp-miles-chip b { font-size: 12px; }
.cp-milestone-tag { font-size: 10px; color: var(--emerald); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.25); padding: 1px 7px; border-radius: 9px; margin-left: 4px; display: inline-flex; align-items: center; gap: 3px; }
.cp-rhythm { margin: 10px 0; padding: 11px 13px; font-size: 12.5px; line-height: 1.7; color: var(--text-primary); background: rgba(129,140,248,.07); border: 1px solid rgba(129,140,248,.16); border-radius: var(--radius-sm); }
.cp-rhythm i { color: var(--primary-light); margin-right: 5px; }
.cp-companion { margin-top: 12px; padding: 13px 14px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(129,140,248,.1), rgba(52,211,153,.06)); border: 1px solid rgba(129,140,248,.18); }
.cp-companion-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cp-companion-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--purple)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.cp-companion-meta { display: flex; flex-direction: column; min-width: 0; }
.cp-companion-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.cp-companion-tag { font-size: 11px; color: var(--primary-light); margin-top: 1px; }
.cp-companion-hot.cp-companion { background: linear-gradient(135deg, rgba(248,113,113,.12), rgba(129,140,248,.06)); border-color: rgba(248,113,113,.3); }
.cp-companion-hot.cp-companion .cp-companion-avatar { background: linear-gradient(135deg, #F87171, #FB923C); }
.cp-companion-hot.cp-companion .cp-companion-tag { color: #F87171; }
.cp-companion-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cp-companion-reasons span { font-size: 11px; color: var(--text-secondary); background: rgba(15,23,42,.05); border: 1px solid var(--card-border); padding: 2px 8px; border-radius: 10px; }
.cp-companion-msg { margin: 0 0 8px; font-size: 13px; line-height: 1.65; color: var(--text-primary); }
.cp-companion-action { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--emerald); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.22); padding: 5px 10px; border-radius: 11px; }
.cp-days-stepper { display: flex; gap: 8px; }
.cp-days-stepper .cp-pick-btn { flex: 1; }

.cp-squad-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cp-invite { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--radius); background: rgba(99,102,241,.06); border: 1px dashed rgba(99,102,241,.3); cursor: pointer; width: 100%; color: var(--text-primary); }
.cp-invite code { font-size: 15px; font-weight: 700; letter-spacing: 2px; color: var(--primary-light); flex: 1; text-align: left; }
.cp-member-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cp-member { padding: 12px; border-radius: var(--radius); background: rgba(15,23,42,.025); border: 1px solid var(--card-border); display: flex; align-items: center; gap: 10px; }
.cp-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0; }
.cp-member-info { flex: 1; min-width: 0; }
.cp-member-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cp-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.cp-status-dot.on { background: var(--emerald); box-shadow: 0 0 6px var(--emerald-glow); }
.cp-member-pts { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cp-nudge-btn { font-size: 11px; padding: 5px 10px; }
.cp-rule-card { padding: 12px 14px; font-size: 12px; color: var(--text-secondary); border-radius: var(--radius); background: rgba(255,202,40,.06); border: 1px solid rgba(255,202,40,.18); line-height: 1.6; }
.cp-squad-actions { display: flex; gap: 8px; }
.cp-squad-actions .cp-btn-primary, .cp-squad-actions .cp-btn-ghost { width: auto; flex: 1; }

.cp-rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: rgba(15,23,42,.02); border: 1px solid var(--card-border); }
.cp-rank-row.self { border-color: var(--primary); background: rgba(99,102,241,.1); }
.cp-rank-no { width: 28px; text-align: center; font-size: 15px; font-weight: 800; color: var(--text-muted); flex-shrink: 0; }
.cp-rank-no.m1 { color: #ffd700; } .cp-rank-no.m2 { color: #c0c7d6; } .cp-rank-no.m3 { color: #e8a06a; }
.cp-rank-name { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-rank-pts { font-size: 13px; font-weight: 700; color: var(--primary-light); }
.cp-scope-tabs { display: flex; gap: 8px; }
.cp-scope-tabs .cp-pick-btn { flex: 1; }

.cp-me-card { padding: 20px; display: flex; align-items: center; gap: 14px; }
.cp-me-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; box-shadow: 0 0 20px var(--primary-glow); }
.cp-me-name { font-size: 18px; font-weight: 700; }
.cp-me-pts { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.cp-me-pts b { color: var(--amber); font-size: 14px; }
.cp-ch-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--radius); background: rgba(15,23,42,.02); border: 1px solid var(--card-border); cursor: pointer; transition: all .2s; width: 100%; color: var(--text-primary); text-align: left; }
.cp-ch-row:hover { background: var(--card-hover); }
.cp-ch-row.current { border-color: var(--primary); }
.cp-ch-row-icon { font-size: 22px; flex-shrink: 0; }
.cp-ch-row-info { flex: 1; min-width: 0; }
.cp-ch-row-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cp-ch-status { font-size: 10px; color: var(--text-muted); background: rgba(15,23,42,.05); padding: 1px 7px; border-radius: 8px; }
.cp-ch-status.done { color: var(--emerald); background: rgba(5,150,105,.1); }
.cp-progress-bar { height: 5px; border-radius: 3px; background: rgba(15,23,42,.05); margin-top: 7px; overflow: hidden; }
.cp-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); transition: width .5s; }
.cp-ch-row-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.cp-ch-row-end { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; color: var(--text-muted); transition: all .2s; }
.cp-ch-row-end:hover { background: rgba(239,68,68,.12); color: #ef4444; }
.cp-me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; }

.cp-share-img { width: 100%; border-radius: var(--radius); display: block; }
.cp-share-btns { display: flex; gap: 8px; margin-top: 14px; }
.cp-share-btns button { flex: 1; }
.cp-share-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.cp-share-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: var(--text-secondary); font-size: 13px; }

.cp-detail-row { padding: 10px 0; border-bottom: 1px solid rgba(15,23,42,.04); }
.cp-detail-row:last-child { border-bottom: none; }
.cp-detail-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.cp-detail-val { font-size: 13px; color: var(--text-primary); line-height: 1.6; white-space: pre-wrap; }
.cp-mood-tag { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 10px; background: rgba(99,102,241,.12); color: var(--primary-light); }
.cp-date-list { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; margin-bottom: 14px; }
.cp-date-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: rgba(15,23,42,.02); color: var(--text-primary); cursor: pointer; font-size: 13px; }
.cp-date-item:hover { background: var(--card-hover); border-color: var(--primary); }
.cp-mercy-left { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }

.cp-ignite-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 2px; }
.cp-ignite-btn { --p: 0; width: 112px; height: 112px; border-radius: 50%; border: none; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; font-weight: 700; background: conic-gradient(var(--amber) calc(var(--p) * 1turn), rgba(255,202,40,.12) 0); transition: transform .15s; box-shadow: 0 8px 32px rgba(255,202,40,.22); touch-action: none; user-select: none; -webkit-user-select: none; }
.cp-ignite-btn::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: linear-gradient(160deg, #FFF3E0, #FFE0B2); }
.cp-ignite-btn::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(251,191,36,.3); opacity: 0; transition: opacity .3s; }
.cp-ignite-btn.charging::after { opacity: 1; animation: ignite-ring 1s ease-out infinite; }
@keyframes ignite-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.3); opacity: 0; } }
.cp-ignite-btn i, .cp-ignite-btn span { position: relative; z-index: 1; }
.cp-ignite-btn i { font-size: 28px; color: var(--amber); filter: drop-shadow(0 0 10px rgba(251,191,36,.8)); transition: filter .2s; }
.cp-ignite-btn.charging i { animation: fire-flicker .15s ease-in-out infinite alternate; }
@keyframes fire-flicker { from { filter: drop-shadow(0 0 8px rgba(251,191,36,.6)); transform: scale(1); } to { filter: drop-shadow(0 0 16px rgba(251,191,36,1)); transform: scale(1.1); } }
.cp-ignite-btn span { font-size: 12px; }
.cp-ignite-btn.charging { transform: scale(1.06); }
.cp-ignite-btn:disabled { opacity: .55; cursor: not-allowed; }
.cp-ignite-hint { font-size: 11px; color: var(--text-muted); }
.cp-mini-link { border: none; background: none; color: var(--text-muted); font-size: 12px; cursor: pointer; padding: 4px 10px; }
.cp-mini-link:active { color: var(--primary-light); }

.cp-declare { padding: 13px 16px; border-radius: var(--radius); border: 1px solid rgba(255,202,40,.3); background: linear-gradient(135deg, rgba(255,202,40,.12), rgba(251,191,36,.04)); font-size: 15px; font-weight: 700; color: var(--amber); text-align: center; line-height: 1.6; animation: declare-in .5s ease; }
@keyframes declare-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.cp-adapt-card { padding: 14px; border-radius: var(--radius); border: 1px solid rgba(99,102,241,.3); background: rgba(99,102,241,.06); }
.cp-adapt-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.cp-adapt-reason { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
.cp-adapt-task { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(15,23,42,.03); border: 1px dashed rgba(99,102,241,.3); }
.cp-adapt-task b { font-size: 13px; display: block; margin: 3px 0; }
.cp-adapt-task p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.cp-adapt-day { font-size: 11px; font-weight: 600; color: var(--primary); }

.cp-diag-cause { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--red); background: rgba(239,83,80,.1); border: 1px solid rgba(239,83,80,.25); padding: 6px 14px; border-radius: 16px; margin-bottom: 12px; }
.cp-diag-text { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; white-space: pre-wrap; }
.cp-diag-plan { padding: 11px 13px; border-radius: var(--radius-sm); background: rgba(5,150,105,.06); border: 1px solid rgba(5,150,105,.25); font-size: 13px; color: var(--emerald); line-height: 1.6; margin-bottom: 6px; }
.cp-diag-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }

.cp-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cp-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: rgba(15,23,42,.02); color: var(--text-muted); font-size: 11px; }
.cp-badge i { font-size: 20px; opacity: .4; }
.cp-badge.got { color: var(--amber); border-color: rgba(251,191,36,.4); background: rgba(255,202,40,.06); }
.cp-badge.got i { opacity: 1; filter: drop-shadow(0 0 6px rgba(251,191,36,.6)); }
.cp-badge-hint { font-size: 11px; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }

.cp-empty { display: flex; flex-direction: column; align-items: center; padding: 36px 20px; text-align: center; }
.cp-empty-icon { font-size: 52px; margin-bottom: 14px; animation: empty-float 3s ease-in-out infinite; }
@keyframes empty-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.cp-empty h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.cp-empty > p { color: var(--text-secondary); margin-bottom: 22px; }

.cp-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; position: relative; }
.cp-hero-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cp-hero-share-btn { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--card-border); background: rgba(15,23,42,.03); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .2s; }
.cp-hero-share-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cp-hero-companion-btn { color: var(--primary); border-color: var(--primary); background: rgba(139,92,246,.08); }
.cp-hero-companion-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.cp-guidance-card { padding: 16px; animation: fade-in-up .4s ease; }
.cp-guidance-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cp-phase-badge { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 16px; border: 1px solid; }
.cp-phase-icon { font-size: 20px; }
.cp-phase-name { font-size: 14px; font-weight: 700; }
.cp-phase-range { font-size: 11px; opacity: .7; }
.cp-guidance-encourage { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.6; margin-bottom: 6px; }
.cp-guidance-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.cp-guidance-tip { display: flex; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255,202,40,.06); border: 1px solid rgba(255,202,40,.18); font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.cp-guidance-tip i { color: var(--amber); margin-top: 2px; flex-shrink: 0; }
.cp-milestone { margin-bottom: 8px; }
.cp-milestone-bar { height: 6px; border-radius: 3px; background: rgba(15,23,42,.06); overflow: hidden; margin-bottom: 6px; }
.cp-milestone-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--emerald)); transition: width .6s; }
.cp-milestone-info { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cp-milestone-target { color: var(--text-primary); }
.cp-milestone-remain { color: var(--text-muted); }
.cp-milestone-tip { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.cp-risk-warn { display: flex; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(239,83,80,.06); border: 1px solid rgba(239,83,80,.2); font-size: 12px; color: var(--red); line-height: 1.6; }
.cp-risk-warn i { margin-top: 2px; flex-shrink: 0; }
.cp-shared-preview { padding: 16px; }
.cp-shared-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.cp-shared-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.cp-shared-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.cp-shared-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Challenge title bar */
.cp-ch-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; text-align: left; }
.cp-ch-title-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cp-ch-title-main .cp-hero-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-ch-title-meta { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--text-muted); background: rgba(15,23,42,.05); padding: 3px 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; }
.cp-ch-title-meta i { color: var(--emerald); }

/* Section tabs */
.cp-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(15,23,42,.04); border: 1px solid var(--card-border); border-radius: var(--radius-lg); }
.cp-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 6px; font-size: 14px; font-weight: 600; color: var(--text-muted); border: none; background: transparent; border-radius: var(--radius-sm); cursor: pointer; transition: all .2s; -webkit-tap-highlight-color: transparent; }
.cp-tab i { font-size: 13px; }
.cp-tab:active { transform: scale(.97); }
.cp-tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.cp-progress-card { padding: 16px 12px; }
.cp-progress-stats { padding: 14px; }

/* Risk banner */
.cp-risk-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.25); color: var(--red); font-size: 13px; font-weight: 600; animation: fade-in-up .4s ease; }
.cp-risk-banner i { font-size: 16px; flex-shrink: 0; }
.cp-risk-banner span { flex: 1; }
.cp-risk-btn { padding: 6px 14px; border-radius: 8px; border: none; background: rgba(248,113,113,.2); color: var(--red); font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.cp-risk-btn:active { transform: scale(.95); }

/* Tomorrow enhanced card */
.cp-tomorrow-enhanced { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid rgba(129,140,248,.2); background: rgba(129,140,248,.06); margin-top: 10px; animation: fade-in-up .4s ease; }
.cp-tomorrow-icon { font-size: 28px; flex-shrink: 0; }
.cp-tomorrow-body { flex: 1; }
.cp-tomorrow-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.cp-tomorrow-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.cp-tomorrow-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }

/* Galaxy animation enhancements */
.galaxy-orbit-group { animation: galaxy-rotate 30s linear infinite; transform-origin: 120px 120px; }
@keyframes galaxy-rotate { to { transform: rotate(360deg); } }
.galaxy-today-pulse { animation: galaxy-pulse 1.6s ease-in-out infinite; }
@keyframes galaxy-pulse { 0%, 100% { r: 5; opacity: .5; } 50% { r: 10; opacity: 0; } }
.galaxy-sparkle { animation: sparkle 2s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { opacity: 1; r: 4.5; } 50% { opacity: .4; r: 3; } }
.galaxy-planet { transition: filter .8s; animation: planet-pulse 4s ease-in-out infinite; }
@keyframes planet-pulse { 0%, 100% { filter: drop-shadow(0 0 18px var(--planet-glow, rgba(129,140,248,.3))); } 50% { filter: drop-shadow(0 0 30px var(--planet-glow, rgba(129,140,248,.5))); } }

/* Star twinkle overlay */
@keyframes twinkle-star { 0%, 100% { opacity: .2; } 50% { opacity: .8; } }
.cp-twinkle-1 { animation: twinkle-star 3s ease-in-out infinite; }
.cp-twinkle-2 { animation: twinkle-star 4s ease-in-out 1s infinite; }
.cp-twinkle-3 { animation: twinkle-star 2.5s ease-in-out .5s infinite; }

/* Ladder gameplay card */
.cp-ladder-card{margin-top:12px;padding:12px;border:1px solid var(--border,#e5e7eb);border-radius:14px;background:linear-gradient(135deg,rgba(139,92,246,.05),rgba(99,102,241,.04));}
.cp-ladder-toggle{width:100%;justify-content:space-between;padding:10px 12px;font-weight:600}
.cp-ladder-toggle.active{border-color:var(--app-accent,#8b5cf6);color:var(--app-accent,#8b5cf6)}
.cp-ladder-hint{font-size:12px;font-weight:500;opacity:.7}
.cp-ladder-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.cp-ladder-field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary,#666)}
.cp-ladder-field input{width:100%;padding:8px 10px;border:1px solid var(--border,#e5e7eb);border-radius:10px;font-size:14px;background:#fff}
.cp-ladder-preview{margin-top:12px;padding-top:12px;border-top:1px dashed var(--border,#e5e7eb)}
.cp-ladder-preview-title{font-size:12px;color:var(--text-secondary,#666);margin-bottom:8px;display:flex;align-items:center;gap:6px}
.cp-ladder-preview-inner{display:flex;flex-direction:column;gap:4px}
.cp-ladder-node{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-secondary,#666)}
.cp-ladder-node b{color:var(--text,#1f2937);font-weight:600;min-width:28px}
.cp-ladder-node i{font-style:normal;font-weight:700;color:var(--app-accent,#8b5cf6)}
.cp-ladder-node:not(.last)::after{content:"";flex:1;border-bottom:1px dashed var(--border,#e5e7eb);margin:0 2px}
.cp-ladder-node.last i{color:#10b981}

/* Ladder daily block */
.cp-ladder-daily{margin-top:12px;padding:12px;border-radius:14px;background:linear-gradient(135deg,rgba(16,185,129,.06),rgba(139,92,246,.05));border:1px solid rgba(16,185,129,.18)}
.cp-ladder-daily-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:600;color:var(--text,#1f2937);margin-bottom:8px}
.cp-ladder-daily-path{font-size:12px;font-weight:600;color:var(--app-accent,#8b5cf6);display:flex;align-items:center;gap:4px}
.cp-ladder-daily-bar{height:10px;border-radius:999px;background:rgba(0,0,0,.06);overflow:hidden}
.cp-ladder-daily-fill{height:100%;border-radius:999px;transition:width .4s ease}
.cp-ladder-daily-stats{display:flex;gap:18px;margin-top:10px;align-items:baseline}
.cp-ladder-daily-stat{display:flex;flex-direction:column;gap:2px}
.cp-ladder-daily-stat b{font-size:20px;font-weight:800;color:var(--text,#1f2937);line-height:1}
.cp-ladder-daily-stat span{font-size:11px;color:var(--text-secondary,#666)}
.cp-ladder-daily-stat.right{margin-left:auto;text-align:right}
.cp-ladder-daily-tip{margin-top:8px;font-size:12px;padding:6px 10px;border-radius:10px}
.cp-ladder-daily-tip.ok{background:rgba(16,185,129,.1);color:#059669}
.cp-ladder-daily-tip.warn{background:rgba(239,68,68,.1);color:#dc2626}

/* Companion chat panel */
.cp-companion-overlay { padding: 0; align-items: stretch; }
.cp-companion-panel { width: 100%; max-width: 560px; height: 100%; max-height: 100vh; display: flex; flex-direction: column; border-radius: 0; overflow: hidden; }
.cp-companion-status { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--card-border); background: rgba(15,23,42,.02); }
.cp-companion-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); background: rgba(15,23,42,.04); padding: 4px 10px; border-radius: 999px; }
.cp-companion-stat i { color: var(--primary); }
.cp-companion-stat.cp-risk-high { color: var(--red); background: rgba(239,68,68,.1); }
.cp-companion-stat.cp-risk-high i { color: var(--red); }
.cp-companion-stat.cp-risk-medium { color: var(--amber); background: rgba(245,158,11,.1); }
.cp-companion-stat.cp-risk-medium i { color: var(--amber); }
.cp-companion-stat.cp-risk-low { color: var(--emerald); background: rgba(16,185,129,.1); }
.cp-companion-stat.cp-risk-low i { color: var(--emerald); }
.cp-companion-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cp-companion-chat .nx-ai-chat { height: 100%; }
.cp-companion-queue { display: flex; align-items: center; gap: 8px; padding: 8px 14px; margin: 8px 12px 0; font-size: 12px; color: var(--primary); background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.2); border-radius: 10px; }
.cp-companion-queue-spinner { width: 14px; height: 14px; border: 2px solid rgba(139,92,246,.25); border-top-color: var(--primary); border-radius: 50%; animation: cp-spin .8s linear infinite; flex-shrink: 0; }
.cp-companion-header-actions { display: flex; align-items: center; gap: 6px; }
.cp-session-toggle.active { background: rgba(139,92,246,.14); color: var(--primary); }
.cp-companion-sessions { max-height: 38vh; min-height: 0; overflow-y: auto; border-bottom: 1px solid var(--card-border); background: var(--card-bg, #fff); }
.cp-companion-sessions .nx-conv-list { padding: 6px 12px 8px; }
@keyframes cp-spin { to { transform: rotate(360deg); } }
@media (min-width: 768px) {
  .cp-companion-overlay { padding: 24px; align-items: center; }
  .cp-companion-panel { height: 92vh; max-height: 92vh; border-radius: var(--radius-lg); }
}
