* {
    box-sizing: border-box;
}
body {
    padding: 0;
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 34px;
    line-height: 1.8em;
}
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

button {
    width: 100%;
    line-height: 2.4em;
    font-size: .6em;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 0.2em;
    cursor: pointer;
}

#wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 40px;
    position: relative;
}
#logo {
    width: 100%;
    margin: 0 auto 0.8em;
    display: block;
}
#calc {
    width: 100%;
    max-width: 500px;
    margin-bottom: 50px;
}
#calc label {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: opacity .2s ease;
}
#calc input,
#calc select {
    display: block;
    text-align: right;
    color: #000;
    background-color: #ededed;
    border: none;
    outline: none;
    font-size: 1em;
    width: 5em;
    padding: 0.2em 1.4em 0.2em 0.4em;
    border-radius: 0.2em;
    transition: background-color .2s ease;
}
#calc input:hover,
#calc select:hover {
    background-color: #f1f1f1;
}
#calc input:focus,
#calc select:focus {
    background-color: #f3f3f3;
}
#calc input[readonly],
#calc input[readonly]:hover,
#calc input[readonly]:focus,
#calc select[readonly],
#calc select[readonly]:hover,
#calc select[readonly]:focus {
    background-color: #b1fbcf;
}

#calc select {
    text-align: left;
}

#calc .noicon {
    padding-right: 0.4em;
}

#calc label.disabled {
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
}

#calc label.disabled:after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
}

#calc label.readonly {
    pointer-events: none;
    user-select: none;
}

#calc label.readonly:after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
}

#calc label.half .part {
    width: 50%;
}

#calc label.half input,
#calc label.half select {
    width: 100%;
}

#calc label.vertical {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.4em;
}

#calc label.vertical .part,
#calc label.vertical input,
#calc label.vertical select {
    width: 100%;
    text-align: left;
}

#calc label.vertical .title,
#calc label.vertical .note {
    font-size: 0.6em;
    line-height: 1.4em;
}

#calc .splited {
    display: flex;
    gap: 0.4em;
}

#calc .splited-small > *:first-child {
    flex-shrink: 1.8;
}

#calc .hide {
    display: none;
}

#calc .off {
    opacity: 0;
    visibility: hidden;
}

.part {
    display: block;
    position: relative;
}
.prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    font-size: 0.7em;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    line-height: 1;
    border-left: 2px solid #fff;
    border-radius: 0 0.2em 0.2em 0;
}

.buttons,
.suggestion {
    transition: opacity .2s ease, visibility .2s ease;
}

@media (orientation: portrait) {
    body {
        font-size: 26px;
    }
    #wrap {
        padding: 24px;
        align-items: flex-start;
    }
    #calc label {
        margin-bottom: 10px;
    }
}

.menu-item,
.back-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #000;
    background-color: #ededed;
    text-decoration: none;
    font-size: .6em;
    border-radius: .2em;
    margin-bottom: 8px;
    padding: 0 14px;
    transition: background-color .2s ease;
}

.menu-item:hover,
.back-item:hover {
    background-color: #fafafa;
}

.back-item {
    width: fit-content;
}