.tool-section:has(.msc-input-section) .tool-layout-split {
    grid-template-columns: 340px 1fr;
}

@media (max-width: 900px) {
    .tool-section:has(.msc-input-section) .tool-layout-split {
        grid-template-columns: 1fr;
    }
}

.msc-input-section,
.msc-summary-section,
.msc-chart-section,
.msc-table-section,
.msc-waiting,
.msc-notice {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    box-sizing: border-box;
}

.msc-input-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
}

.msc-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msc-label {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.msc-radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.msc-radio-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    background: #faf9f7;
    cursor: pointer;
}

.msc-radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.msc-radio-card.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.msc-radio-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.msc-radio-desc,
.msc-help-text,
.msc-korean-amount,
.msc-card-desc,
.msc-section-subtitle,
.msc-chart-guide,
.msc-analytics-note,
.msc-notice p {
    font-size: 13px;
    line-height: 1.55;
    color: #5f5a56;
    margin: 0;
}

.msc-korean-amount {
    color: #b8860b;
    font-weight: 600;
}

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

.msc-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    background: #faf9f7;
    color: #2d2a26;
    font-size: 15px;
}

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

.msc-unit-badge {
    white-space: nowrap;
    padding: 11px 12px;
    border-radius: 10px;
    background: #f4efe2;
    color: #7b6421;
    font-size: 14px;
    font-weight: 700;
}

.msc-quick-row,
.msc-btn-group,
.msc-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.msc-quick-btn,
.msc-reset-btn,
.msc-share-btn,
.msc-calc-btn {
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    background: #fff;
    color: #2d2a26;
    font-size: 14px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.msc-quick-btn:hover,
.msc-reset-btn:hover,
.msc-share-btn:hover {
    border-color: #d4af37;
    color: #b8860b;
}

.msc-calc-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-color: #b8860b;
    color: #fff;
    font-weight: 700;
}

.msc-quick-btn.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6f1f;
}

.msc-policy-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 10px;
    background: #faf7ef;
    border: 1px solid #ece1bd;
}

.msc-policy-title,
.msc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
}

.msc-policy-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #5f5a56;
    font-size: 13px;
}

.tool-result-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.msc-hidden[hidden],
.msc-waiting[hidden],
.msc-chart-fallback[hidden] {
    display: none !important;
}

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

.msc-waiting,
.msc-summary-section,
.msc-chart-section,
.msc-table-section,
.msc-notice {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msc-waiting {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    background: #faf9f7;
}

.msc-waiting-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #d4af37;
    font-size: 18px;
}

.msc-waiting-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.msc-waiting-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.msc-waiting p,
.msc-waiting-text,
.msc-notice p {
    margin: 0 !important;
    color: #5f5a56;
    font-size: 14px;
}

.msc-section-head {
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
}

.msc-summary-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f5f3f0;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
}

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

.msc-summary-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #eee6d5;
    background: #faf9f7;
    box-shadow: 0 8px 20px rgba(45, 42, 38, 0.04);
    grid-column: span 4;
    overflow: hidden;
}

.msc-summary-card.is-kpi,
.msc-summary-card.is-accent {
    background: #fffaf0;
    border-color: #ead9a4;
}

.msc-summary-card.is-kpi {
    grid-column: span 12;
    padding-right: 64px;
}

.msc-card-label {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.02em;
    font-weight: 700;
    color: #5f5a56;
}

.msc-summary-card .msc-card-value {
    margin: 0;
    font-size: 33px;
    font-weight: 800;
    color: #1a1816;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    word-break: keep-all;
}

.msc-summary-card.is-kpi .msc-card-value {
    font-size: 39px;
    line-height: 1.04;
}

.msc-summary-card.is-accent .msc-card-value {
    font-size: 35px;
}

.msc-kpi-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.msc-kpi-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #7d651f;
    font-size: 12px;
    font-weight: 700;
}

.msc-copy-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e6dcc1;
    border-radius: 8px;
    background: #fff;
    color: #8a6f1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msc-copy-btn:hover {
    border-color: #d4af37;
    background: #fff8ea;
}

.msc-copy-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
}

.msc-analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.msc-analytics-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid #eee6d5;
    border-radius: 12px;
    background: #fff;
}

.msc-analytics-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.msc-analytics-label {
    font-size: 12px;
    font-weight: 700;
    color: #5f5a56;
}

.msc-analytics-value {
    font-size: 18px;
    font-weight: 800;
    color: #2d2a26;
    font-variant-numeric: tabular-nums;
}

.msc-meter {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #f1ece2;
    overflow: hidden;
}

.msc-meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d4af37 0%, #b8860b 100%);
    transition: width 0.25s ease;
}

.msc-meter-fill.is-match {
    background: linear-gradient(90deg, #59ab79 0%, #3f8f5e 100%);
}

.msc-meter-fill.is-gain {
    background: linear-gradient(90deg, #6d8bd6 0%, #4868bc 100%);
}

.msc-chart-wrap {
    position: relative;
    min-height: 280px;
}

.msc-chart-fallback {
    margin-top: 10px;
}

.msc-result-dual-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.msc-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eee6d5;
    border-radius: 12px;
    background: #fff;
}

.msc-info-table,
.msc-detail-table,
.msc-fallback-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
}

.msc-info-table th,
.msc-info-table td,
.msc-detail-table th,
.msc-detail-table td,
.msc-fallback-table th,
.msc-fallback-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee6d5;
    text-align: left;
    font-size: 14px;
    color: #2d2a26;
}

.msc-info-table th,
.msc-detail-table th,
.msc-fallback-table th {
    background: #faf7ef;
    font-weight: 700;
    white-space: nowrap;
}

.msc-detail-table tbody tr:last-child td,
.msc-info-table tbody tr:last-child th,
.msc-info-table tbody tr:last-child td,
.msc-fallback-table tbody tr:last-child td {
    border-bottom: 0;
}

.msc-download-btn {
    flex-shrink: 0;
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 9px;
}

.msc-download-btn.tool-btn-excel {
    background: #59ab79;
    border-color: #59ab79;
    color: #fff;
}

.msc-download-btn i {
    font-size: 13px;
}

.msc-download-btn.tool-btn-excel:hover {
    background: #4f9f70;
    border-color: #4f9f70;
    color: #fff;
}

@media (max-width: 768px) {
    .msc-radio-grid,
    .msc-analytics-grid,
    .msc-result-dual-table {
        grid-template-columns: 1fr;
    }

    .msc-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .msc-summary-card,
    .msc-summary-card.is-kpi {
        grid-column: span 2;
    }

    .msc-summary-card .msc-card-value {
        font-size: 29px;
    }

    .msc-summary-card.is-kpi .msc-card-value {
        font-size: 33px;
    }

    .msc-summary-card.is-accent .msc-card-value {
        font-size: 31px;
    }

    .msc-chart-wrap {
        min-height: 240px;
    }
}

@media (max-width: 480px) {
    .msc-input-section,
    .msc-summary-section,
    .msc-chart-section,
    .msc-table-section,
    .msc-notice {
        padding: 14px;
    }

    .msc-input,
    .msc-unit-badge,
    .msc-quick-btn,
    .msc-reset-btn,
    .msc-share-btn,
    .msc-calc-btn {
        font-size: 13px;
    }

    .msc-summary-grid {
        grid-template-columns: 1fr;
    }

    .msc-summary-card,
    .msc-summary-card.is-kpi {
        grid-column: span 1;
    }

    .msc-summary-card .msc-card-value {
        font-size: 25px;
    }

    .msc-summary-card.is-kpi .msc-card-value {
        font-size: 29px;
    }

    .msc-summary-card.is-accent .msc-card-value {
        font-size: 27px;
    }
}
