:root {
  --bg: #f5f5f7; --card: #fff; --text: #1d1d1f; --text2: #6e6e73;
  --blue: #0071e3; --border: #e5e5ea; --red: #ff3b30; --green: #34c759; --orange: #ff9500;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 70px; }
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.navbar .title { font-size: 17px; font-weight: 600; }
.navbar .back { font-size: 15px; color: var(--blue); cursor: pointer; background: none; border: none; }
.navbar .right { font-size: 15px; color: var(--blue); cursor: pointer; background: none; border: none; }
.search-bar { padding: 12px 16px 8px; }
.search-bar input {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: none;
  background: #e8e8ed; font-size: 15px; outline: none;
}
.filter-row {
  padding: 8px 16px; display: flex; gap: 8px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 13px; color: var(--text2); cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.flow-list { padding: 8px 16px; }
.flow-card {
  background: var(--card); border-radius: 14px; padding: 16px;
  margin-bottom: 12px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.flow-card .fc-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.flow-card .fc-meta { font-size: 12px; color: var(--text2); display: flex; flex-wrap: wrap; gap: 8px; }
.flow-card .fc-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: #e8f0fe; color: var(--blue); font-size: 11px;
}
.flow-card .fc-stats { margin-top: 10px; font-size: 12px; color: var(--text2); display: flex; gap: 14px; }
.status-pending { color: var(--orange); }
.status-rejected { color: var(--red); }
.status-approved { color: var(--green); }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 100;
}
.tabbar .tab { flex: 1; text-align: center; cursor: pointer; color: var(--text2); font-size: 11px; padding: 4px 0; }
.tabbar .tab .icon { font-size: 22px; display: block; }
.tabbar .tab.active { color: var(--blue); }
.btn {
  display: block; width: 100%; padding: 12px; border-radius: 12px;
  border: none; font-size: 16px; font-weight: 500; cursor: pointer; text-align: center; margin-top: 12px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-dark { background: var(--text); color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn-danger { background: var(--red); color: #fff; }
.form-group { padding: 16px; background: var(--card); margin-bottom: 10px; }
.form-group label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; outline: none; background: #fff;
}
.form-group textarea { min-height: 70px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--blue); }
.step-card { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 12px; position: relative; }
.step-card .step-num {
  position: absolute; left: -4px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step-card .step-body { margin-left: 36px; }
.step-card .step-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step-section { margin-top: 8px; }
.step-section .label { font-size: 12px; color: var(--blue); font-weight: 600; margin-bottom: 2px; }
.step-section .content { font-size: 14px; color: var(--text); white-space: pre-wrap; }
.comment-box { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.comment-item { font-size: 13px; padding: 6px 0; border-bottom: 1px solid #f2f2f7; }
.comment-item .who { color: var(--blue); font-weight: 500; }
.comment-item .when { color: var(--text2); font-size: 11px; }
.comment-input-row { display: flex; gap: 8px; margin-top: 8px; }
.comment-input-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.comment-input-row button { padding: 8px 14px; background: var(--blue); color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
.flow-header { padding: 20px 16px; background: var(--card); margin-bottom: 10px; }
.flow-header h1 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.flow-header .meta { font-size: 13px; color: var(--text2); }
.flow-header .author { margin-top: 10px; font-size: 13px; color: var(--text2); }
.action-bar {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; padding: 10px 16px; gap: 10px; z-index: 90;
}
.action-bar .abtn {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; cursor: pointer; text-align: center;
}
.action-bar .abtn.liked { background: #fff0f0; border-color: var(--red); color: var(--red); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .p-16 { padding: 16px; }
.text-center { text-align: center; } .text-muted { color: var(--text2); font-size: 13px; }
.empty { text-align: center; padding: 60px 20px; color: var(--text2); }
.empty .icon { font-size: 48px; margin-bottom: 12px; }
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 12px 20px;
  border-radius: 10px; font-size: 14px; z-index: 999; pointer-events: none;
}
.section-title { font-size: 15px; font-weight: 600; padding: 16px 16px 8px; }

/* ============ 可爱卡通主题 ============ */
body.cute {
  --bg: #fff8f3; --card: #fff; --text: #4a3f55; --text2: #9b8caa; --border: #ffe4d6;
  background: linear-gradient(180deg, #ffe8d6 0%, #fff8f3 200px);
}
body.cute .navbar { background: rgba(255,255,255,0.9); border-bottom: 2px dashed #ffd0b5; }
body.cute .navbar .title { font-weight: 800; letter-spacing: 1px; }
body.cute .flow-card {
  border-radius: 22px; padding: 18px; border: 2px solid #ffe4d6;
  box-shadow: 0 4px 0 #ffe4d6;
}
body.cute .flow-card .fc-title { font-size: 16px; font-weight: 700; color: #5a4a6a; }
body.cute .flow-card .fc-tag { background: linear-gradient(135deg, #ffd6e8, #ffe8d6); color: #e06090; border-radius: 20px; padding: 3px 10px; font-weight: 600; }
body.cute .chip { border-radius: 20px; padding: 8px 16px; font-weight: 600; }
body.cute .chip.active { background: linear-gradient(135deg, #ff9a9e, #fad0c4); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(255,154,158,0.4); }
.cute-hero {
  margin: 12px 16px 16px; padding: 28px 20px; border-radius: 24px;
  background: linear-gradient(135deg, #ffd6e8 0%, #c8e7ff 50%, #d4f5d4 100%);
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 6px 20px rgba(255,182,193,0.3);
}
.cute-hero .hero-emoji { font-size: 56px; display: block; margin-bottom: 8px; }
.cute-hero h1 { font-size: 22px; font-weight: 800; color: #5a4a6a; margin-bottom: 8px; line-height: 1.3; }
.cute-hero .hero-meta { display: inline-block; background: rgba(255,255,255,0.7); padding: 4px 14px; border-radius: 20px; font-size: 12px; color: #7a6a8a; }
.cute-steps { padding: 0 16px 20px; }
.cute-step { position: relative; padding-left: 56px; margin-bottom: 18px; }
.cute-step::before {
  content: ''; position: absolute; left: 22px; top: 48px; bottom: -18px;
  border-left: 3px dashed #ffc4b0;
}
.cute-step:last-child::before { display: none; }
.cute-step .step-badge {
  position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,0.1); border: 3px solid #fff; z-index: 2;
}
.cute-step:nth-child(6n+1) .step-badge { background: linear-gradient(135deg,#ff9a9e,#ff6b9d); }
.cute-step:nth-child(6n+2) .step-badge { background: linear-gradient(135deg,#a1c4fd,#6bb6ff); }
.cute-step:nth-child(6n+3) .step-badge { background: linear-gradient(135deg,#fbc2eb,#ffa8c5); }
.cute-step:nth-child(6n+4) .step-badge { background: linear-gradient(135deg,#c2e59c,#7ed957); }
.cute-step:nth-child(6n+5) .step-badge { background: linear-gradient(135deg,#ffd29d,#ff9a56); }
.cute-step:nth-child(6n+6) .step-badge { background: linear-gradient(135deg,#cdb4f5,#9b7ede); }
.cute-step .step-card-body { background: #fff; border-radius: 20px; padding: 16px; border: 2px solid #ffe4d6; box-shadow: 0 4px 0 #ffe4d6; }
.cute-step:nth-child(6n+1) .step-card-body { border-color: #ffd0dd; box-shadow: 0 4px 0 #ffd0dd; }
.cute-step:nth-child(6n+2) .step-card-body { border-color: #c5dfff; box-shadow: 0 4px 0 #c5dfff; }
.cute-step:nth-child(6n+3) .step-card-body { border-color: #ffd6ec; box-shadow: 0 4px 0 #ffd6ec; }
.cute-step:nth-child(6n+4) .step-card-body { border-color: #d4f0c0; box-shadow: 0 4px 0 #d4f0c0; }
.cute-step:nth-child(6n+5) .step-card-body { border-color: #ffe0c2; box-shadow: 0 4px 0 #ffe0c2; }
.cute-step:nth-child(6n+6) .step-card-body { border-color: #e3d5ff; box-shadow: 0 4px 0 #e3d5ff; }
.cute-step .step-title { font-size: 16px; font-weight: 700; color: #5a4a6a; margin-bottom: 10px; }
.cute-step .step-section { background: #fff8f3; border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.cute-step .step-section .label { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.cute-step .step-section .content { font-size: 14px; color: #5a4a6a; line-height: 1.6; }
body.cute .action-bar { border-top: none; background: transparent; padding: 0 16px 10px; }
body.cute .action-bar .abtn {
  border-radius: 20px; padding: 12px 0; font-weight: 700; font-size: 13px;
  border: 2px solid #ffe4d6; background: #fff; box-shadow: 0 4px 0 #ffe4d6;
}
body.cute .action-bar .abtn.liked { background: #ffe4ec; border-color: #ffb3cc; color: #ff4081; box-shadow: 0 4px 0 #ffb3cc; }
body.cute .tabbar { border-top: 2px dashed #ffd0b5; }
body.cute .tab { font-weight: 600; } body.cute .tab .icon { font-size: 24px; }
body.cute .comment-item { background: #fff8f3; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; border: none; }
body.cute .comment-box { border-top: 2px dashed #ffe4d6; }
body.cute .comment-input-row input { border-radius: 20px; border: 2px solid #ffe4d6; }
body.cute .comment-input-row button { border-radius: 20px; background: linear-gradient(135deg,#ff9a9e,#ff6b9d); }
.cute-deco { text-align: center; font-size: 14px; color: #b09ab5; padding: 8px 16px; }
