/* 站度网 · 条码生成器 */
#app {
    --bc-line: #e5e7eb;
    --bc-soft: #f7f8fa;
    --text-dim: #86868b;
}

/* 码制选择：独立卡片式按钮，2 列布局，避免与全站 .seg 的灰底容器混淆 */
#app .bc-fmts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 2px 0 10px;
}

#app .bc-fmt {
    padding: 10px 8px;
    border: 1px solid #dbe1ec;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

#app .bc-fmt:hover {
    border-color: #9db8f5;
    color: #2f4bd0;
    background: #f7f9ff;
}

#app .bc-fmt.active {
    background: #2f6bff;
    border-color: #2f6bff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(47, 107, 255, .28);
}

/* 颜色选择器：色块 + 色值 */
#app .bc-color {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    padding: 0 14px 0 6px;
    border: 1px solid #dbe1ec;
    border-radius: 10px;
    background: #fff;
}

#app .bc-color input[type="color"] {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e2e8f2;
    border-radius: 7px;
    background: none;
    cursor: pointer;
    flex: none;
}

#app .bc-color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

#app .bc-color input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

#app .bc-color-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: #64748b;
    letter-spacing: .3px;
    text-transform: uppercase;
}

/* 滑杆字段：统一结构（label + range + hint），保证左右两列等高不错位 */
#app .bc-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
}

#app .bc-field label {
    margin-bottom: 0;
}

#app .bc-field .hint {
    margin-top: 2px;
    line-height: 1.45;
}

/* 快捷示例与上方提示之间留一点距离 */
#app .bc-chips {
    margin-top: 4px;
}

/* 快捷示例 */
#app .bc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#app .bc-chip {
    border: 1px solid var(--bc-line);
    background: #fff;
    color: #374151;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .16s ease;
}

#app .bc-chip:hover {
    border-color: #2f6bff;
    color: #2f6bff;
    background: #f2f6ff;
}

/* 滑杆 */
#app .bc-range {
    width: 100%;
    height: 6px;
    margin: 10px 0 4px;
    border-radius: 999px;
    background: #e8ebf2;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#app .bc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2f6bff;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(47, 107, 255, .45);
    cursor: pointer;
}

#app .bc-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2f6bff;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(47, 107, 255, .45);
    cursor: pointer;
}

#app .bc-val {
    display: inline-block;
    min-width: 34px;
    padding: 1px 7px;
    margin-left: 4px;
    border-radius: 6px;
    background: #eef2ff;
    color: #2f4bd0;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

/* 复选框 */
#app .bc-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--bc-line);
}

#app .bc-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

#app .bc-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #2f6bff;
    cursor: pointer;
}

/* 预览区 */
#app .bc-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    padding: 22px 16px;
    margin: 4px 0 12px;
    border: 1px dashed #d7dce6;
    border-radius: 12px;
    background: repeating-conic-gradient(#fbfcfd 0 25%, #f1f3f7 0 50%) 0 0 / 16px 16px;
    overflow-x: auto;
}

#app .bc-preview svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 结果信息条 */
#app .bc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
}

#app .bc-meta b {
    color: #111827;
    font-weight: 700;
}

#app .bc-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: #eef2ff;
    color: #2f4bd0;
    font-weight: 700;
    font-size: 12px;
}

#app .bc-tag-ok {
    background: #e7f6ec;
    color: #15803d;
}

#app .bc-bad {
    color: #d92d20;
    font-weight: 600;
}

#app .bc-warn {
    color: #b45309;
    font-weight: 600;
}

@media (max-width: 768px) {
    #app {
        padding: 0;
    }

    #app .bc-fmts {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    #app .bc-fmt {
        padding: 9px 6px;
        font-size: 13px;
    }

    #app .bc-color {
        height: 42px;
    }

    #app .bc-field {
        margin-bottom: 10px;
    }

    #app .bc-preview {
        min-height: 140px;
        padding: 16px 10px;
    }

    #app .bc-meta {
        font-size: 12.5px;
    }

    #app .toolbar-row {
        flex-wrap: wrap;
    }

    #app .toolbar-row .btn {
        flex: 1 1 100%;
    }
}
