.ysk-calculator,
.ysk-calculator * {
    box-sizing: border-box;
}

.ysk-calculator {
    width: 100%;
    max-width: 980px;
    margin: 24px auto;
    padding: 24px;
    border: 1px solid #f1e4cf;
    border-radius: 24px;
    background: #fffdf8;
    color: #2b2118;
    font-family: inherit;
    box-shadow: 0 18px 45px rgba(90, 61, 31, 0.10);
    overflow: visible;
}

.ysk-title {
    margin: 0 0 10px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.12;
    color: #24180f;
}

.ysk-intro {
    margin: 0 0 18px;
    line-height: 1.55;
    color: #6a5848;
}

.ysk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.ysk-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.ysk-label {
    font-weight: 700;
    line-height: 1.35;
    color: #4b3828;
}

.ysk-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d9c5ad;
    border-radius: 14px;
    background: #fffaf3;
    color: #2b2118;
    font: inherit;
    line-height: 1.35;
    outline: none;
}

.ysk-control:focus {
    border-color: #b77731;
    box-shadow: 0 0 0 3px rgba(183, 119, 49, 0.14);
}

.ysk-help {
    font-size: 13px;
    line-height: 1.45;
    color: #796656;
}

.ysk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 14px;
}

.ysk-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #b77731;
    border-radius: 14px;
    background: #b77731;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.ysk-button:hover,
.ysk-button:focus-visible {
    background: #9a5c22;
    border-color: #9a5c22;
    outline: none;
    transform: translateY(-1px);
}

.ysk-button-light {
    background: #fff3df;
    border-color: #ead8bf;
    color: #4b3828;
}

.ysk-button-light:hover,
.ysk-button-light:focus-visible {
    background: #ead8bf;
    border-color: #d9c5ad;
    color: #2b2118;
}

.ysk-result {
    margin-top: 14px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #2f241a, #4a3322);
    color: #fff8ed;
    box-shadow: 0 16px 34px rgba(55, 35, 21, 0.20);
    overflow: hidden;
}

.ysk-result-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ysk-result-label {
    display: block;
    margin-bottom: 3px;
    color: #e8c895;
    font-size: 13px;
    line-height: 1.35;
}

.ysk-result-title {
    display: block;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.ysk-output {
    width: 100%;
    max-width: 100%;
    padding: 0;
    color: #fffdf8;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}

.ysk-status {
    margin: 12px 0 0;
    color: #ead8bf;
    font-size: 13px;
    line-height: 1.45;
}

.ysk-note {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #f0dfc8;
    border-radius: 18px;
    background: #ffffff;
    color: #5d4b3d;
    font-size: 14px;
    line-height: 1.55;
}

.ysk-note strong {
    color: #4b3828;
}

@media (max-width: 860px) {
    .ysk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .ysk-calculator {
        margin: 18px auto;
        padding: 18px;
        border-radius: 20px;
    }

    .ysk-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .ysk-actions {
        flex-direction: column;
    }

    .ysk-button {
        width: 100%;
    }

    .ysk-result {
        padding: 16px;
        border-radius: 20px;
    }

    .ysk-output {
        font-size: 14px;
    }
}
