body {
    font-family: sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    /* align-items: center; を削除（中央寄せを解除） */
    margin: 0;
}
/* 電卓全体の枠 */
.calculator {
    background-color: #333;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    
    /* 上から30pxの位置に移動 */
    margin-top: 30px; 
}
/* 液晶画面 */
.display {
    width: 100%;
    height: 60px;
    background-color: #222;
    color: #fff;
    text-align: right;
    border: none;
    padding: 10px 15px;
    font-size: 2rem;
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
}
/* ボタンの配置グリッド */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
/* ボタンの基本スタイル */
button {
    height: 60px;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.1s;
}
button:active {
    opacity: 0.7;
}
/* 数字ボタン */
.num {
    background-color: #555;
    color: white;
}
/* 演算子ボタン（＋ － × ÷ ＝） */
.op {
    background-color: #f09a36;
    color: white;
}
/* クリアなどの特殊ボタン */
.func {
    background-color: #a5a5a5;
    color: black;
}
/* 「0」ボタンだけ横長にする */
.zero {
    grid-column: span 2;
    border-radius: 30px;
}