:root {
  --accent: #3b82f6;
  --accent-soft: #eff6ff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --ok: #22c55e;
  --fail: #ef4444;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f6f8fb;
}

.bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #eef2ff 0%, #f6f8fb 45%, #f6f8fb 100%);
  z-index: 0;
}

.petal-layer { display: none; }

.shell {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.hero { text-align: center; margin-bottom: 24px; }
.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
}
.hero h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}
.sub { margin-top: 8px; color: var(--muted); font-size: 14px; }
.sub code {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 8px;
}

.card, .workspace {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  background: #fafbfc;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #fff;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  width: 100%;
  margin-top: 14px;
  color: #fff;
  background: var(--accent);
}
.btn.primary:hover { opacity: 0.92; }
.btn.pink {
  color: #fff;
  background: #ec4899;
}
.btn.ghost-btn {
  background: #f1f5f9;
  color: var(--ink);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hint { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--fail); }

.panel { display: block; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: 0.15s ease;
}
.tab:hover { color: var(--ink); border-color: #cbd5e1; }
.tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.tab.ghost {
  margin-left: auto;
  background: #fff;
  color: var(--fail);
  border-color: #fecaca;
}

.profile { display: flex; gap: 16px; align-items: center; }
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f1f5f9;
}
.meta h2 { font-size: 22px; font-weight: 700; }
.account, .sign { color: var(--muted); font-size: 13px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
}
.chip b { color: var(--ink); font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.stat {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
}
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { font-size: 20px; font-weight: 700; }
.stat small { color: var(--muted); margin-left: 2px; }

.exp-bar {
  height: 8px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
}
.exp-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.4s ease;
}
.exp-text { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: right; }
.mini-stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.mini-stats b { color: var(--ink); }

.cal-wrap {
  margin-top: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cal-head h3 { font-size: 14px; font-weight: 600; }
.legend { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot.on { background: var(--accent); }
.dot.off { background: #cbd5e1; }
.dot.future { background: #e2e8f0; }
.cal-week, .cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-week span {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.day {
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}
.day.ok {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.day.miss { background: #fef2f2; color: var(--fail); border-color: #fecaca; }
.day.future { background: #f8fafc; color: #cbd5e1; }
.day.empty { background: transparent; border-color: transparent; }

.signin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.signin-head h3 { font-size: 17px; font-weight: 600; }
.signin-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.signin-actions { display: flex; gap: 8px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.cat {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink);
  transition: 0.15s ease;
}
.cat:hover { border-color: var(--accent); }
.cat.on {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.cat.done { opacity: 0.55; }
.cat small { display: block; margin-top: 4px; opacity: 0.75; }

.progress {
  height: 8px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s linear;
}
.summary { margin-top: 12px; font-size: 13px; color: var(--muted); }
.log-table { margin-top: 12px; }
.log-head, .log li {
  display: grid;
  grid-template-columns: 1.4fr 1.3fr 0.8fr 0.6fr 0.8fr;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.log-head {
  color: var(--muted);
  padding: 8px 12px;
  font-size: 12px;
}
.log {
  list-style: none;
  max-height: 420px;
  overflow: auto;
}
.log li {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.log li.ok span:nth-child(3) { color: var(--ok); font-weight: 600; }
.log li.fail span:nth-child(3) { color: var(--fail); font-weight: 600; }

.avatar.sm { width: 48px; height: 48px; }
.post-card {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}
.post-meta { display: flex; gap: 12px; align-items: center; }
.post-meta h3 { font-size: 16px; font-weight: 600; }
.post-body {
  margin-top: 14px;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.post-images img {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f1f5f9;
}
.comment-list { list-style: none; margin-top: 14px; }
.comment-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.comment-list b { margin-right: 8px; }

.hidden { display: none !important; }

@media (max-width: 640px) {
  .shell { padding: 28px 16px 48px; }
  .hero h1 { font-size: 26px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .profile { flex-direction: column; text-align: center; }
  .chips { justify-content: center; }
  .signin-head { flex-direction: column; align-items: stretch; }
  .signin-actions { width: 100%; }
  .signin-actions .btn { flex: 1; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .log-head, .log li {
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
  }
  .log-head { display: none; }
  .log li span:nth-child(1)::before { content: "时间 "; color: var(--muted); }
  .log li span:nth-child(2)::before { content: "板块 "; color: var(--muted); }
  .log li span:nth-child(3)::before { content: "结果 "; color: var(--muted); font-weight: 400; }
  .log li span:nth-child(4)::before { content: "经验 "; color: var(--muted); }
  .log li span:nth-child(5)::before { content: "连续 "; color: var(--muted); }
}
