* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.header {
    position:static !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    font-size: 16px;
}

.container {
    max-width: 710px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    word-wrap: break-word;
}

.tab-container {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: white;
}

.tab-content {
    display: none;
    padding: 16px 14px;
    height: auto;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-size: 1.1em;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 6px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    -webkit-appearance: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.korean-amount {
    font-size: 0.75em;
    color: #666;
    margin-top: 4px;
    min-height: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.korean-amount.focused {
    font-size: 1em;
    color: 000000;
    font-weight: 600;
}

.category-header {
    background: #4CAF50;
    color: white;
    padding: 10px 14px;
    margin: 16px -14px 12px -14px;
    font-weight: 600;
    text-align: center;
    font-size: 0.85em;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
    padding: 0 14px;
}

.btn {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:active {
    background: #e0e0e0;
}

.cta-section {
    display: none;
    padding: 16px 14px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    margin: 16px -14px 0 -14px;
}

.cta-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 12px;
    font-size: 1em;
}

.btn-consultation {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-bottom: 8px;
}

.btn-call {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-consultation:active, .btn-call:active {
    transform: translateY(1px);
}

/* 입력화면용 플로팅 버튼 스타일 */
.floating-buttons-input {
    position: absolute;
    top: 15%;
    right: 4px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.3s ease-out;
}

.floating-btn {
    width: 50px;
    height: 80px;
    border-radius: 15px;
    padding:10px 0;
    border: none;
    font-size: 0.7em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn:active {
    transform: scale(0.95);
}

.floating-consultation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.floating-call {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

@media (max-width: 600px) {
    .floating-buttons {
        right: 10px;
        bottom: 60px;
    }
    
    .floating-btn {
        width: 55px;
        height: 55px;
        font-size: 1.1em;
    }
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #333;
    margin-bottom: 8px;
}

.modal-header p {
    color: #666;
    font-size: 0.9em;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.consultation-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-submit {
    flex: 2;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-cancel {
    flex: 1;
    background: #f0f0f0;
    color: #666;
}

.success-message {
    text-align: center;
    padding: 20px;
}

.success-message h3 {
    color: #4CAF50;
    margin-bottom: 16px;
}

.success-message p {
    color: #666;
    margin-bottom: 8px;
}

.phone-highlight {
    font-size: 1.1em;
    font-weight: 600;
    color: #2196F3;
    margin: 10px 0;
}

.phone-popup {
    text-align: center;
    padding: 20px;
}

.phone-popup h3 {
    color: #333;
    margin-bottom: 16px;
}

.phone-number {
    font-size: 1.5em;
    font-weight: 600;
    color: #2196F3;
    margin: 16px 0;
    padding: 12px;
    border: 2px solid #2196F3;
    border-radius: 8px;
    background: #f3f8ff;
}

.btn-copy {
    background: #2196F3;
    color: white;
    margin-top: 10px;
}

.privacy-consent {
    margin: 16px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.privacy-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
}

.privacy-consent input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.privacy-consent a {
    color: #4CAF50;
    text-decoration: underline;
}

.additional-considerations {
    background: #fff3e0;
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-size: 0.85em;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.additional-considerations h4 {
    color: #e65100;
    margin-bottom: 12px;
    font-size: 1em;
}

.additional-considerations .consideration-category {
    margin-bottom: 12px;
}

.additional-considerations .consideration-category h5 {
    color: #bf360c;
    margin-bottom: 6px;
    font-size: 0.9em;
}

.additional-considerations ul {
    margin-left: 16px;
    margin-bottom: 8px;
}

.additional-considerations li {
    margin-bottom: 4px;
    color: #555;
}

.additional-considerations .final-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ffcc80;
    font-weight: 600;
    color: #e65100;
    text-align: center;
}

.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    text-align: center;
    font-size: 0.75em;
    color: #666;
    /* 고정 표시 문제 해결을 위해 position 관련 속성 완전 제거 */
    position: static;
}

.footer h4 {
    color: #333;
    margin-bottom: 8px;
}

.footer p {
    margin-bottom: 4px;
}

.footer .legal-links {
    margin-top: 12px;
}

.footer .legal-links a {
    color: #4CAF50;
    text-decoration: none;
    margin: 0 8px;
}

.result-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
    line-height:130%;
    border-left: 4px solid #4CAF50;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.result-box.warning {
    border-left-color: #ff9800;
    background: #fff3e0;
}

.result-box.error {
    border-left-color: #f44336;
    background: #ffebee;
}

.result-box h3, .result-box h4 {
    margin-bottom: 10px;
    font-size: 1em;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    gap: 8px;
    word-wrap: break-word;
    word-break: break-word;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #555;
    font-size: 0.85em;
    flex: 1;
}

.result-value {
    font-weight: 700;
    color: #4CAF50;
    font-size: 0.9em;
    text-align: right;
    flex-shrink: 0;
    word-wrap: break-word;
    word-break: break-word;
}

/* 불가능 사유의 경우 왼쪽 정렬 - 새로 추가된 부분 */
.result-value.reason-text {
    text-align: left;
    flex: 1;
}

.result-value.warning {
    color: #ff9800;
}

.result-value.error {
    color: #f44336;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-success {
    background: #4CAF50;
    color: white;
}

.status-warning {
    background: #ff9800;
    color: white;
}

.status-error {
    background: #f44336;
    color: white;
}

.loading {
    text-align: center;
    padding: 30px 14px;
    color: #666;
}

.loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notice-toggle {
    text-align: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    cursor: pointer;
    color: #666;
    font-size: 0.75em;
}

.notice-content {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 16px;
    font-size: 0.75em;
    line-height: 1.4;
    display: block;
}

.notice-content h4 {
    color: #1976D2;
    margin-bottom: 6px;
    font-size: 0.85em;
}

.notice-content ul {
    margin-left: 14px;
    color: #555;
}

.notice-content li {
    margin-bottom: 3px;
}

.emoji {
    font-size: 1em;
}

.big-status {
    font-size: 1.3em;
    font-weight: 700;
    color: #4CAF50;
    margin: 8px 0;
}

.big-status.warning {
    color: #ff9800;
}

.big-status.error {
    color: #f44336;
}

small {
    font-size: 0.75em;
    color: #777;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    body {
        padding: 5px;
    }
    .container {
        border-radius: 0;
        box-shadow: none;
    }
    .tab-button {
        font-size: 0.8em;
        padding: 10px 6px;
    }
    .modal-content {
        width: 95%;
        padding: 16px;
        border-radius: 8px;
    }
    .modal-header h3 {
        font-size: 1.1em;
    }
    .btn {
        font-size: 0.9em;
        padding: 12px 16px;
    }
    .section-title {
        font-size: 1em;
    }
    .result-item span {
        font-size: 0.8em;
    }
    .category-header {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    .floating-buttons-input {
        position:fixed;
        top: 70%;
        right: 4px;          /* ← 모바일도 4px로 수정 */
    }
    
    .floating-btn {
        width: 45px;         /* ← 모바일용 세로 크기 */
        height: 60px;        /* ← 세로로 길게 */
        font-size: 0.8em;   /* ← 작은 폰트 */
    }
}