*,*::before,*::after{
    box-sizing: border-box;
    margin:0;
    padding:0;
}

html,body{
    background:black;
    font-family:-apple-system, BlinkMacSystemFont;
    height: 100%;
    width:100%;
    overflow:hidden;
    overflow-x:hidden;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

.calc-container{
    background:black;
    color:white;
    height:100dvh;
    width:100%;
    max-width:100%;
    display:flex;
    flex-direction:column;
    justify-content: flex-end; /* 核心：整体靠下 */
    box-sizing:border-box;
    padding:12px 8px;
}

.display{
    font-size: clamp(32px,1px,72px);
    text-align:right;
    padding:8px 6px;
    font-weight:300;
    flex-shrink:0;
}

.button-row{
    display:flex;
    margin-bottom:8px;
    flex-shrink:0;
    width:100%;
}

.btn{
    flex:1 1 0;
    height: clamp(44px,1px,72px);
    margin:4px;
    border-radius:999px;
    font-size: clamp(20px,1px,36px);
    border:none;
    cursor:pointer;
    min-width:0;
}

.num{
    background:#333;
    color:white;
}

.func{
    background:#a5a5a5;
    color:black;
}

.op{
    background:#ff9f0a;
    color:white;
}

.zero{
    flex:2 1 0;
    text-align:left;
    padding-left:20px;
    min-width:0;
}

.btn:active{
    opacity:0.8;
}

.display1{
    font-size:10px;
    color:#777;
    text-align:center;
    line-height:1.3;
    flex-shrink:0;
    margin-top:6px;
}
