<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: 100vh;
        padding: 10px;
    }    
    
    .container {
        max-width: 700px;
        margin: 0 auto;
        background: white;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        overflow: hidden;
        width: 100%;
    }
    
    .header {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white;
        padding: 30px 20px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2.5em;
        margin-bottom: 10px;
    }
    
    .header p {
        opacity: 0.9;
        font-size: 1.1em;
    }
    
    .version-info {
        background: rgba(255,255,255,0.1);
        padding: 10px;
        border-radius: 10px;
        margin-top: 15px;
        font-size: 0.9em;
        word-break: keep-all;
    }
    
    .content {
        padding: 40px 20px;
    }
    
    .input-section {
        display: flex;
        flex-direction: column;
        gap: 25px;
        margin-bottom: 40px;
    }
    
    .input-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .input-group label {
        font-weight: 600;
        margin-bottom: 12px;
        color: #333;
        font-size: 16px;
    }
    
    .input-group input, .input-group select {
        padding: 16px;
        border: 2px solid #e1e5e9;
        border-radius: 12px;
        font-size: 16px;
        transition: border-color 0.3s;
        width: 100%;
    }
    
    .input-group input:focus, .input-group select:focus {
        outline: none;
        border-color: #4facfe;
        box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    }
    
    .counter-group {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 16px;
        border: 2px solid #e1e5e9;
        border-radius: 12px;
        background: white;
        transition: border-color 0.3s;
    }
    
    .counter-group:hover {
        border-color: #4facfe;
    }
    
    .counter-btn {
        width: 45px;
        height: 45px;
        border: 2px solid #4facfe;
        background: white;
        color: #4facfe;
        border-radius: 50%;
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .counter-btn:hover {
        background: #4facfe;
        color: white;
        transform: scale(1.05);
    }
    
    .counter-display {
        flex: 1;
        text-align: center;
        font-size: 20px;
        font-weight: 600;
        color: #333;
    }
    
    .checkbox-group {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 15px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .checkbox-group label {
        margin: 0;
        font-weight: 500;
        color: #555;
        word-break: keep-all;
    }
    
    .non-taxable-section {
        background: #f8f9fa;
        padding: 30px 20px;
        border-radius: 15px;
        margin-top: 30px;
    }
    
    .non-taxable-section h3 {
        color: #333;
        margin-bottom: 25px;
        font-size: 1.4em;
        text-align: center;
    }
    
    .non-taxable-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .result-section {
        background: #f8f9fa;
        border-radius: 15px;
        padding: 30px 20px;
        margin-top: 30px;
    }
    
    .result-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .result-card {
        background: white;
        padding: 25px 20px;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }
    
    .result-card h3 {
        color: #333;
        margin-bottom: 20px;
        font-size: 1.3em;
        word-break: keep-all;
    }
    
    .deduction-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        word-break: keep-all;
    }
    
    .deduction-item:last-child {
        border-bottom: none;
        font-weight: 600;
        color: #4facfe;
        font-size: 1.1em;
    }
    
    .deduction-item span:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .amount {
        font-weight: 600;
        color: #333;
        white-space: nowrap;
        margin-left: 10px;
    }
    
    .monthly-take-home {
        text-align: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 30px 20px;
        border-radius: 12px;
        margin-top: 20px;
    }
    
    .monthly-take-home h2 {
        font-size: 2.5em;
        margin-bottom: 10px;
        word-break: keep-all;
    }
    
    .monthly-take-home p {
        font-size: 1.1em;
        opacity: 0.9;
    }
    
    .non-taxable-total {
        grid-column: 1 / -1;
        background: white;
        padding: 20px;
        border-radius: 10px;
        text-align: center;
        font-weight: 600;
        color: #4facfe;
        font-size: 1.2em;
        margin-top: 15px;
    }
    
    /* 태블릿 최적화 */
    @media (max-width: 768px) {
        .result-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }
        
        .non-taxable-grid {
            grid-template-columns: 1fr;
        }
        
        .header h1 {
            font-size: 2em;
        }
        
        .content {
            padding: 30px 20px;
        }
        
        .container {
            margin: 0;
            border-radius: 0;
        }
        
        body {
            padding: 0;
        }
    }
    
    /* 모바일 최적화 (iPhone SE 등 작은 화면) */
    @media (max-width: 480px) {
        .header {
            padding: 20px 15px;
        }
        
        .header h1 {
            font-size: 1.8em;
            line-height: 1.2;
        }
        
        .header p {
            font-size: 0.95em;
        }
        
        .version-info {
            font-size: 0.8em;
            padding: 8px;
        }
        
        .content {
            padding: 20px 15px;
        }
        
        .result-section {
            padding: 20px 15px;
        }
        
        .non-taxable-section {
            padding: 20px 15px;
        }
        
        .result-card {
            padding: 20px 15px;
        }
        
        .result-card h3 {
            font-size: 1.1em;
            margin-bottom: 15px;
        }
        
        .deduction-item {
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
            padding: 10px 0;
        }
        
        .deduction-item span:first-child {
            font-size: 14px;
            font-weight: 600;
        }
        
        .amount {
            font-size: 16px;
            font-weight: 700;
            color: #4facfe;
            margin-left: 0;
        }
        
        .deduction-item:last-child .amount {
            color: #4facfe;
            font-size: 18px;
        }
        
        .monthly-take-home {
            padding: 25px 15px;
        }
        
        .monthly-take-home h2 {
            font-size: 1.8em;
            line-height: 1.2;
            margin-bottom: 8px;
        }
        
        .monthly-take-home p {
            font-size: 1em;
        }
        
        .counter-btn {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }
        
        .counter-display {
            font-size: 18px;
        }
        
        .input-group label {
            font-size: 15px;
        }
        
        .input-group input, .input-group select {
            padding: 14px;
            font-size: 16px;
        }
        
        .checkbox-group {
            padding: 12px;
        }
        
        .checkbox-group label {
            font-size: 14px;
        }
        
        .non-taxable-total {
            font-size: 1.1em;
            padding: 15px;
        }
    }
    
    /* 매우 작은 화면 (320px 이하) */
    @media (max-width: 360px) {
        .header h1 {
            font-size: 1.6em;
        }
        
        .monthly-take-home h2 {
            font-size: 1.6em;
        }
        
        .result-card {
            padding: 15px 10px;
        }
        
        .content {
            padding: 15px 10px;
        }
        
        .result-section {
            padding: 15px 10px;
        }
        
        .non-taxable-section {
            padding: 15px 10px;
        }
    }
</style>