 * {box-sizing: border-box;}.calculator {background: #e8edf2;border: 2px solid #a0aab5;border-radius: 8px;padding: 10px ;width: 100%;max-width: 550px;box-shadow: 4px 4px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.6);margin: 0 auto;}.display {background: #3a5a8a;color: white;font-size: clamp(16px, 4vw, 22px);text-align: right;padding: 8px 12px;border-radius: 4px;margin-bottom: 8px;min-height: 40px;word-break: break-all;letter-spacing: 1px;font-family: 'Courier New', monospace;box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);}.btn-grid {display: grid;grid-template-columns: repeat(11, 1fr);gap: clamp(2px, 0.8vw, 4px);}button {background: linear-gradient(to bottom, #f0f4f8, #d8dfe8);border: 1px solid #9aa5b2;border-radius: 4px;color: #222;font-size: clamp(9px, 2.2vw, 12px);padding: clamp(5px, 1.5vw, 8px) 2px;cursor: pointer;text-align: center;white-space: nowrap;box-shadow: 0 2px 3px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.7);transition: all 0.08s;font-family: Arial, sans-serif;touch-action: manipulation;-webkit-tap-highlight-color: transparent;user-select: none;min-height: clamp(32px, 8vw, 42px);display: flex;align-items: center;justify-content: center;}button:hover {background: linear-gradient(to bottom, #ffffff, #e8eef5);}button:active {background: linear-gradient(to bottom, #c8d0da, #e0e6ee);box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 2px 3px rgba(0,0,0,0.15);transform: translateY(1px);}button.op {background: linear-gradient(to bottom, #4a6fa5, #3a5a8a);color: white;border-color: #2a4a7a;box-shadow: 0 2px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);}button.op:hover {background: linear-gradient(to bottom, #5a7fb5, #4a6a9a);}button.op:active {background: linear-gradient(to bottom, #3a5080, #4a6090);}button.mem {background: linear-gradient(to bottom, #5a7ab0, #4a6898);color: white;border-color: #3a5880;}button.mem:hover {background: linear-gradient(to bottom, #6a8ac0, #5a78a8);}button.ac {background: linear-gradient(to bottom, #c0c8d5, #a8b2be);font-weight: bold;color: #111;}button.eq {background: linear-gradient(to bottom, #4a6fa5, #3a5a8a);color: white;border-color: #2a4a7a;font-weight: bold;font-size: clamp(12px, 3vw, 16px);}button.eq:hover {background: linear-gradient(to bottom, #5a7fb5, #4a6a9a);}.deg-rad {display: flex;align-items: center;justify-content: center;gap: 3px;font-size: clamp(8px, 1.8vw, 11px);background: linear-gradient(to bottom, #f0f4f8, #d8dfe8);border: 1px solid #9aa5b2;border-radius: 4px;padding: 3px 2px;box-shadow: 0 2px 3px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.7);grid-column: span 2;cursor: default;min-height: clamp(32px, 8vw, 42px);flex-direction: column;gap: 2px;}.deg-rad-row {display: flex;align-items: center;gap: 2px;}.deg-rad{padding:6px;gap:4px;}.deg-rad-row{display:flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:4px 6px;}.deg-rad input[type=radio]{width:18px;height:18px;cursor:pointer;accent-color:#3a5a8a;margin:0;flex-shrink:0;}.deg-rad label{cursor:pointer;padding:4px;font-size:12px;line-height:1.2;}.deg-rad label {cursor: pointer;}sup {font-size: clamp(6px, 1.5vw, 8px);}.history-section {margin-top: 10px;border-top: 2px solid #a0aab5;padding-top: 8px;}.history-header {display: flex;justify-content: space-between;align-items: center;margin-bottom: 6px;}.history-header span {font-size: clamp(10px, 2.5vw, 12px);font-weight: bold;color: #3a5a8a;letter-spacing: 0.5px;text-transform: uppercase;}.clear-history-btn {background: linear-gradient(to bottom, #c0c8d5, #a8b2be);border: 1px solid #8a96a3;border-radius: 3px;font-size: clamp(9px, 2vw, 10px);padding: 3px 8px;cursor: pointer;color: #333;box-shadow: 0 1px 2px rgba(0,0,0,0.2);touch-action: manipulation;}.clear-history-btn:hover {background: linear-gradient(to bottom, #d0d8e2, #b8c2cc);}.history-list {max-height: 140px;overflow-y: auto;background: #f4f7fa;border: 1px solid #b0bac5;border-radius: 4px;padding: 4px 0;box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);-webkit-overflow-scrolling: touch;}.history-list::-webkit-scrollbar {width: 5px;}.history-list::-webkit-scrollbar-track {background: #e0e6ed;}.history-list::-webkit-scrollbar-thumb {background: #3a5a8a;border-radius: 3px;}.history-item {display: flex;justify-content: space-between;align-items: center;padding: 5px 8px;border-bottom: 1px solid #dde4ec;cursor: pointer;transition: background 0.1s;gap: 6px;}.history-item:last-child {border-bottom: none;}.history-item:hover {background: #dce6f0;}.history-item:active {background: #ccd8ec;}.history-expr {font-size: clamp(9px, 2.2vw, 11px);color: #334455;font-family: 'Courier New', monospace;flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.history-result {font-size: clamp(11px, 2.8vw, 13px);font-weight: bold;color: #3a5a8a;font-family: 'Courier New', monospace;white-space: nowrap;}.history-arrow {font-size: clamp(9px, 2vw, 10px);color: #556677;flex-shrink: 0;}.history-empty {text-align: center;color: #445566;font-size: clamp(10px, 2.5vw, 11px);padding: 14px 0;font-style: italic;}.history-item-new {animation: fadeIn 0.3s ease;}@keyframes fadeIn {from {background: #c8daf0;}to {background: transparent;}}@media (max-width: 420px) {body {padding: 6px;}.calculator {padding: 8px;}.btn-grid {display: flex;flex-direction: column;gap: 4px;}.sci-section, .num-section {display: grid;gap: 3px;}.sci-section {grid-template-columns: repeat(5, 1fr);}.num-section {grid-template-columns: repeat(6, 1fr);}.deg-rad {grid-column: span 1;flex-direction: row;min-height: clamp(30px, 9vw, 40px);padding: 3px 2px;}.deg-rad-row {gap: 2px;}button {font-size: clamp(10px, 3vw, 13px);min-height: clamp(34px, 10vw, 44px);padding: 0;}button.eq {font-size: clamp(14px, 4vw, 18px);}}