.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2em;
}

/* ============ 扬声器测试可视化 ============ */
.tool-content .svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.tool-content .speaker-stage {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 12px;
    border: 1px solid var(--border-color);
    border-radius: .6em;
    background: #f6f8fa;
}

.tool-content .speaker-unit {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 116px;
    opacity: .62;
    transition: opacity .15s;
    flex-shrink: 0;
}

.tool-content .speaker-unit.on {
    opacity: 1;
}

.tool-content .speaker-unit > svg {
    width: 96px;
    height: 112px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 5px 7px rgba(15, 23, 42, .22));
}

.tool-content .speaker-unit .cab {
    fill: url(#cabGrad);
    stroke: #0f172a;
    stroke-width: 1.5;
    transition: stroke .15s;
}

.tool-content .speaker-unit .cab-hi {
    fill: url(#cabHi);
}

.tool-content .speaker-unit .ring {
    fill: url(#metalGrad);
    stroke: #64748b;
    stroke-width: 1;
}

.tool-content .speaker-unit .cone {
    fill: url(#coneGrad);
}

.tool-content .speaker-unit .dust {
    fill: #0f172a;
    stroke: #64748b;
    stroke-width: .8;
    transition: fill .15s, stroke .15s;
}

.tool-content .speaker-unit .tweeter {
    fill: #0f172a;
    stroke: #64748b;
    stroke-width: 1;
}

.tool-content .speaker-unit .tw-hi {
    fill: #ffffff;
    opacity: .55;
}

.tool-content .speaker-unit .port {
    fill: #020617;
}

.tool-content .speaker-unit.on .cab {
    stroke: rgb(93 79 248 / 95%);
}

.tool-content .speaker-unit.on .dust {
    fill: rgb(93 79 248 / 95%);
    stroke: rgb(93 79 248 / 95%);
    filter: url(#speakerGlow);
}

.tool-content .speaker-unit.on .ring {
    stroke: rgb(93 79 248 / 95%);
}

.tool-content .speaker-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    margin-top: 4px;
}

.tool-content .waves {
    position: absolute;
    left: 50%;
    top: 56px;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 0;
}

.tool-content .waves i {
    position: absolute;
    left: -44px;
    top: -44px;
    width: 88px;
    height: 88px;
    border: 2px solid rgb(93 79 248 / 95%);
    border-radius: 50%;
    opacity: 0;
}

.tool-content .speaker-unit.on .waves i {
    animation: speakerRipple 1.5s ease-out infinite;
}

.tool-content .speaker-unit.on .waves i:nth-child(2) {
    animation-delay: .5s;
}

.tool-content .speaker-unit.on .waves i:nth-child(3) {
    animation-delay: 1s;
}

@keyframes speakerRipple {
    from {
        transform: scale(.55);
        opacity: .9;
    }
    to {
        transform: scale(1.9);
        opacity: 0;
    }
}

.tool-content .pan-track {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    position: relative;
    margin: 0 4px;
}

.tool-content .pan-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    transform: translate(-50%, -50%);
    transition: left .09s ease-out, background .15s, box-shadow .15s;
}

.tool-content .pan-dot.on {
    background: rgb(93 79 248 / 95%);
    box-shadow: 0 0 0 4px rgb(93 79 248 / 15%);
}

.tool-content .meter-row {
    display: flex;
    gap: 18px;
    align-items: center;
}

.tool-content .meter {
    flex: 1;
}

.tool-content .meter-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
}

.tool-content .bar {
    height: 10px;
    background: #eef2f7;
    border-radius: 6px;
    overflow: hidden;
}

.tool-content .bar i {
    display: block;
    height: 100%;
    width: 0;
    background: #cbd5e1;
    border-radius: 6px;
    transition: width .12s, background .12s;
}

.tool-content .bar.on i {
    background: rgb(93 79 248 / 95%);
    width: 100%;
}

.tool-content .tool-warning {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 7px;
    padding: 9px 14px;
}

.tool-content .operate-buttons.channel-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== 统一按钮：基础尺寸/圆角/过渡 + 水波（common.js 注入 .ripple） ===== */
.tool-content .btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #333;
    background-color: var(--main-bg);
    cursor: pointer;
    flex-shrink: 0;
    font-family: var(--font-simple);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgb(15 23 42 / .05);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease, opacity .18s ease;
}

.tool-content .btn:active:not(:disabled) {
    transform: translateY(1px);
}

.tool-content .btn .ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: ripple-effect 0.6s ease-out forwards;
}

@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* 声道按钮 + 测试音按钮共用同一套主题色三态 */
.tool-content .channel-btn,
.tool-content .tone-btn {
    color: rgb(93 79 248 / 95%);
    background-color: #fff;
    border-color: rgb(93 79 248 / 95%);
}

/* 悬停与激活同效：主题紫实心 + 白字 + 投影 */
.tool-content .channel-btn:hover:not(:disabled),
.tool-content .tone-btn:hover:not(:disabled),
.tool-content .channel-btn.active,
.tool-content .tone-btn.active {
    color: #fff;
    background-color: rgb(93 79 248 / 100%);
    border-color: rgb(93 79 248 / 100%);
    box-shadow: 0 2px 8px rgb(93 79 248 / 30%);
}

.tool-content .channel-btn {
    min-width: 108px;
}

.tool-content .channel-btn.stop-btn {
    margin-left: auto;
    color: #fff;
    background-color: #dc2626;
    border-color: #dc2626;
}

.tool-content .channel-btn.stop-btn:hover:not(:disabled) {
    color: #fff;
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.tool-content .btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.tool-content .speaker-settings {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
    border-radius: 7px;
}

.tool-content .setting-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tool-content .setting-row label {
    width: 70px;
    flex-shrink: 0;
    color: #475569;
    font-size: 14px;
    text-align: right;
}

.tool-content .setting-value {
    width: 68px;
    flex-shrink: 0;
    color: rgb(93 79 248 / 95%);
    font-weight: 600;
    font-size: 14px;
    text-align: right;
}

.tool-content .tone-chips {
    flex: 1;
}

.tool-content .setting-row input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 6px;
    margin: 0;
    padding: 0;
    background: linear-gradient(rgb(93 79 248 / 95%), rgb(93 79 248 / 95%)) 0/40% 100% no-repeat #dbe2ea;
    border-radius: 7px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.tool-content .setting-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgb(93 79 248 / 95%);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgb(15 23 42 / .28);
    cursor: pointer;
}

.tool-content .setting-row input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgb(93 79 248 / 95%);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgb(15 23 42 / .28);
    cursor: pointer;
}

.tool-content .setting-row input[type="range"]::-moz-range-track {
    height: 6px;
    background: #dbe2ea;
    border-radius: 7px;
}

.tool-content .setting-row input[type="range"]::-moz-range-progress {
    height: 6px;
    background: rgb(93 79 248 / 95%);
    border-radius: 7px;
}

.tool-content .tone-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-content .tool-note {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em;
        box-shadow: unset;
        gap: 0.8em;
    }

    .tool-content .speaker-stage {
        padding: 14px 8px 10px;
        gap: 6px;
    }

    .tool-content .speaker-unit {
        width: 94px;
    }

    .tool-content .speaker-unit > svg {
        width: 78px;
        height: 91px;
    }

    .tool-content .waves {
        top: 45px;
    }

    .tool-content .waves i {
        left: -36px;
        top: -36px;
        width: 72px;
        height: 72px;
    }

    .tool-content .channel-btn {
        min-width: 100px;
        padding: 0 8px;
        font-size: 13px;
    }

    .tool-content .setting-row label {
        width: 70px;
    }

    .tool-content .setting-value {
        width: 58px;
    }

    .tool-content .setting-row {
        gap: 8px;
    }
}