/* 在线条形码生成器 — 作用域限制在 .bc-page，观感对齐站内工具页与设计系统 v1 */
.bc-page {
    --bc-primary: #2563eb;
    --bc-primary-dark: #1d4ed8;
    --bc-primary-soft: #eef3fe;
    --bc-ink: #0f1c2e;
    --bc-muted: #5a6b80;
    --bc-line: #e4eaf2;
    --bc-bg: #f6f8fc;
    --bc-warn: #8a5a12;
    --bc-warn-soft: #fdf3e2;
    --bc-danger: #b42318;
    --bc-radius-card: 16px;
    --bc-radius-ctl: 12px;
    --bc-shadow: 0 10px 26px rgba(19, 44, 79, .05);

    color: var(--bc-ink);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #fff;
    margin: 0;
    padding: 0 0 88px;
    overflow-x: hidden;
}
.bc-page * { box-sizing: border-box; }
.bc-page button,
.bc-page input,
.bc-page select,
.bc-page textarea { color: inherit; font: inherit; }
.bc-page button { -webkit-tap-highlight-color: transparent; }

.bc-page .page-shell {
    width: min(1128px, calc(100% - 64px));
    margin: 0 auto;
    padding: 36px 0 0;
}

/* 面包屑 */
.bc-page .bc-breadcrumb { margin: 0 0 18px; font-size: 13px; color: var(--bc-muted); }
.bc-page .bc-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 8px; list-style: none; margin: 0; padding: 0; align-items: center; }
.bc-page .bc-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.bc-page .bc-breadcrumb li:not(:last-child)::after { content: "/"; color: #b0b6bd; margin-left: 2px; }
.bc-page .bc-breadcrumb a { color: var(--bc-primary); text-decoration: none; }
.bc-page .bc-breadcrumb a:hover { text-decoration: underline; }
.bc-page .bc-breadcrumb [aria-current="page"] { color: var(--bc-ink); font-weight: 600; }

/* 页头 */
.bc-page .page-title { margin-bottom: 28px; }
.bc-page .page-title .eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em;
    color: var(--bc-primary); background: var(--bc-primary-soft);
    border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.bc-page .page-title h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; letter-spacing: -.01em; }
.bc-page .page-title p { margin: 0; color: var(--bc-muted); font-size: 15px; line-height: 1.7; max-width: 820px; }

/* 工具卡 */
.bc-page .bc-tool {
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius-card);
    background: #fff;
    box-shadow: var(--bc-shadow);
    padding: 24px;
    margin-bottom: 18px;
}
.bc-page .bc-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.bc-page .bc-input {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius-ctl);
    background: #fcfdff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
}
.bc-page .bc-input:focus { outline: none; border-color: var(--bc-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.bc-page .bc-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--bc-muted); }

.bc-page .bc-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 18px;
    margin: 18px 0 0;
    padding: 16px;
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius-ctl);
    background: #fbfcfe;
}
.bc-page .bc-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bc-page .bc-opt > span { font-size: 12.5px; font-weight: 700; color: var(--bc-muted); }
.bc-page .bc-opt select,
.bc-page .bc-opt input[type="number"] {
    width: 100%; padding: 8px 10px; border: 1px solid var(--bc-line);
    border-radius: 10px; background: #fff; font-size: 14px;
}
.bc-page .bc-opt input[type="range"] { width: 100%; accent-color: var(--bc-primary); }
.bc-page .bc-opt input[type="color"] {
    width: 100%; height: 36px; padding: 2px; border: 1px solid var(--bc-line);
    border-radius: 10px; background: #fff; cursor: pointer;
}
.bc-page .bc-opt-check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; }
.bc-page .bc-opt-check input { width: 16px; height: 16px; accent-color: var(--bc-primary); }
.bc-page .bc-opt-val { font-size: 12.5px; color: var(--bc-muted); font-variant-numeric: tabular-nums; }

/* 按钮 */
.bc-page .bc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.bc-page .bc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px; border: 1px solid var(--bc-line); border-radius: 999px;
    background: #fff; color: var(--bc-ink); font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; line-height: 1.2;
}
.bc-page .bc-btn:hover { border-color: #c9d6ea; background: #f8fbff; }
.bc-page .bc-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }
.bc-page .bc-btn-primary { background: var(--bc-primary); border-color: var(--bc-primary); color: #fff; }
.bc-page .bc-btn-primary:hover { background: var(--bc-primary-dark); border-color: var(--bc-primary-dark); }

.bc-page .bc-error {
    margin: 14px 0 0; padding: 12px 14px; border-radius: var(--bc-radius-ctl);
    border: 1px solid #f3d6cf; background: #fdf6f5; color: var(--bc-danger);
    font-size: 13.5px; line-height: 1.7;
}

/* 预览区 */
.bc-page .bc-preview {
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.bc-page .bc-preview-batch { grid-template-columns: repeat(var(--bc-cols, 2), minmax(0, 1fr)); }
.bc-page .bc-empty {
    margin: 0; padding: 40px 16px; text-align: center; color: var(--bc-muted); font-size: 14px;
    border: 1px dashed var(--bc-line); border-radius: var(--bc-radius-ctl); background: #fbfcfe;
}
.bc-page .bc-card {
    border: 1px solid var(--bc-line); border-radius: var(--bc-radius-ctl);
    background: #fff; padding: 12px; min-width: 0; display: flex; flex-direction: column; gap: 8px;
}
.bc-page .bc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-page .bc-card-fmt {
    font-size: 12px; color: var(--bc-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bc-page .bc-card-stage { display: flex; align-items: center; justify-content: center; padding: 10px 6px; overflow-x: auto; }
.bc-page .bc-card-stage svg { max-width: 100%; height: auto; display: block; }
.bc-page .bc-card-ops { display: flex; gap: 8px; justify-content: flex-end; }
.bc-page .bc-mini {
    padding: 5px 10px; border: 1px solid var(--bc-line); border-radius: 999px;
    background: #fff; font-size: 12px; font-weight: 700; color: var(--bc-muted); cursor: pointer;
}
.bc-page .bc-mini:hover { border-color: #c9d6ea; color: var(--bc-primary); }
.bc-page .bc-preview-note { margin: 10px 0 0; font-size: 12.5px; color: var(--bc-muted); }

/* 隐私 / noscript */
.bc-page .bc-privacy {
    margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius-ctl); background: #fbfcfe; color: var(--bc-muted); font-size: 13px; line-height: 1.7;
}

/* 说明区 */
.bc-page .info-section { margin-bottom: 36px; }
.bc-page .info-section > h2 { margin: 0 0 16px; font-size: 21px; line-height: 1.4; }
.bc-page .info-content { color: var(--bc-ink); font-size: 15px; line-height: 1.8; }
.bc-page .info-content ol,
.bc-page .info-content ul { margin: 0 0 12px; padding-left: 22px; }
.bc-page .info-content li { margin-bottom: 8px; }
.bc-page .info-content code {
    padding: 1px 6px; border-radius: 6px; background: var(--bc-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px;
}
.bc-page .bc-format-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; }
.bc-page .bc-format-table th,
.bc-page .bc-format-table td { padding: 10px 12px; border-bottom: 1px solid var(--bc-line); text-align: left; vertical-align: top; }
.bc-page .bc-format-table th { background: #fbfcfe; font-weight: 700; }
.bc-page .bc-format-table td code { white-space: nowrap; }

.bc-page .bc-faq-item { border: 1px solid var(--bc-line); border-radius: var(--bc-radius-ctl); margin-bottom: 10px; background: #fff; }
.bc-page .bc-faq-item > summary { padding: 13px 16px; cursor: pointer; font-weight: 700; font-size: 15px; }
.bc-page .bc-faq-item > summary::marker { color: var(--bc-primary); }
.bc-page .bc-faq-a { padding: 0 16px 14px; color: var(--bc-muted); font-size: 14px; line-height: 1.8; }
.bc-page .bc-faq-a p { margin: 0; }

.bc-page .bc-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bc-page .bc-related a {
    display: block; padding: 16px; border: 1px solid var(--bc-line); border-radius: var(--bc-radius-ctl);
    background: #fff; text-decoration: none; color: inherit;
}
.bc-page .bc-related a:hover { border-color: #c9d6ea; background: #f8fbff; }
.bc-page .bc-related .rel-title { font-weight: 700; margin-bottom: 6px; }
.bc-page .bc-related .rel-desc { font-size: 13px; color: var(--bc-muted); line-height: 1.6; }

/* 打印容器：屏幕上不显示 */
.bc-page .bc-print-root { display: none; }

@media print {
    body * { visibility: hidden !important; }
    .bc-print-root {
        display: block !important;
        position: absolute; left: 0; top: 0; width: 100%;
        padding: 10mm; background: #fff;
    }
    .bc-print-root, .bc-print-root * { visibility: visible !important; }
    .bc-print-root .bc-print-item { margin: 0 0 8mm; page-break-inside: avoid; break-inside: avoid; text-align: center; }
    .bc-print-root .bc-print-fmt { font-size: 10px; color: #666; margin-top: 2mm; }
    .bc-print-root .bc-print-title { font-size: 16px; margin: 0 0 6mm; }
}

/* 响应式 */
@media (max-width: 900px) {
    .bc-page .page-shell { width: calc(100% - 40px); padding-top: 24px; }
    .bc-page .bc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bc-page .bc-preview-batch { grid-template-columns: repeat(min(var(--bc-cols, 2), 2), minmax(0, 1fr)); }
    .bc-page .bc-related { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .bc-page { padding-bottom: 64px; }
    .bc-page .page-shell { width: calc(100% - 28px); padding-top: 18px; }
    .bc-page .page-title h1 { font-size: 24px; }
    .bc-page .page-title p { font-size: 14px; }
    .bc-page .bc-tool { padding: 16px; }
    .bc-page .bc-options { grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
    .bc-page .bc-actions { gap: 8px; }
    .bc-page .bc-btn { flex: 1 1 calc(50% - 8px); padding: 10px 12px; font-size: 13.5px; }
    .bc-page .bc-preview-batch { grid-template-columns: 1fr; }
    .bc-page .info-section > h2 { font-size: 19px; }
    .bc-page .bc-format-table { display: block; overflow-x: auto; white-space: nowrap; }
}
