.study-tools-embed {
    background: none;
    min-width: 0;
}

.study-tools-embed .main-container {
    width: 100%;
    max-width: 1300px;
    padding: 4px 0 24px;
}

.study-tools-embed .tool-card {
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(15, 35, 80, .06);
}

/* 移动工具导航使用原页面的全屏遮罩和滚动锁，关闭后由工具交互释放。 */
body:has(.study-tools-embed.tool-nav-open) {
    overflow: hidden;
}

.study-tools-mobile .main-container {
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 10px 8px 24px;
}

.study-tools-mobile .sidebar {
    display: none;
}

.study-tools-mobile .sidebar.sidebar-tool-switcher.visible {
    display: flex;
    top: 60px;
    bottom: auto;
    height: calc(100vh - 136px);
    height: calc(100dvh - 136px);
    max-height: calc(100dvh - 136px);
}

.study-tools-mobile .content-area {
    width: 100%;
    min-width: 0;
}

.study-tools-mobile .toast {
    bottom: calc(66px + env(safe-area-inset-bottom));
}

@media (min-width: 1051px) {
    .study-tools-embed:not(.study-tools-mobile) .calculator-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    }
}

@media print {
    body:has(.study-tools-embed.tool-nav-open) {
        overflow: visible;
    }
}
