:root {
            --primary-color: #2c3e50;
            --secondary-color: #4a6491;
            --accent-color: #e74c3c;
            --scientific-color: #27ae60;
            --converter-color: #9b59b6;
            --copy-color: #3498db;
            --text-color: #2c3e50;
            --bg-color: #f5f7fa;
            --button-bg: #ffffff;
            --button-shadow: 0 4px 8px rgba(0,0,0,0.1);
            --tab-active-bg: #ffffff;
            --tab-inactive-bg: #e1e5eb;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        .calculator-wrapper {
            width: 100%;
			height: 750px; /*2025-08-27 ★*/
            max-width: 360px;  /*2025-08-27 500px; ★*/
            background: white;
            border-radius: 20px;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        
        .calculator-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            padding: 20px;
            text-align: center;
        }
        
        .calculator-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
        }
        
        .calculator-tabs {
            display: flex;
            background: var(--tab-inactive-bg);
        }
        
        .tab-btn {
            flex: 1;
            padding: 12px;
            border: none;
            background: transparent;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .tab-btn.active {
            background: var(--tab-active-bg);
            font-weight: 600;
        }
        
        .tab-btn:nth-child(1).active {
            color: var(--secondary-color);
        }
        
        .tab-btn:nth-child(2).active {
            color: var(--scientific-color);
        }
        
        .tab-btn:nth-child(3).active {
            color: var(--converter-color);
        }
        
        .calculator-display {
            padding: 20px;
            background: #f8f9fa;
            border-bottom: 1px solid #e1e5eb;
            position: relative;
        }
        
        .display-history {
            font-size: 1rem;
            color: #6c757d;
            height: 20px;
            text-align: right;
            margin-bottom: 5px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .display-input-container {
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .display-input {
            font-size: 2rem;
            font-weight: 500;
            text-align: right;
            color: var(--text-color);
            width: 100%;
            border: none;
            background: transparent;
            outline: none;
				padding-right: 0px;
        }
        
        .copy-btn {
            position: absolute;
            left: 0;
            background: var(--copy-color);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .copy-btn:hover {
            background: #2980b9;
        }
        
        .copy-btn.copied {
            background: var(--scientific-color);
        }
        
        .calculator-buttons {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
				gap: 10px;
				padding: 20px;
			
			    /*height: 550px;*/
        }
        
        .scientific-buttons {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 5px;
            padding: 15px;
        }
        
        .converter-container {
            padding: 20px;
            /*max-height: 400px;*/
            overflow-y: auto;
        }
        
        .converter-row {
            display: flex;
            margin-bottom: 15px;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .converter-input {
            flex: 1;
            min-width: 120px;
        }
        
        .converter-input input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e1e5eb;
            border-radius: 8px;
            font-size: 1rem;
        }
        
        .converter-unit {
            flex: 1;
            min-width: 120px;
        }
        
        .converter-unit select {
            width: 100%;
            padding: 12px;
            border: 2px solid #e1e5eb;
            border-radius: 8px;
            font-size: 1rem;
            background-color: white;
        }
        
        .converter-arrow {
            font-size: 1.5rem;
            color: var(--converter-color);
            margin: 0 10px;
			width: 100%;
        }
        
        .converter-actions {
            display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .converter-action-btn {
            padding: 12px 20px;
            border: none;
            border-radius: 12px;
            background: var(--converter-color);
            color: white;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
			width: 100%;
        }
        
        .converter-action-btn:hover {
            background: #8e44ad;
        }
        
        .calc-btn {
            aspect-ratio: 1/1;
            border: none;
            border-radius: 12px;
            background: var(--button-bg);
            font-size: 1.2rem;
            font-weight: 500;
            color: var(--text-color);
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: var(--button-shadow);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .calc-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        
        .calc-btn:active {
            transform: translateY(0);
        }
        
        .btn-operator {
            background: var(--secondary-color);
            color: white;
        }
        
        .btn-scientific {
            background: var(--scientific-color);
            color: white;
            font-size: 1rem;
        }
        
        .btn-converter {
            background: var(--converter-color);
            color: white;
        }
        
        .btn-equals {
            background: var(--accent-color);
            color: white;
        }
        
        .btn-clear, .btn-delete {
            background: #f8f9fa;
            color: var(--accent-color);
        }
        
        .btn-wide {
            grid-column: span 2;
            aspect-ratio: 2/1;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .calculator-footer {
            padding: 15px;
            text-align: center;
            font-size: 0.8rem;
            color: #6c757d;
            border-top: 1px solid #e1e5eb;
        }
        
        @media (max-width: 600px) {
            .calculator-buttons, .scientific-buttons {
                gap: 5px;
                padding: 15px;
            }
            
            .calc-btn {
                font-size: 1.1rem;
            }
            
            .btn-scientific {
                font-size: 0.9rem;
            }
            
            .display-input {
                font-size: 1.8rem;
            }
            
            .copy-btn {
                padding: 6px 10px;
                font-size: 0.8rem;
            }
        }
        
        @media (max-width: 480px) {
            .calculator-buttons {
                grid-template-columns: repeat(4, 1fr);
            }
           
            .converter-row {
                flex-direction: column;
                align-items: stretch;
            }
            
            .converter-arrow {
                transform: rotate(90deg);
                margin: 10px 0;
                text-align: center;
            }
        }