@charset "UTF-8";

.bfc-main-layout,
.bfc-input-col,
.bfc-result-col,
.bfc-input-section,
.bfc-input-grid,
.bfc-input-group,
.bfc-input,
.bfc-input-unit-row,
.bfc-unit-chip,
.bfc-chip-group,
.bfc-btn-row,
.bfc-support-grid,
.bfc-support-card,
.bfc-table-section,
.bfc-table-wrap,
.bfc-section,
.bfc-reference,
.bfc-disclaimer {
    box-sizing: border-box;
    max-width: 100%;
}

.bfc-main-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.bfc-input-col {
    position: sticky;
    top: 20px;
    min-width: 0;
}

.bfc-result-col {
    display: grid;
    gap: 12px;
    min-width: 0;
    scroll-margin-top: calc(var(--header-height, 56px) + 24px);
}

.bfc-input-section,
.bfc-result-hero,
.bfc-support-card,
.bfc-table-section,
.bfc-section {
    border: 1px solid #e8e1d6;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.06);
}

.bfc-input-section {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.bfc-input-title,
.bfc-table-title,
.bfc-reference-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
}

.bfc-tool-lead {
    margin: 8px 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: #5f5a56;
}

.bfc-input-title i,
.bfc-table-title i,
.bfc-reference-title i {
    color: #b9843e;
}

.bfc-intro,
.bfc-note,
.bfc-table-help,
.bfc-hero-subtext {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #665f56;
}

.bfc-input-grid,
.bfc-chip-section {
    display: grid;
    gap: 8px;
}

.bfc-input-group {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.bfc-label,
.bfc-chip-title,
.bfc-support-label,
.bfc-hero-eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
}

.bfc-input-unit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.bfc-input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #d8d1c6;
    border-radius: 9px;
    background: #ffffff;
    color: #2d2a26;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.bfc-input:hover {
    border-color: #c9ab79;
}

.bfc-input:focus {
    outline: none;
    border-color: #b9843e;
    box-shadow: 0 0 0 3px rgba(185, 132, 62, 0.12);
}

.bfc-input[aria-invalid="true"] {
    border-color: #c65b49;
    box-shadow: 0 0 0 3px rgba(198, 91, 73, 0.12);
    background: #fff7f5;
}

.bfc-unit-chip {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #ddd4c8;
    border-radius: 10px;
    background: #f7f3ed;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.bfc-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bfc-chip {
    min-height: 34px;
    border: 1px solid #ddd4c8;
    background: #f7f3ed;
    color: #5f5a56;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bfc-chip:hover,
.bfc-chip:focus-visible {
    border-color: #b9843e;
    background: #fffaf3;
    color: #4d463c;
    outline: none;
    transform: translateY(-1px);
}

.bfc-chip.active {
    border-color: #b9843e;
    background: linear-gradient(135deg, #f8ecd7 0%, #f2dfbd 100%);
    color: #7a5521;
}

.bfc-btn-row {
    display: grid;
    gap: 6px;
}

.bfc-btn-row .tool-btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
}

.bfc-result-hero {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-color: #e8d3b4;
    background: linear-gradient(135deg, #fffaf1 0%, #f5ead8 100%);
    box-shadow: 0 12px 26px rgba(140, 99, 39, 0.12);
}

.bfc-hero-eyebrow {
    color: #8b6228;
}

.bfc-hero-value {
    font-size: clamp(24px, 3.2vw, 30px);
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #2d2a26;
    word-break: break-word;
}

.bfc-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.bfc-support-card {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.bfc-support-card.is-highlight {
    border-color: #e8d3b4;
    background: linear-gradient(135deg, #fff8ea 0%, #f6ebd8 100%);
}

.bfc-support-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.01em;
    color: #2d2a26;
    word-break: break-word;
}

.bfc-table-section,
.bfc-section {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.bfc-table-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.bfc-table-help {
    white-space: nowrap;
}

.bfc-table-wrap {
    overflow-x: auto;
}

.bfc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px;
}

.bfc-table th,
.bfc-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #efe7da;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    color: #2d2a26;
}

.bfc-table thead th {
    font-size: 12px;
    font-weight: 700;
    color: #61594f;
    background: #faf6ef;
}

.bfc-table tbody tr:last-child th,
.bfc-table tbody tr:last-child td {
    border-bottom: none;
}

.bfc-table tbody th {
    width: 42%;
    font-weight: 600;
    color: #433d35;
}

.bfc-reference-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: #4c463f;
    font-size: 13px;
    line-height: 1.55;
}

.bfc-disclaimer {
    margin-top: 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e7dccf;
    background: #faf7f1;
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.6;
}

.bfc-disclaimer i {
    color: #8b6228;
    font-size: 16px;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .bfc-main-layout {
        grid-template-columns: 1fr;
    }

    .bfc-input-col {
        position: static;
    }
}

@media (max-width: 768px) {
    .bfc-support-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bfc-table-help {
        white-space: normal;
    }

    .bfc-btn-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .bfc-input-section,
    .bfc-result-hero,
    .bfc-table-section,
    .bfc-section {
        padding: 12px;
    }

    .bfc-support-grid {
        grid-template-columns: 1fr;
    }

    .bfc-hero-value {
        font-size: 22px;
    }

    .bfc-table {
        min-width: 0;
    }

    .bfc-table th,
    .bfc-table td {
        padding: 9px 10px;
        font-size: 12px;
    }
}
