.ctprndiv {
    background: #08080e;
    color: #e8e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 3px;
    background: url('/zb_users/plugin/xc_toolbox/style/img/heibg.png') repeat;
}

.ct {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 0.5rem;
    background-color: #000;
    border-radius: 6px;
}

.cthead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.cth2title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.cth2title span:nth-child(1) {
    color: #f97316;
    margin: 0 0.2rem;
}

.cth2title span:nth-child(2) {
    opacity: .8;
    margin: 0 0.2rem;
}

.sectiondiv {
    background: #111118;
    border: 1px solid #252535;
    padding: 0.1rem 0.3rem 0.2rem 0.3rem;
    border-radius: 3px;
    display: flex;
    gap: 0.25rem;
}

.sectiondiv-l {
    width: 7.25rem;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.sectiondiv-r {
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.sectiondiv-r::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

.scroll-inner {
    width: 100%;
    min-width: 700px;
}

#drumRowsitem {
    height: 68px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
}

#drumRows {
    height: calc(100% - 68px);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.sectiondiv2 {
    margin-top: 0.25rem;
    border-radius: 3px;
}

.sw {
    overflow-x: auto;
    flex: 1;
    min-width: 0
}

.sw::-webkit-scrollbar {
    height: 4px
}

.sw::-webkit-scrollbar-track {
    background: transparent
}

.sw::-webkit-scrollbar-thumb {
    background: #252535;
    border-radius: 2px
}

.sg {
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(32, 1fr);
    min-width: calc(32*14px + 31*2px)
}

@media(min-width:640px) {
    .sg {
        gap: 3px;
        min-width: calc(32*16px + 31*3px)
    }
}

#kuai {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 0.2rem;
}

.step-cell {
    aspect-ratio: 1;
    border-radius: 2px;
    border: 1.5px solid #252535;
    background: #111118;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.step-cell:hover {
    border-color: #3a3a50;
    background: #1a1a24
}

.step-cell.on {
    border-color: var(--cc);
    background: var(--cc);
    box-shadow: 0 0 5px var(--cg)
}

.step-cell.on::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 1px;
    background: rgba(255, 255, 255, .15)
}

.row-dim .step-cell {
    opacity: .18;
    pointer-events: none
}

.row-dim .step-cell.on {
    box-shadow: none
}

.row-dim .lbl-btn,
.row-dim .dial-wrap {
    opacity: .3
}

.lbl-btn {
    width: 35px;
    font-size: 8px;
    letter-spacing: .2px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid #252535;
    background: #252525;
    color: #8a8a9a;
    height: 18px;
    display: flex;
    align-items: center;
    transition: all .12s;
    flex-shrink: 0;
    line-height: 1;
    justify-content: center;
}

.lbl-btn:hover {
    color: #c8c8d8;
}

.mb,
.sb,
.rb,
.ib {
    width: 18px;
    height: 18px;
    border-radius: 1px;
    border: 1px solid #252535;
    background: transparent;
    color: #6b6b80;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    transition: all .12s;
    flex-shrink: 0;
}

.mb:hover {
    border-color: #ef4444;
    color: #ef4444
}

.mb.mu {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff
}

.sb:hover {
    border-color: #facc15;
    color: #facc15
}

.sb.so {
    background: #facc15;
    border-color: #facc15;
    color: #000;
    box-shadow: 0 0 6px rgba(250, 204, 21, .3)
}

.rb:hover {
    border-color: #34d399;
    color: #34d399
}

.ib:hover {
    border-color: #60a5fa;
    color: #60a5fa
}

.sn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7px;
    color: #6b6b80;
    text-align: center;
    opacity: .5;
    border-radius: 2px;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.sn:hover {
    color: #e8e8f0;
    opacity: 1;
    background: rgba(255, 255, 255, .04)
}

.sn.bt {
    color: #e8e8f0;
    opacity: .75
}

.col-num {
    cursor: pointer;
    font-size: 7px;
    display: inline-block;
    width: 100%;
}

.col-num:hover {
    text-decoration: underline;
}

.col-btn-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    margin-top: 2px;
}

.col-btn {
    font-size: 8px;
    background: #1a1a24;
    border: 1px solid #252535;
    border-radius: 3px;
    width: 16px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b6b80;
    transition: all .1s;
}

.col-inv-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: rgba(96, 165, 250, .1);
}

.col-rev-btn:hover {
    border-color: #34d399;
    color: #34d399;
    background: rgba(52, 211, 153, .1);
}

.col-mute-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, .1);
}

.col-mute-btn.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.pbuts {
    height: 1rem;
    width: 1rem;
    line-height: 1rem;
    border-radius: 3px;
    border: 1px solid #252535;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #484877;
    color: #fff;
}

.pbuts i {
    font-size: 0.6rem;
}

#fulls {
    background-color: #484877;
    color: #fff;
}

.pb {
    padding: 0.25rem 0.55rem;
    border-radius: 3px;
    border: 1px solid #252535;
    background: #111118;
    color: #6b6b80;
    font-size: 0.55rem;
    cursor: pointer;
    transition: all .14s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.pb:hover {
    border-color: #f97316;
    color: #e8e8f0;
    background: rgba(249, 115, 22, .07)
}

.pb:disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none
}

/* 鼓组按钮角标 */
.kit-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 8px;
    padding: 0 3px;
    min-width: 14px;
    text-align: center;
    line-height: 14px;
}

.bpm-ctrl {
    display: flex;
    align-items: center;
    height: 28px;
}

.bpm-btn {
    width: 0.9rem;
    height: 0.7rem;
    border-radius: 5px;
    border: 1px solid #252535;
    background: #111118;
    color: #6b6b80;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    transition: all .12s;
    flex-shrink: 0;
}

.bpm-btn:hover {
    border-color: #f97316;
    color: #f97316;
    background: rgba(249, 115, 22, .08)
}

.bi {
    width: 2rem;
    margin: 0 0.2rem;
    border-radius: 5px;
    height: 0.7rem;
    background: #111118;
    border: 1px solid #252535;
    color: #f97316;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    text-align: center;
    padding: 0;
    outline: none;
    line-height: 1;
}

.bi:focus {
    border-color: #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, .3)
}

.bi::-webkit-inner-spin-button,
.bi::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0
}

.bi {
    -moz-appearance: textfield
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #252535;
    outline: none
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #f97316;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(249, 115, 22, .3)
}

.pat-wrap {
    display: flex;
    align-items: center
}

.pat-tab {
    width: 1.5rem;
    height: 1rem;
    line-height: 1rem;
    border-radius: 3px;
    border: 1px solid #252535;
    background: #111118;
    color: #6b6b80;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-touch-callout: none;
    /* 禁用 iOS 长按菜单 */
    touch-action: manipulation;
    /* 优化触摸响应 */
}

.pat-tab:hover {
    border-color: #f97316;
    color: #e8e8f0;
    background: #1a1a24
}

.pat-tab.active {
    background: #f97316;
    border-color: #f97316;
    color: #000;
}

.pat-tab.active:hover {
    background: #ea580c;
    border-color: #ea580c
}

.pat-add {
    width: 1.2rem;
    height: 1rem;
    line-height: 1rem;
    border-radius: 3px;
    border: 1px solid #252535;
    background: #111118;
    color: #6b6b80;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pat-add:hover {
    border-color: #f97316;
    color: #f97316;
    background: rgba(249, 115, 22, .08)
}

.dial {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    background: conic-gradient(from 225deg, #f97316 0deg, #f97316 var(--fill, 0deg), #1a1a24 var(--fill, 0deg), #1a1a24 270deg, transparent 270deg)
}

.dial::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #111118
}

.dial::after {
    content: '';
    position: absolute;
    width: 1.5px;
    height: 4px;
    background: #e8e8f0;
    left: calc(50% - .75px);
    bottom: 50%;
    transform-origin: 50% 100%;
    transform: rotate(var(--needle, -135deg));
    border-radius: 1px;
    z-index: 1
}

.dial-wrap {
    display: flex;
    align-items: center
}

#viz {
    width: 100%;
    height: 80px;
    border-radius: 3px;
    background: #111118;
    border: 1px solid #252535;
    display: block
}

@keyframes bk {

    0%,
    100% {
        opacity: .45
    }

    50% {
        opacity: 1
    }
}

.ld {
    animation: bk .8s ease infinite
}

.scan-bar {
    height: 2px;
    border-radius: 1px;
    background: transparent;
    pointer-events: none;
    transition: background .05s
}

.scan-bar.active {
    background: #607D8B;
}

.sv {
    font-size: 0.5rem;
    color: #6b6b80;
    width: 1.2rem;
    flex-shrink: 0;
}

.dp-label {
    font-family: 'JetBrains Mono', monospace
}

.dp-btn {
    font-family: 'Space Grotesk', sans-serif
}

@media(max-width:640px) {
    .lbl-btn {
        font-size: 9px;
        padding: 0 4px;
        height: 20px
    }

    .step-cell {
        border-radius: 2px
    }

    .pat-tab {
        padding: 0 7px;
        height: 1rem;
        line-height: 1rem;
        font-size: 10px
    }

    .dial {
        width: 16px;
        height: 16px
    }

    .dial::before {
        inset: 2px
    }

    .dial::after {
        width: 1px;
        height: 3px
    }
}

@media(prefers-reduced-motion:reduce) {

    .cb,
    .pb,
    .sn,
    .sb,
    .mb,
    .rb,
    .ib,
    .pat-tab,
    .pat-add,
    .lbl-btn {
        transition: none
    }

    .ld {
        animation: none;
        opacity: 1
    }

    .sp {
        transition: none
    }
}

.row-left {
    width: 7.25rem;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.row-left .pb {
    width: 100%;
    justify-content: center;
    margin: 0;
}

/* 弹窗选项按钮样式 */
.popup-option-btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    height: 1.4rem;
    line-height: 1;
    border: 0;
    border-radius: 6px;
    color: #e8e8f0;
    cursor: pointer;
    transition: all .14s;
    text-align: center;
    background-color: #16baaa;
}

.popup-option-btn:last-child {
    margin-bottom: 0;
}

.io-btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.io-btn-group button {
    display: inline-block;
    vertical-align: middle;
    border: 1px solid transparent;
    background-color: #16baaa;
    color: #e8e8f0;
    font-size: 0.5rem;
    width: 5rem;
    padding: 0.15rem 0;
    white-space: nowrap;
    text-align: center;
    border-radius: 2px;
    cursor: pointer;
}

.bars-select {
    background: #111118;
    border: 1px solid #252535;
    color: #e8e8f0;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    margin-left: 10px;
}

#settingsPanel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.1rem 0.5rem;
    margin-bottom: 0.25rem;
    justify-content: space-between;
    background: #111118;
    border: 1px solid #252535;
    border-radius: 3px;
    overflow: hidden;
    opacity: 1
}

#settingsPanel>div.sea {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#settingsPanel>div.sea>div {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

#settingsPanel>div.seb {
    display: flex;
}

#settingsPanel.hide {
    display: none !important;
}

.labeldiv {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6b6b80;
}

#liveDot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgb(239, 68, 68);
    opacity: 1;
    position: absolute;
    right: 2px;
    top: 2px;
}

.pbh {
    border-radius: 3px;
    border: 0;
    background-color: transparent;
    color: #6b6b80;
    cursor: pointer;
    position: relative;
    width: 1rem;
    height: 1rem;
    line-height: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pbh i {
    font-size: 0.65rem;
}

.drumextalert {
    padding: 0.5rem;
    text-align: center;
}

.drumextalert .layui-form {
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.night .drumextalert .layui-form {
    border-bottom: 1px solid #444;
}

.beatalert .layui-layer-title {
    height: 1.8rem;
    line-height: 1.8rem;
    font-size: 0.6rem;
}

.beatalert .layui-layer-setwin {
    top: 0.5rem;
}

.beatalert .layui-layer-content {
    color: #34495e;
}

.night .beatalert .layui-layer-content {
    color: #ddd;
}

#patTabs {
    display: flex;
    align-items: center;
    gap: 4px;
}


@media screen and (max-width: 886px) {
    .sectiondiv2 {
        display: none;
    }
}