:root {
    --bg: #f6f8f5;
    --card-bg: #ffffff;
    --primary: #3b7a57;
    --primary-light: #e8f3ec;
    --primary-hover: #2e6647;
    --accent: #d97706;
    --accent-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --border: #e5e7eb;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px 12px;
  }
  .container { max-width: 880px; margin: 0 auto; }

  /* 头部与倒计时栏 */
  header {
    background: linear-gradient(135deg, #2e6647, #488f68);
    color: #fff;
    padding: 22px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(46, 102, 71, 0.15);
  }
  header h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
  header p { font-size: 13px; opacity: 0.92; }
  .status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.16);
    padding: 8px 12px;
    border-radius: 8px;
  }

  /* 标签页导航 */
  .tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    overflow-x: auto;
  }
  .tab-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
  }
  .tab-btn.active {
    background: var(--primary);
    color: #fff;
  }
  .tab-pane { display: none; }
  .tab-pane.active { display: block; }

  /* 卡片与通用标题栏 */
  .card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  }
  .card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    flex-wrap: wrap;
    gap: 8px;
  }
  .card-header-flex h2 {
    font-size: 16px;
    color: var(--primary);
    margin: 0;
    padding: 0;
    border: none;
  }
  .toolbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-light);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--primary-hover);
  }

  /* 网格 */
  .grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
  }

  /* 成员卡片样式 */
  .member-card {
    background: #fdfdfd;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
  }
  .member-card.empty { background: #f3f4f6; color: #9ca3af; border-style: dashed; }
  .member-name { font-weight: 700; color: var(--primary); font-size: 14px; margin-bottom: 4px; }
  .tag-pill {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    margin: 2px 4px 2px 0;
    font-weight: 600;
  }

  /* Checklist 样式 */
  .checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
  }
  .checklist-item:last-child { margin-bottom: 0; }
  .checklist-item input {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
  }
  .checklist-item.checked span {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.65;
  }

  /* 表单与动态列表行 */
  .form-group { margin-bottom: 14px; }
  .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-main); }
  .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: var(--text-main);
  }
  .combo-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
  }
  .combo-row select { flex: 1; min-width: 120px; }
  .combo-row input { flex: 1.5; }

  /* 按钮样式 */
  .btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .btn:hover { background: var(--primary-hover); }
  .btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
  .btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
  }
  .btn-outline:hover { background: var(--primary-light); }
  .btn-danger-outline {
    background: #fff;
    color: var(--danger);
    border: 1px solid #fca5a5;
  }
  .btn-danger-outline:hover { background: var(--danger-light); }

  /* 文本预览与代码生成框 */
  .preview-box {
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    padding: 12px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 10px;
    color: #1e293b;
  }

  /* 速查表格 */
  .ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  .ref-table th, .ref-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
  }
  .ref-table th {
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 600;
  }
  .ref-table tr:nth-child(even) { background: #fafafa; }

  footer { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 24px; }
