.tcm-card {
    margin-bottom: 2rem;
}

/* 可折叠的 h5 标题样式 */
.tcm-card .collapsible-h5 {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px;
    transition: background-color 0.2s ease;
    margin: 0 0 1rem 0;
    padding: 10px 25px 10px 0;
}

.tcm-card .collapsible-h5:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 展开/收起箭头图标 */
.tcm-card .collapsible-h5::after {
    content: '▼';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #888;
    transition: transform 0.3s ease;
}

/* 收起状态时的箭头方向 */
.tcm-card .collapsible-h5.collapsed::after {
    content: '▶';
}

/* 可折叠内容区域 - 默认展开 */
.tcm-card .collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    max-height: 5000px; /* 足够大以容纳内容 */
}

/* 收起状态 */
.tcm-card .collapsible-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* 可选：添加一些视觉分隔效果 */
.tcm-card .collapsible-h5 {
    border-bottom: 1px solid #eee;
}
        .tcm-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 1.8rem;
            margin: 1rem 0;
        }
        .tcm-card {
            background: var(--background);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1rem 0.5rem 1rem 0.5rem;
            border: 1px solid var(--border);
            transition: box-shadow 0.2s;
        }
        .tcm-card:hover {
            box-shadow: var(--shadow-hover);
        }
        /* 条目横排容器 */
        .row-items {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem 1.8rem;
            align-items: center;
            margin-bottom: 0.5rem;
    padding: 0.3em 0.3em  0.5em 1em  ;
        }
.item {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem 0.1rem;
    background: var(--background-alt);
    padding: 0.1rem 0.1rem 0.1rem 0.1rem;
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--text-dark);
    border: 1px solid #fff;
    flex: 0 1 auto; 
    min-width: fit-content;  
    line-height: 1.2; 
}
.item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: white;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    vertical-align: middle;
    flex-shrink: 0; /* 防止在flex容器中被压缩 */
}

.item input[type="checkbox"]:hover {
    border-color: var(--reded);
    box-shadow: 0 0 0 2px rgba(154,31,28,0.1);
}

.item input[type="checkbox"]:checked {
    background-color: var(--reded);
    border-color: var(--reded);
}

.item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.item input[type="checkbox"]:focus {
    outline: 2px solid rgba(154,31,28,0.2);
    outline-offset: 2px;
}

/* 确保复选框标签文字样式一致 */
.item label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    line-height: 1.4;
    color: var(--text-dark);
}
.item input[type="text"],
.item input[type="number"],
.item input[type="email"],
.item input[type="tel"],
.item textarea {
    width: auto; 
    min-width: 100px;  
    max-width: 400px; 
    flex: 1 1 auto; 
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.9rem;
    background: white;
}

.item textarea {
    width: auto; 
    min-width: 100px;  
    max-width: 400px; 
    flex: 1 1 auto; 
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.9rem;
    background: white;
}
		
/* 聚焦效果 */
.item input:focus,
.item textarea:focus {
    outline: none;
    border-color: var(--reded);
    box-shadow: 0 0 0 2px rgba(154,31,28,0.1);
}

/* 邮箱输入框稍微宽一点 */
.item input[type="email"] {
    min-width: 180px;
}

/* 文本域特殊处理 */
.item textarea {
    min-width: 300px;
    max-width: 400px;
    border-radius: 12px;
    resize: vertical;
}

/* 卡片内的独立文本域（不在.item内） */
.tcm-card > textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.7rem;
    font-family: inherit;
    background: white;
    margin-top: 0.5rem;
}

.tcm-card > textarea:focus {
    outline: none;
    border-color: var(--reded);
    box-shadow: 0 0 0 2px rgba(154,31,28,0.1);
}
        /* 文本区适应卡片 */
        .full-width textarea {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: calc(var(--radius) - 2px);
            padding: 0.7rem;
            font-family: inherit;
            background: white;
            margin-top: 0.5rem;
        }
        hr.divider {
            margin: 1rem 0;
            border: 0;
            height: 1px;
            background: linear-gradient(to right, transparent, var(--secondary), transparent);
        }
        .form-submit {

    position: fixed;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 1rem;
            background: var(--reded);
            color: white;
            padding: 0.9rem 2.5rem;
            font-size: 1.3rem;
            border-radius: 20px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(154,31,28,0.3);
            transition: all 0.2s;
            width: auto;
            margin: 2rem auto 0.5rem;
        }
        .form-submit:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
        }

        .item i {
            font-size: 1.1rem;
            color: var(--reded);
            width: 1.2rem;
            text-align: center;
        }
		
  @media (max-width: 768px) {
    .responsive-duo {
      grid-template-columns: 1fr !important;
      gap: 1.5rem !important;
    }
  }
/* 移动版优化 */
/* 移动版优化 - 复选框横排，其他纵排 */
@media (max-width: 768px) {
    .item {
        line-height: 1;
    }
    .row-items {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        align-items: center;
    }
    
    /* 复选框项目保持横排 */
    .item:has(input[type="checkbox"]):not(:has(input[type="text"])) {
        display: inline-flex;
        width: auto;
        flex: 0 1 auto;
        margin-right: 0.5rem;
    }
    
    /* 包含文本输入框的项目纵排占满 */
    .item:has(input[type="text"]),
    .item:has(input[type="number"]),
    .item:has(input[type="email"]),
    .item:has(input[type="tel"]),
    .item:has(textarea) {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* 调整标签宽度 */
    .item:has(input[type="text"]) label,
    .item:has(input[type="number"]) label,
    .item:has(input[type="email"]) label,
    .item:has(input[type="tel"]) label,
    .item:has(textarea) label {
        min-width: 70px;
        white-space: nowrap;
    }
    
    /* 输入框占剩余空间 */
    .item:has(input[type="text"]) input,
    .item:has(input[type="number"]) input,
    .item:has(input[type="email"]) input,
    .item:has(input[type="tel"]) input,
    .item:has(textarea) textarea {
        width: calc(100% - 80px);
        min-width: 0;
        max-width: none;
    }
    
    /* 特殊处理邮箱输入框 */
    .item input[type="email"] {
        min-width: 0;
    }
    
    /* 调整复选框组的行容器 */
    .row-items:has(.item input[type="checkbox"]) {
        gap: 0.5rem;
    }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
    /* 复选框项目保持横排，但缩小间距 */
    .item:has(input[type="checkbox"]):not(:has(input[type="text"])) {
        padding: 0.2rem 0.6rem;
        font-size: 0.85rem;
    }
    
    /* 文本输入框项目保持左右布局 */
    .item:has(input[type="text"]) label,
    .item:has(input[type="number"]) label,
    .item:has(input[type="email"]) label,
    .item:has(input[type="tel"]) label,
    .item:has(textarea) label {
        min-width: 60px;
        font-size: 0.85rem;
    }
    
    .item:has(input[type="text"]) input,
    .item:has(input[type="number"]) input,
    .item:has(input[type="email"]) input,
    .item:has(input[type="tel"]) input,
    .item:has(textarea) textarea {
        width: calc(100% - 70px);
        padding: 0.2rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* 复选框大小微调 */
    .item input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}

/* 统一 placeholder 样式 */
.item input::placeholder,
.item textarea::placeholder {
    font-size: 0.8rem;
    color: #555555;
    font-weight: normal;
    line-height: 1.4;
    opacity: 1; /* Firefox 兼容 */
}

/* 针对不同浏览器的兼容写法 */
.item input::-webkit-input-placeholder,
.item textarea::-webkit-input-placeholder {
    font-size: 0.8rem;
    color: #555555;
    font-weight: normal;
    line-height: 1.4;
}

.item input::-moz-placeholder,
.item textarea::-moz-placeholder {
    font-size: 0.8rem;
    color: #555555;
    font-weight: normal;
    line-height: 1.4;
}

.item input:-ms-input-placeholder,
.item textarea:-ms-input-placeholder {
    font-size: 0.8rem;
    color: #555555;
    font-weight: normal;
    line-height: 1.4;
}

/* 文本框特殊处理，保持多行文本 placeholder 显示完整 */
.item textarea::placeholder {
    white-space: pre-wrap;
    line-height: 1.4;
}

.item textarea::placeholder {
    font-size: 0.8rem;
}

/* 脉诊表格专用样式 */
pulse-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
pulse-table th,
pulse-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: center;
}
row-items {
display: flex;
flex-wrap: wrap;
gap: 6px 12px;
margin-bottom: 6px;
}
row-items .item {
display: inline-flex;
align-items: center;
gap: 4px;
}
full-width-input {
width: 100%;
padding: 8px;
box-sizing: border-box;
}

 .response-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.response-table th, .response-table td { border: 1px solid #ddd; padding: 10px 8px; text-align: left; vertical-align: top; }
.response-table th { background: #f5f0e6; font-weight: 600; }
.response-table .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.response-table .checkbox-group label { margin-right: 8px; font-weight: normal; }
/* 版本记录表格样式 */
.version-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
.version-table th,
.version-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: center;
}
.footer-style {
margin-top: 20px;
padding: 15px;
text-align: center;
background-color: #f5f5f5;
border-radius: 8px;
}