.bwc-tool-intro {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.bwc-tool-lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #4f4a44;
}

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

.bwc-input-col,
.bwc-result-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.bwc-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.bwc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.bwc-section-title,
.bwc-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
}

.bwc-mode-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.bwc-mode-btn {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e3ddd1;
    border-radius: 10px;
    background: #f8f5ef;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bwc-mode-btn:hover,
.bwc-mode-btn:focus-visible {
    border-color: #d4c67a;
    background: #f7f0e1;
    color: #2d2a26;
    outline: none;
}

.bwc-mode-btn.is-active {
    border-color: #d4af37;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.08) 100%);
    color: #8a6500;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15);
}

.bwc-mode-panel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.bwc-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.bwc-input-group {
    display: grid;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.bwc-input-group-full {
    grid-column: 1 / -1;
}

.bwc-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #3e3933;
}

.bwc-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.bwc-input-row-compact {
    grid-template-columns: minmax(0, 1fr) auto;
}

.bwc-input,
.bwc-select,
.bwc-time-grid .bwc-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.bwc-input {
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #ddd6ca;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #2d2a26;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bwc-input:hover {
    border-color: #d4c67a;
}

.bwc-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.bwc-input[aria-invalid="true"] {
    border-color: #c74f46;
    box-shadow: 0 0 0 3px rgba(199, 79, 70, 0.12);
}

.bwc-input::placeholder {
    color: #c4c0bc;
}

.bwc-select {
    min-width: 112px;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8a7f67 50%), linear-gradient(135deg, #8a7f67 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.bwc-input-hint,
.bwc-support-note,
.bwc-section-help {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #7a756d;
}

.bwc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 0 12px;
    min-height: 46px;
    border: 1px solid #e6dfd1;
    border-radius: 10px;
    background: #f7f4ef;
    color: #6b645b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.bwc-time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.bwc-preset-section {
    display: grid;
    gap: 8px;
}

.bwc-chip-title {
    font-size: 12px;
    font-weight: 700;
    color: #6d6458;
}

.bwc-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bwc-preset-chip {
    padding: 9px 12px;
    border: 1px solid #e3ddd1;
    border-radius: 999px;
    background: #faf8f4;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.bwc-preset-chip:hover,
.bwc-preset-chip:focus-visible {
    border-color: #d4c67a;
    background: #f7f0e1;
    color: #2d2a26;
    outline: none;
}

.bwc-preset-chip.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
}

.bwc-action-row {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.bwc-calculate-btn,
.bwc-reset-btn {
    border-radius: 10px;
    min-height: 46px;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.bwc-calculate-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #e8e4dc;
    background: #faf7f2;
    color: #2d2a26;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.12);
}

.bwc-calculate-btn:hover,
.bwc-calculate-btn:focus-visible {
    background: #f7f0e1;
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.18);
    outline: none;
}

.bwc-reset-btn {
    padding: 12px 16px;
    border: 1px solid #e8e4dc;
    background: #f5f3f0;
    color: #5f5a56;
    font-weight: 500;
    min-width: 96px;
}

.bwc-reset-btn:hover,
.bwc-reset-btn:focus-visible {
    border-color: #d4c67a;
    background: #f0ece6;
    outline: none;
}

.bwc-reference-card {
    display: grid;
    gap: 12px;
}

.bwc-reference-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: #4f4a44;
    font-size: 13px;
    line-height: 1.65;
}

.bwc-result-panel {
    display: grid;
    gap: 10px;
    padding: 22px;
    border: 1px solid #eadfb8;
    border-radius: 16px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.bwc-result-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.15);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.bwc-result-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #2d2a26;
}

.bwc-result-value {
    font-size: clamp(32px, 4vw, 42px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #2d2a26;
    word-break: break-word;
}

.bwc-result-lead,
.bwc-result-formula {
    margin: 0;
    color: #5b554d;
    line-height: 1.6;
}

.bwc-result-lead {
    font-size: 14px;
}

.bwc-result-formula {
    font-size: 13px;
    color: #7a6a42;
}

.bwc-support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bwc-support-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.05);
}

.bwc-support-label {
    font-size: 12px;
    font-weight: 600;
    color: #7b746a;
}

.bwc-support-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #2d2a26;
}

.bwc-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.bwc-chart {
    display: grid;
    gap: 12px;
}

.bwc-chart-row {
    display: grid;
    gap: 8px;
}

.bwc-chart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.bwc-chart-label {
    font-size: 13px;
    font-weight: 700;
    color: #3c372f;
}

.bwc-chart-meta {
    font-size: 12px;
    color: #7b746a;
}

.bwc-chart-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #f0ece4;
    overflow: hidden;
}

.bwc-chart-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #d4af37 0%, #f0d47a 100%);
}

.bwc-chart-row.is-current .bwc-chart-fill {
    background: linear-gradient(90deg, #8a6500 0%, #d4af37 100%);
}

.bwc-chart-row.is-recommended .bwc-chart-fill,
.bwc-chart-row.is-period .bwc-chart-fill {
    background: linear-gradient(90deg, #5f6f52 0%, #8bb174 100%);
}

.bwc-empty-state {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 28px 20px;
    text-align: center;
    border: 1px dashed #dfd7c9;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
    color: #8c8478;
}

.bwc-empty-state i {
    font-size: 26px;
    color: #d4af37;
    opacity: 0.55;
}

.bwc-empty-state p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.bwc-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.bwc-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.bwc-table th,
.bwc-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee7db;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.55;
    color: #4b463f;
}

.bwc-table thead th {
    font-size: 12px;
    font-weight: 700;
    color: #7a746b;
    background: #faf8f4;
}

.bwc-table tbody tr.is-current {
    background: rgba(212, 175, 55, 0.08);
}

.bwc-table tbody tr.is-recommended {
    background: rgba(109, 154, 90, 0.08);
}

.bwc-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    font-size: 11px;
    line-height: 1.6;
    color: #9e9a96;
}

.bwc-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

.bwc-hidden {
    display: none !important;
}

.bwc-waiting {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #7b746a;
}

.bwc-waiting i {
    font-size: 24px;
    color: #d4af37;
    opacity: 0.7;
}

.bwc-waiting strong {
    display: block;
    margin-bottom: 4px;
    color: #3f392f;
}

.bwc-waiting p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

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

    .bwc-mode-group,
    .bwc-field-grid,
    .bwc-time-grid,
    .bwc-support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bwc-section,
    .bwc-result-panel {
        padding: 16px;
    }

    .bwc-action-row {
        flex-direction: column;
    }

    .bwc-reset-btn,
    .bwc-calculate-btn {
        width: 100%;
    }

    .bwc-input-row {
        grid-template-columns: 1fr;
    }

    .bwc-unit-chip,
    .bwc-select {
        width: 100%;
    }

    .bwc-table-wrap {
        overflow-x: visible;
    }

    .bwc-table {
        min-width: 0;
        table-layout: fixed;
    }

    .bwc-table thead {
        display: none;
    }

    .bwc-table,
    .bwc-table tbody,
    .bwc-table tr,
    .bwc-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .bwc-table tbody {
        display: grid;
        gap: 10px;
    }

    .bwc-table tr {
        border: 1px solid #eee7db;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }

    .bwc-table td {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 8px;
        padding: 9px 10px;
        border-bottom: 1px solid #f2ece2;
        font-size: 12px;
        line-height: 1.5;
        word-break: break-word;
    }

    .bwc-table tr td:last-child {
        border-bottom: 0;
    }

    .bwc-table td::before {
        color: #7a746b;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.45;
        content: '';
    }

    .bwc-table td:nth-child(1)::before { content: '구분'; }
    .bwc-table td:nth-child(2)::before { content: '값'; }
    .bwc-table td:nth-child(3)::before { content: '설명'; }
    .bwc-table td:nth-child(4)::before { content: '비고'; }

    .bwc-empty-row td {
        display: block;
        text-align: center;
        padding: 12px 10px;
    }

    .bwc-empty-row td::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .bwc-main-layout,
    .bwc-input-col,
    .bwc-result-col {
        max-width: 100%;
        overflow-x: hidden;
    }

    .bwc-result-title {
        font-size: 20px;
    }

    .bwc-support-value {
        font-size: 18px;
    }

    .bwc-table td {
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 8px 9px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bwc-section,
    .bwc-mode-btn,
    .bwc-preset-chip,
    .bwc-input,
    .bwc-calculate-btn,
    .bwc-reset-btn {
        transition: none !important;
    }
}
