/* School Math Calculator */
.smc-floating-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

.smc-toggle {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    border: 0;
    cursor: pointer;
    background: linear-gradient(145deg, #0f766e, #2563eb);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.38);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.02;
    font-weight: 900;
    touch-action: manipulation;
}

.smc-toggle span {
    font-size: 11px;
    text-transform: uppercase;
}

.smc-toggle strong {
    font-size: 18px;
}

.smc-toggle em {
    font-style: normal;
    font-size: 11px;
    color: #fef3c7;
}

.smc-floating-panel {
    width: 356px;
    max-width: calc(100vw - 28px);
    margin-bottom: 12px;
}

.smc-shortcode-wrap {
    max-width: 410px;
    margin: 24px auto;
    font-family: Arial, Helvetica, sans-serif;
}

.smc-calculator {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255,255,255,0.12);
}

.smc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
}

.smc-logo {
    width: 72px;
    height: 72px;
    border-radius: 19px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    color: #0f766e;
    line-height: 1.03;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.smc-logo span {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.smc-logo strong {
    font-size: 22px;
    color: #2563eb;
    letter-spacing: -.5px;
}

.smc-logo em {
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
}

.smc-title strong {
    display: block;
    font-size: 18px;
    line-height: 1.15;
}

.smc-title span {
    display: block;
    font-size: 12px;
    color: #d1fae5;
    margin-top: 4px;
    line-height: 1.35;
}

.smc-screen {
    margin: 14px;
    padding: 15px;
    min-height: 98px;
    background: #020617;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

.smc-expression {
    min-height: 30px;
    font-size: 23px;
    line-height: 1.25;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    color: #e5e7eb;
}

.smc-result {
    margin-top: 8px;
    min-height: 22px;
    font-size: 15px;
    color: #67e8f9;
    overflow-wrap: anywhere;
}

.smc-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 14px 14px;
}

.smc-keys button {
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 16px;
    background: #1f2937;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25);
    transition: transform 0.06s ease, filter 0.15s ease;
    touch-action: manipulation;
}

.smc-keys button:hover {
    filter: brightness(1.12);
}

.smc-keys button:active {
    transform: scale(0.96);
}

.smc-keys .smc-control {
    background: #475569;
}

.smc-keys .smc-operator {
    background: #2563eb;
}

.smc-keys .smc-equals {
    background: #0f766e;
}

.smc-keys .smc-zero {
    grid-column: span 2;
    aspect-ratio: auto;
}

.smc-help {
    padding: 0 16px 16px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 640px) {
    .smc-floating-widget {
        right: 12px;
        bottom: 12px;
    }

    .smc-toggle {
        width: 68px;
        height: 68px;
        border-radius: 19px;
    }

    .smc-toggle strong {
        font-size: 16px;
    }

    .smc-floating-panel {
        width: calc(100vw - 24px);
    }

    .smc-keys {
        gap: 8px;
    }

    .smc-keys button {
        border-radius: 14px;
        font-size: 20px;
    }
}
