.content:has(.tool-form-single-calc) .tool-info code {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    white-space: normal;
}

.tool-form-single-calc {
    display: flex;
    justify-content: center;
    padding: 28px 16px 12px;
}

.tool-form-single-calc .single-calc-panel {
    width: min(100%, 360px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: stretch;
}

.tool-form-single-calc.is-dual .single-calc-panel,
.tool-form-single-calc.is-triple .single-calc-panel {
    width: min(100%, 420px);
}

.tool-form-single-calc .single-calc-formula {
    margin: 0;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: #222;
}

.tool-form-single-calc .single-calc-fields {
    display: grid;
    gap: 10px;
    width: 100%;
}

.tool-form-single-calc.is-dual .single-calc-fields {
    grid-template-columns: 1fr 1fr;
}

.tool-form-single-calc.is-triple .single-calc-fields {
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
}

.tool-form-single-calc .single-calc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tool-form-single-calc .single-calc-label {
    font-size: 0.85rem;
    color: #666;
    text-align: left;
}

.tool-form-single-calc .single-calc-field .form-input,
.tool-form-single-calc .single-calc-field select.form-input {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    text-align: center;
    height: 2.25rem;
    margin: 0;
}

.tool-form-single-calc .single-calc-field select.form-input {
    min-width: 4.5rem;
    padding-left: .4rem;
    padding-right: .4rem;
}

.tool-form-single-calc .form-btn.single-calc-actions {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: stretch;
    justify-content: stretch;
    flex-wrap: nowrap;
}

.tool-form-single-calc .form-btn.single-calc-actions::after {
    display: none;
    content: none;
}

.tool-form-single-calc .form-btn.single-calc-actions .btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 0;
    margin: 0 !important;
    height: 2.25rem;
    box-sizing: border-box;
    display: block;
}

.tool-form-single-calc .single-calc-result-wrap {
    width: 100%;
    min-height: 2.4rem;
    text-align: center;
}

.tool-form-single-calc .single-calc-ops {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.tool-form-single-calc .single-calc-ops.is-empty .single-calc-op-value:empty::before {
    content: "—";
    color: #ccc;
    font-weight: 400;
}

.tool-form-single-calc .single-calc-op-row {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 2.25rem;
    box-sizing: border-box;
}

.tool-form-single-calc .single-calc-op-label {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.tool-form-single-calc .single-calc-op-value {
    min-width: 0;
    color: #1677ff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 2.25rem;
    height: 2.25rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-form-single-calc .single-calc-op-copy {
    flex-shrink: 0;
    height: 1.85rem;
    padding: 0 .55rem;
    margin: 0;
    font-size: .8rem;
    line-height: 1;
    white-space: nowrap;
}

.tool-form-single-calc .single-calc-result {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: #1677ff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    word-break: break-all;
    white-space: pre-line;
}

.tool-form-single-calc .single-calc-result.is-hidden-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tool-form-single-calc .single-calc-result:empty::before {
    content: "—";
    color: #ccc;
    font-weight: 400;
}

.tool-form-single-calc .single-calc-result.is-hidden-copy:empty::before {
    content: none;
}

.single-calc-hub-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.single-calc-hub-list a {
    display: block;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #1677ff;
    text-decoration: none;
}

.single-calc-hub-list a:hover {
    border-color: #1677ff;
    background: #f5faff;
}

@media screen and (max-width: 768px) {
    .tool-form-single-calc {
        padding: 18px 12px 8px;
    }

    .tool-form-single-calc.is-dual .single-calc-fields,
    .tool-form-single-calc.is-triple .single-calc-fields {
        grid-template-columns: 1fr;
    }
}
