/**
 * Real Estate ROI Calculator Styles
 * 부동산 투자수익률 계산기 전용 스타일 (3탭)
 *
 * Tab1: 기본 투자분석 (ROI + CAP Rate + IRR)
 * Tab2: 레버리지 시뮬레이션 (3 scenarios)
 * Tab3: 물건 비교 (A vs B)
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.rei-main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
}

.rei-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rei-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 공통 섹션 ===== */
.rei-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;
}

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

.rei-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rei-section-title i {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 탭 (3개 → flex OK) ===== */
.rei-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.rei-tab {
    flex: 1;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9e9a96;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.rei-tab:hover {
    color: #5f5a56;
}

.rei-tab.active {
    background: #fff;
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
}

/* ===== 탭 콘텐츠 ===== */
.rei-tab-panel {
    display: none;
}

.rei-tab-panel.active {
    display: block;
}

/* 탭 래퍼 내부 간격 (Rule 44) */
.rei-tab-panel .rei-section + .rei-section {
    margin-top: 14px;
}

.rei-tab-panel .rei-btn-group {
    margin-top: 14px;
}

/* ===== 입력 그룹 ===== */
.rei-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.rei-input-group:last-child {
    margin-bottom: 0;
}

.rei-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 6px;
}

.rei-input-group .rei-sub-label {
    font-weight: 400;
    color: #9e9a96;
    margin-left: 4px;
}

.rei-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

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

.rei-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.rei-number-input {
    width: 80px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

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

.rei-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.rei-select:hover {
    border-color: #d4c67a;
}

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

.rei-kr-display {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

.rei-help-text {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

/* ===== 인라인 그룹 ===== */
.rei-inline-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rei-inline-group label {
    margin-bottom: 0;
    white-space: nowrap;
}

.rei-inline-group .rei-unit {
    font-size: 12px;
    color: #5f5a56;
    white-space: nowrap;
}

/* ===== 입력 행 (2열) ===== */
.rei-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ===== 라디오 버튼 (가로 pill 스타일) ===== */
.rei-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rei-radio-group input[type="radio"] {
    display: none;
}

.rei-radio-group label {
    flex: 1;
    min-width: 80px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.rei-radio-group label:hover {
    border-color: #d4af37;
}

.rei-radio-group input[type="radio"]:checked + label {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
}

/* ===== 버튼 ===== */
.rei-btn-group {
    display: flex;
    gap: 8px;
}

.rei-btn-primary {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37, #c9a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.rei-btn-primary:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.rei-btn-secondary {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.rei-btn-secondary:hover {
    background: #eae7e3;
}

/* ===== 결과 - 대기 영역 ===== */
.rei-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

.rei-waiting i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: #d4af37;
    opacity: 0.4;
}

.rei-waiting p {
    font-size: 13px;
    margin: 0;
}

/* ===== 결과 - 요약 카드 ===== */
.rei-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.rei-summary-title {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.rei-summary-main {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 4px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.rei-summary-sub {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 16px;
}

.rei-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.rei-summary-card {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.rei-summary-card-label {
    font-size: 11px;
    color: #7a756d;
    margin-bottom: 4px;
}

.rei-summary-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
}

.rei-summary-card-value.positive {
    color: #2e7d32;
}

.rei-summary-card-value.negative {
    color: #c62828;
}

.rei-dscr-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
    font-weight: 600;
}
.rei-dscr-safe { background: #e8f5e9; color: #2e7d32; }
.rei-dscr-caution { background: #fff3e0; color: #e65100; }
.rei-dscr-danger { background: #ffebee; color: #c62828; }

.rei-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
}

.rei-summary-row-label {
    color: #7a756d;
}

.rei-summary-row-value {
    font-weight: 600;
    color: #2d2a26;
}

/* ===== 수익률 등급 배지 ===== */
.rei-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 8px;
}

.rei-rating-excellent {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.rei-rating-good {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.rei-rating-average {
    background: #fdfbf5;
    color: #d4af37;
    border: 1px solid #d4af37;
}

.rei-rating-low {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ===== 비용 상세 테이블 ===== */
.rei-flow-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rei-flow-table th {
    padding: 8px 12px;
    background: #faf9f7;
    border-bottom: 1px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: left;
}

.rei-flow-table th:last-child {
    text-align: right;
}

.rei-flow-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0ede8;
    color: #2d2a26;
}

.rei-flow-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.rei-flow-table tbody tr:hover td {
    background: #faf9f7;
}

.rei-flow-table tr:last-child td {
    border-bottom: none;
}

.rei-flow-table .rei-highlight-row {
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
}

.rei-flow-table .rei-highlight-row td {
    color: #d4af37;
    font-weight: 700;
    font-size: 14px;
}

/* ===== 연도별 현금흐름 테이블 ===== */
.rei-sim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
}

.rei-sim-table th {
    padding: 10px 12px;
    background: #faf9f7;
    border-bottom: 2px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
}

.rei-sim-table th:first-child {
    text-align: left;
}

.rei-sim-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0ede8;
    color: #2d2a26;
    text-align: right;
}

.rei-sim-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.rei-sim-table tbody tr:nth-child(even) {
    background: #faf9f7;
}

.rei-sim-table tbody tr:hover td {
    background: #f5f3f0;
}

.rei-sim-table tr:last-child td {
    border-bottom: none;
}

.rei-sim-table .rei-total-row td {
    background: #fdfbf5;
    font-weight: 700;
    color: #d4af37;
}

.rei-sim-table .rei-separator-row td {
    height: 2px;
    padding: 0;
    background: #e8e4dc;
    border: none;
}

/* ===== 레버리지 비교 카드 ===== */
.rei-lev-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.rei-lev-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: box-shadow 0.2s;
}

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

.rei-lev-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #7a756d;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e4dc;
}

.rei-lev-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
}

.rei-lev-card-label {
    color: #7a756d;
}

.rei-lev-card-value {
    font-weight: 600;
    color: #2d2a26;
}

.rei-lev-card-highlight {
    font-size: 22px;
    font-weight: 700;
    color: #d4af37;
    margin: 8px 0;
}

.rei-lev-card.best {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.rei-lev-card.best .rei-lev-card-title {
    color: #d4af37;
    border-bottom-color: rgba(212, 175, 55, 0.3);
}

/* ===== 물건 비교 카드 ===== */
.rei-compare-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rei-compare-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    transition: box-shadow 0.2s;
}

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

.rei-compare-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e4dc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rei-compare-card-title i {
    color: #d4af37;
}

.rei-compare-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0ede8;
    font-size: 13px;
}

.rei-compare-card-row:last-child {
    border-bottom: none;
}

.rei-compare-card-row-label {
    color: #7a756d;
}

.rei-compare-card-row-value {
    font-weight: 600;
    color: #2d2a26;
}

.rei-compare-card-row-value.winner {
    color: #2e7d32;
    font-weight: 700;
}

.rei-compare-card-row-value.loser {
    color: #c62828;
}

.rei-compare-card-main {
    font-size: 24px;
    font-weight: 700;
    color: #d4af37;
    text-align: center;
    margin: 12px 0;
}

.rei-compare-card.winner-card {
    border-color: #2e7d32;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.04) 0%, rgba(46, 125, 50, 0.01) 100%);
}

.rei-compare-card.winner-card .rei-compare-card-title {
    color: #2e7d32;
    border-bottom-color: rgba(46, 125, 50, 0.3);
}

.rei-compare-card.winner-card .rei-compare-card-title i {
    color: #2e7d32;
}

/* ===== 비교 결과 배지 ===== */
.rei-compare-verdict {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #d4af37;
}

.rei-compare-verdict i {
    font-size: 18px;
}

/* ===== 비교 바 차트 테이블 ===== */
.rei-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
}

.rei-compare-table th {
    padding: 12px 14px;
    background: #faf9f7;
    border-bottom: 2px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
}

.rei-compare-table th:first-child {
    text-align: left;
    width: 35%;
}

.rei-compare-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0ede8;
    color: #2d2a26;
}

.rei-compare-table td:not(:first-child) {
    text-align: right;
    font-weight: 600;
}

.rei-compare-table tbody tr:hover td {
    background: #faf9f7;
}

.rei-compare-table tr:last-child td {
    border-bottom: none;
}

.rei-compare-table .rei-highlight-row {
    background: #fdfbf5;
}

.rei-compare-table .rei-highlight-row td {
    color: #d4af37;
    font-weight: 700;
}

/* ===== 차트 섹션 ===== */
.rei-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.rei-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rei-chart-title i {
    color: #d4af37;
}

.rei-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
    margin: 0 auto;
}

.rei-chart-wrap canvas {
    max-height: 280px;
}

.rei-donut-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
    height: 280px;
    margin: 0 auto;
}

.rei-chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.rei-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5f5a56;
}

.rei-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== 상세 내역 섹션 (접기/펼치기) ===== */
.rei-collapsible {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
}

.rei-collapsible-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #faf9f7;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    transition: background 0.2s;
}

.rei-collapsible-toggle:hover {
    background: #f5f3f0;
}

.rei-collapsible-toggle i {
    color: #d4af37;
    transition: transform 0.2s;
}

.rei-collapsible-toggle.active i {
    transform: rotate(180deg);
}

.rei-collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.rei-collapsible-content.active {
    max-height: 2000px;
}

.rei-collapsible-content-inner {
    padding: 16px;
}

/* ===== 엑셀 다운로드 버튼 ===== */
.rei-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #217346;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.rei-download-btn:hover {
    background: #1a5c38;
}

/* ===== 스케줄 헤더 ===== */
.rei-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rei-schedule-header .rei-section-title {
    margin-bottom: 0;
}

/* ===== 테이블 래퍼 ===== */
.rei-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 400px;
    max-width: 100%;
}

/* ===== 경고 박스 ===== */
.rei-warning-box {
    display: flex;
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    margin-top: 12px;
}

.rei-warning-box i {
    font-size: 16px;
    color: #e67e22;
    flex-shrink: 0;
    margin-top: 1px;
}

.rei-warning-box span {
    font-size: 12px;
    color: #e65100;
    line-height: 1.5;
    font-weight: 500;
}

/* ===== 절세 팁 섹션 ===== */
.rei-tips-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.rei-tips-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rei-tips-title i {
    color: #d4af37;
}

.rei-tips-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rei-tip-item {
    display: flex;
    align-items: start;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

.rei-tip-item i {
    font-size: 14px;
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===== 면책 조항 ===== */
.rei-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

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

/* ===== 유틸리티 ===== */
.rei-hidden {
    display: none !important;
}

/* ===== 인쇄 스타일 ===== */
@media print {
    .rei-input-col {
        display: none;
    }

    .rei-main-layout {
        grid-template-columns: 1fr;
    }

    .rei-section,
    .rei-result-summary,
    .rei-chart-section,
    .rei-tips-section,
    .rei-collapsible {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* ===== 모션 감소 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .rei-section,
    .rei-amount-input,
    .rei-select,
    .rei-btn-primary,
    .rei-tab,
    .rei-radio-group label,
    .rei-collapsible-toggle,
    .rei-collapsible-content {
        transition: none !important;
    }
    .rei-section:hover,
    .rei-btn-primary:hover {
        transform: none !important;
    }
}

/* ===== 반응형 ===== */
@media (max-width: 900px) {
    .rei-main-layout {
        grid-template-columns: 1fr;
    }

    .rei-input-col {
        position: static;
        width: 100%;
    }

    .rei-result-col {
        width: 100%;
    }

    .rei-input-group input:not([type="radio"]):not([type="checkbox"]),
    .rei-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .rei-result-summary .rei-summary-main {
        font-size: 26px;
    }

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

    .rei-lev-cards {
        grid-template-columns: 1fr;
    }

    .rei-compare-cards {
        grid-template-columns: 1fr;
    }

    .rei-compare-table,
    .rei-flow-table,
    .rei-sim-table {
        font-size: 12px;
    }

    .rei-compare-table th,
    .rei-compare-table td,
    .rei-flow-table th,
    .rei-flow-table td,
    .rei-sim-table th,
    .rei-sim-table td {
        padding: 10px 10px;
    }

    .rei-radio-group {
        flex-direction: column;
    }

    .rei-radio-group label {
        min-width: 0;
    }

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

@media (max-width: 480px) {
    .rei-section {
        padding: 12px;
    }

    .rei-result-summary {
        padding: 16px;
    }

    .rei-result-summary .rei-summary-main {
        font-size: 22px;
    }

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

    .rei-summary-card-value {
        font-size: 18px;
    }

    .rei-tabs {
        flex-direction: column;
    }

    .rei-tab {
        padding: 8px 6px;
        font-size: 12px;
    }

    .rei-donut-wrap {
        max-width: 200px;
        height: 200px;
    }

    .rei-compare-table,
    .rei-flow-table,
    .rei-sim-table {
        font-size: 11px;
    }

    .rei-compare-table th,
    .rei-compare-table td,
    .rei-flow-table th,
    .rei-flow-table td,
    .rei-sim-table th,
    .rei-sim-table td {
        padding: 8px 8px;
    }

    .rei-chart-wrap {
        height: 250px;
    }

    .rei-chart-wrap canvas {
        max-height: 250px;
    }

    .rei-lev-card-highlight {
        font-size: 18px;
    }

    .rei-compare-card-main {
        font-size: 20px;
    }

    .rei-collapsible-toggle {
        font-size: 12px;
        padding: 12px 14px;
    }

    .rei-collapsible-content-inner {
        padding: 12px;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

