.calc-wrap {
    margin: 8px 0 28px;
    font-family: arial, helvetica, sans-serif;
}

.calc-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.6;
}

#sciout {
    width: 710px;
    max-width: 100%;
    padding: 6px;
    border: #e5e5e5 solid 1px;
    border-radius: 0.33333rem;
    background: #EAECF3;
    margin: 0;
    box-sizing: border-box;
}

#sciout label {
    cursor: pointer;
    margin: 0;
    display: inline-block;
    font-size: 16px;
    font-family: arial, helvetica, sans-serif;
    width: 48%;
}

#sciout label input {
    margin-top: 0;
    border: none;
    vertical-align: middle;
}

#sciPut {
    border-radius: 0.33333rem;
    background: #fff;
    padding: 0.5rem;
    margin: 8px;
    margin-top: 0;
    box-shadow: inset 1px 1px 1px 0 rgb(40 49 85 / 40%);
}

#sciInPut {
    overflow: hidden;
    width: auto;
    margin: 2px;
    margin-bottom: -2px;
    margin-left: 28px;
    word-wrap: break-word;
    font-size: 16px;
    opacity: 0.5;
    text-align: right;
    line-height: 1;
    color: #283155;
    padding-top: 6px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 1.2em;
}

#sciInPut b {
    color: #ccc;
    font-weight: bold;
}

#sciOutPut {
    margin: 2px;
    cursor: text;
    text-align: right;
    border: 0;
    -webkit-appearance: none;
    font-size: 2.88889rem;
    color: #333;
    background: 0;
    min-height: 1.2em;
    word-break: break-all;
    line-height: 1.15;
}

.calc-sci,
.calc-stand {
    float: left;
    width: 50%;
    display: table;
    box-sizing: border-box;
}

.calc-stand {
    float: right;
}

.calc-sci > div,
.calc-stand > div {
    display: flex;
    border-collapse: separate;
    border-spacing: 7px 4px;
    gap: 4px 7px;
    padding: 2px 6px;
    box-sizing: border-box;
}

.scinm,
.sciop,
.scieq,
.scifunc {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    border: none;
    border-radius: 10px;
    font-family: arial, helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    color: #283155;
    text-shadow: 1px 1px 1px rgb(0 0 0 / 10%);
    box-shadow:
        inset 1px 1px 1px 0 rgb(255 255 255 / 80%),
        inset -1px -1px 1px 0 rgb(40 49 85 / 30%),
        1px 1px 3px 0 rgb(40 49 85 / 10%);
}

.scinm {
    background-image: linear-gradient(135deg, #F4F5F6, #fff);
    font-size: 20px;
}

.scinm:hover { background: #DFE0E5; }
.scinm:active,
.sciop:active,
.scifunc:active,
.scieq:active {
    box-shadow: none;
    color: #747a92;
    transform: scale(0.95);
    text-shadow: none;
    background: #cfd2e0;
}

.sciop,
.scifunc {
    background-color: #e5ecf3;
    background-image: linear-gradient(135deg, #D9DCE8, #E2E4EF);
}

.sciop:hover,
.scifunc:hover { background: #cfd2e0; }

.scieq {
    background: #4f6ef2;
    color: #fff;
    box-shadow:
        inset 1px 1px 1px 0 rgb(255 255 255 / 20%),
        inset -2px -2px 1px 0 rgb(40 49 85 / 30%),
        1px 1px 3px 0 rgb(168 174 199 / 20%);
}

.calc-key-ac {
    background-image: linear-gradient(135deg, #FFA80E, #FFC355);
    color: #fff;
    font-size: 20px;
}

.scird {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex: 2 1 0;
    min-width: 0;
    height: 38px;
    border-radius: 10px;
    font-size: 13px;
    color: #262626;
    background: #cfd2e0;
    user-select: none;
    box-shadow:
        inset -1px -1px 1px 0 rgb(255 255 255 / 70%),
        inset 1px 1px 1px 0 rgb(40 49 85 / 20%),
        1px 1px 3px 0 rgb(40 49 85 / 10%);
    padding: 0 4px;
}

.scird label {
    width: auto !important;
    font-size: 13px !important;
    white-space: nowrap;
}

.scird input[type="radio"]:checked + b {
    color: #1d4ed8;
}

.clear {
    clear: both;
}

.scihistorybox {
    width: 710px;
    max-width: 100%;
    margin-top: 14px;
}

.scihistorytitle {
    overflow: hidden;
}

.scihistorytitle span {
    float: right;
    color: #999;
    font-size: 13px;
    line-height: 28px;
}

.scihistorytitle h3 {
    margin: 0;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

#scihistory {
    clear: both;
    margin-top: 6px;
}

#scihistory div {
    font-size: 16px;
    color: #666;
    text-align: right;
    overflow: hidden;
    margin-right: 4px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.calc-help {
    margin-top: 16px;
    max-width: 720px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
}

.calc-help h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #374151;
}

.calc-help p {
    margin: 0 0 8px;
}

.calc-help p:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 720px) {
    #sciout {
        width: 100%;
        padding: 16px 8px 8px;
        border: none;
        border-radius: 0;
    }

    .scihistorybox {
        width: 100%;
    }

    #sciInPut { font-size: 14px; }
    #sciOutPut { font-size: 2.2rem; }

    .calc-sci,
    .calc-stand {
        float: none;
        width: 100%;
    }

    .calc-sci { order: 2; }
    .calc-stand { order: 1; }

    .scinm,
    .sciop,
    .scieq,
    .scifunc {
        width: 18%;
        margin: 4px 1%;
        line-height: 2.5rem;
        height: 2.5rem;
        flex: none;
    }

    .scird {
        width: 38%;
        margin: 4px 1%;
        line-height: 2.5rem;
        height: 2.5rem;
        flex: none;
    }

    .calc-sci > div,
    .calc-stand > div {
        flex-wrap: wrap;
        gap: 0;
        padding: 0;
        justify-content: flex-start;
    }
}
