body { background-color: #FBFFF1; color: #3C3744; }
.cd-container { max-width: 1100px; margin: 0 auto; padding: 40px 20px 80px; }
.cd-header { text-align: center; margin-bottom: 36px; }
.cd-header h1 { font-size: 28px; font-weight: 700; color: #3C3744; letter-spacing: -0.5px; }
.cd-header p  { font-size: 14px; color: #888; margin-top: 8px; }

/* 패널 공통 */
.cd-panel {
    background: white;
    border: 1px solid #B4C5E4;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(60,55,68,0.04);
}
.cd-panel-title {
    font-size: 13px; font-weight: 700; color: #3C3744;
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.cd-panel-title span { color: #B4C5E4; }

/* 화면 공유 영역 */
.cd-share-area {
    border: 2px dashed #B4C5E4; border-radius: 12px;
    padding: 32px; text-align: center; cursor: pointer;
    transition: border-color 0.2s; margin-bottom: 16px;
}
.cd-share-area:hover { border-color: #3C3744; }
.cd-share-area p { font-size: 14px; color: #aaa; margin-bottom: 16px; }

.cd-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 24px; border-radius: 50px; font-size: 14px; font-weight: 700;
    cursor: pointer; border: none; transition: all 0.2s;
}
.cd-btn-primary { background: #3C3744; color: #FBFFF1; }
.cd-btn-primary:hover { background: #2a2730; }
.cd-btn-outline { background: white; color: #3C3744; border: 1.5px solid #B4C5E4; }
.cd-btn-outline:hover { border-color: #3C3744; }
.cd-btn-danger { background: white; color: #e53935; border: 1.5px solid #e53935; }
.cd-btn-danger:hover { background: #fff5f5; }
.cd-btn-sm {
    padding: 4px 12px; font-size: 12px; font-weight: 600; border-radius: 20px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #3C3744;
    transition: all 0.2s;
}
.cd-btn-sm:hover { border-color: #3C3744; }
.cd-btn-sm.yellow { border-color: #f0c040; color: #b8860b; }
.cd-btn-sm.yellow:hover { background: #fffbea; }
.cd-btn-sm.danger { border-color: #e53935; color: #e53935; }
.cd-btn-sm.danger:hover { background: #fff5f5; }

.cd-live-bar {
    display: none; align-items: center; gap: 12px;
    margin-bottom: 14px; padding: 10px 16px;
    background: #f0fdf4; border-radius: 10px; border: 1px solid #bbf7d0;
}
.cd-live-dot {
    width: 8px; height: 8px; background: #16a34a; border-radius: 50%;
    animation: cdBlink 1s infinite;
}
@keyframes cdBlink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.cd-live-text { font-size: 13px; font-weight: 700; color: #16a34a; }

/* 저장된 셀 슬롯 */
.cd-slots-list {
    display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; align-items: flex-start;
    max-height: 128px; overflow-y: auto; overflow-x: hidden;
}
.cd-slots-list::-webkit-scrollbar { width: 4px; }
.cd-slots-list::-webkit-scrollbar-track { background: transparent; }
.cd-slots-list::-webkit-scrollbar-thumb { background: #B4C5E4; border-radius: 4px; }
.cd-slots-list::-webkit-scrollbar-thumb:hover { background: #3C3744; }
.cd-slot-item {
    position: relative; cursor: pointer;
    border: 2px solid #B4C5E4; border-radius: 8px; overflow: hidden;
    transition: border-color 0.15s; flex-shrink: 0;
}
.cd-slot-item:hover { border-color: #3C3744; }
.cd-slot-item.selected { border-color: #3C3744; box-shadow: 0 0 0 2px #3C374433; }
.cd-slot-item canvas { display: block; width: 52px; height: 52px; image-rendering: pixelated; }
.cd-slot-item .slot-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(60,55,68,0.75); font-size: 9px; color: #fff;
    text-align: center; padding: 2px 3px; white-space: nowrap; overflow: hidden;
}
.cd-slot-item .slot-del {
    position: absolute; top: 2px; right: 3px;
    font-size: 11px; color: #ffa07a; font-weight: 700; cursor: pointer; display: none;
}
.cd-slot-item:hover .slot-del { display: block; }
.cd-slots-empty { font-size: 13px; color: #ccc; }
/* 카테고리 탭 */
.cd-category-tabs {
    display: flex; flex-wrap: nowrap; gap: 5px; margin-bottom: 10px; align-items: center;
    overflow-x: auto; overflow-y: hidden; padding-bottom: 4px;
}
.cd-category-tabs::-webkit-scrollbar { height: 5px; }
.cd-category-tabs::-webkit-scrollbar-track { background: transparent; }
.cd-category-tabs::-webkit-scrollbar-thumb { background: #B4C5E4; border-radius: 4px; }
.cd-category-tabs::-webkit-scrollbar-thumb:hover { background: #3C3744; }
.cd-cat-tab {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; font-size: 11px; font-weight: 700; border-radius: 20px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #888;
    transition: all 0.15s; white-space: nowrap;
}
.cd-cat-tab:hover { border-color: #3C3744; color: #3C3744; }
.cd-cat-tab.active { border-color: #3C3744; background: #3C3744; color: #FBFFF1; }
.cd-cat-tab .cat-del {
    font-size: 10px; font-weight: 700; color: inherit; opacity: 0.6;
    cursor: pointer; margin-left: 2px; line-height: 1;
}
.cd-cat-tab .cat-del:hover { opacity: 1; }
.cd-cat-tab.active .cat-del { color: #FBFFF1; }
.cd-cat-select-list { display: flex; flex-wrap: wrap; gap: 5px; }
.cd-cat-select-opt {
    padding: 3px 10px; font-size: 11px; font-weight: 700; border-radius: 20px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #888;
    transition: all 0.15s; white-space: nowrap;
}
.cd-cat-select-opt:hover { border-color: #3C3744; color: #3C3744; }
.cd-cat-select-opt.active { border-color: #3C3744; background: #3C3744; color: #FBFFF1; }
/* 슬롯 체크박스 (탐지 ON/OFF) */
.slot-check {
    position: absolute; top: 3px; left: 3px; z-index: 2;
    width: 16px; height: 16px; cursor: pointer;
    accent-color: #3C3744;
}
.cd-slot-item.detect-off { opacity: 0.45; }
.cd-slot-item.detect-off:hover { opacity: 0.75; }
/* 인라인 설정 패널 */
.cd-inline-settings {
    margin-top: 14px; border-top: 1px solid #e8e8e8; padding-top: 14px;
}
.cd-inline-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.cd-inline-head canvas {
    border-radius: 6px; border: 1.5px solid #B4C5E4;
    image-rendering: pixelated; flex-shrink: 0;
}
#cdInlineName {
    font-size: 14px; font-weight: 700; color: #3C3744;
    border: none; border-bottom: 1.5px solid transparent; background: transparent;
    outline: none; width: 100%; padding: 2px 0; transition: border-color 0.15s;
}
#cdInlineName:hover, #cdInlineName:focus { border-bottom-color: #B4C5E4; }
.cd-inline-sub { font-size: 11px; color: #aaa; margin-top: 2px; }
.cd-inline-close {
    background: none; border: 1.5px solid #B4C5E4; border-radius: 20px;
    cursor: pointer; font-size: 11px; font-weight: 700;
    color: #aaa; padding: 3px 10px; flex-shrink: 0; transition: all 0.15s;
}
.cd-inline-close:hover { border-color: #3C3744; color: #3C3744; }
.cd-inline-body { display: flex; flex-direction: column; gap: 10px; }
.cd-inline-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cd-inline-label {
    font-size: 12px; font-weight: 700; color: #3C3744; white-space: nowrap; min-width: 52px;
}
.cd-inline-test-btn {
    padding: 3px 10px; font-size: 11px; font-weight: 600; border-radius: 14px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #3C3744;
    transition: all 0.15s; white-space: nowrap;
}
.cd-inline-test-btn:hover { border-color: #3C3744; }
.cd-inline-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.cd-inline-save-btn {
    padding: 7px 20px; font-size: 13px; font-weight: 700; border-radius: 8px;
    cursor: pointer; border: none; background: #3C3744; color: #FBFFF1; transition: all 0.15s;
}
.cd-inline-save-btn:hover { background: #2a2730; }
/* 슬롯 + 사운드 라이브러리 2열 레이아웃 */
.cd-slot-sound-row {
    display: flex; gap: 0; align-items: stretch;
}
.cd-slot-col {
    flex: 2; min-width: 0;
}
.cd-slot-divider {
    width: 1px; background: #e8e8e8; margin: 0 20px; flex-shrink: 0;
}
.cd-sound-col {
    flex: 1; min-width: 0;
}
/* 커스텀 소리 목록 (인라인 설정 내) */
.cd-custom-sound-list { display: flex; flex-wrap: wrap; gap: 5px; }
.cd-custom-sound-opt {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 20px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #888;
    transition: all 0.15s; max-width: 160px;
}
.cd-custom-sound-opt .csound-name {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px;
}
.cd-custom-sound-opt.active { border-color: #3C3744; background: #3C3744; color: #FBFFF1; }
.cd-custom-sound-opt:not(.active):hover { border-color: #3C3744; color: #3C3744; }
/* 사운드 라이브러리 패널 */
.cd-sound-library {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start;
    min-height: 32px; overflow-y: auto; overflow-x: hidden; transition: max-height 0.3s ease;
    max-height: 76px; /* JS가 로드되기 전 기본 제한 */
}
.cd-sound-library::-webkit-scrollbar { width: 4px; }
.cd-sound-library::-webkit-scrollbar-track { background: transparent; }
.cd-sound-library::-webkit-scrollbar-thumb { background: #B4C5E4; border-radius: 4px; }
.cd-sound-library::-webkit-scrollbar-thumb:hover { background: #3C3744; }
.cd-sound-expanded { max-height: 1000px !important; }
.cd-slib-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px 5px 12px; font-size: 12px; font-weight: 600;
    border: 1.5px solid #B4C5E4; border-radius: 20px; background: white; color: #3C3744;
}
.cd-slib-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-slib-play {
    background: none; border: none; cursor: pointer; font-size: 13px;
    color: #3C3744; padding: 0; line-height: 1;
}
.cd-slib-play:hover { color: #16a34a; }
.cd-slib-del {
    background: none; border: none; cursor: pointer; font-size: 11px;
    color: #ccc; padding: 0; line-height: 1; font-weight: 700;
}
.cd-slib-del:hover { color: #e53935; }
.slot-badge {
    position: absolute; top: 3px; right: 3px;
    font-size: 9px; font-weight: 700; padding: 1px 5px;
    border-radius: 4px; line-height: 1.5; display: none; pointer-events: none;
}
.slot-badge.badge-searching { display: block; background: #B4C5E4; color: #3C3744; }
.slot-badge.badge-found     { display: block; background: #16a34a; color: #fff; }
.slot-badge.badge-waiting   { display: block; background: #f59e0b; color: #fff; }
.cd-slot-item.state-found   { border-color: #16a34a; }
.cd-slot-item.state-waiting { border-color: #f59e0b; }
.cd-slot-item.state-searching { border-color: #B4C5E4; }

/* 컨트롤 바 */
.cd-ctrl { display: flex; align-items: center; gap: 8px; }
.cd-ctrl label { white-space: nowrap; font-weight: 600; color: #3C3744; font-size: 13px; }
.cd-ctrl input[type=range] { width: 110px; accent-color: #3C3744; }
.cd-ctrl input[type=range]:disabled { opacity: 0.4; cursor: not-allowed; }
.cd-ctrl .cval { color: #3C3744; font-weight: 700; min-width: 28px; font-size: 13px; }
.cd-ctrl .cunit { color: #aaa; font-size: 13px; }
.cd-lock-btn {
    padding: 3px 9px; font-size: 11px; font-weight: 700; border-radius: 20px;
    cursor: pointer; border: 1.5px solid #3C3744; background: #3C3744; color: #FBFFF1;
    transition: all 0.15s; white-space: nowrap;
}
.cd-lock-btn.unlocked {
    background: white; color: #3C3744; border-color: #B4C5E4;
}
.cd-quad-controls { display: flex; flex-direction: column; justify-content: center; gap: 14px; }

/* 4분할 썸네일 */
.cd-quad-row { display: flex; gap: 16px; align-items: center; }
.cd-quad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 156px; flex-shrink: 0; }
.cd-quad-thumb {
    position: relative; cursor: pointer; border-radius: 6px;
    border: 2px solid #e0e0e0; overflow: hidden; transition: border-color 0.15s;
}
.cd-quad-thumb:hover { border-color: #3C3744; }
.cd-quad-thumb.active { border-color: #3C3744; }
.cd-quad-thumb canvas { display: block; width: 100%; height: auto; }
.cd-quad-thumb .quad-lbl {
    position: absolute; top: 3px; left: 5px;
    font-size: 11px; font-weight: 700; color: #fff;
    text-shadow: 0 0 4px #000, 0 0 8px #000; pointer-events: none;
}
.cd-quad-hint { font-size: 12px; color: #aaa; line-height: 1.7; }

/* 메인 레이아웃 */
.cd-main-layout { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cd-canvas-panel { flex: 1; min-width: 300px; }
.cd-canvas-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.cd-canvas-title { font-size: 13px; font-weight: 700; color: #3C3744; }

.cd-mode-toggle {
    display: inline-flex; border-radius: 8px; overflow: hidden;
    border: 1.5px solid #B4C5E4; margin-bottom: 10px;
}
.cd-mode-btn {
    padding: 6px 16px; font-size: 12px; font-weight: 600;
    background: transparent; color: #aaa; border: none; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cd-mode-btn.active { background: #3C3744; color: #FBFFF1; }

#cdMainCanvas { display: block; border-radius: 10px; max-width: 100%; border: 1px solid #e8e8e8; }
#cdMainCanvas.mode-click { cursor: crosshair; }
#cdMainCanvas.mode-drag  { cursor: crosshair; }
.cd-hint { font-size: 11px; color: #aaa; margin-top: 6px; }

/* 결과 패널 */
.cd-result-panel { flex: none; width: 248px; }
.cd-result-title { font-size: 13px; font-weight: 700; color: #3C3744; margin-bottom: 10px; }
#cdCropCanvas {
    display: block; background: #f5f5f5; border-radius: 10px;
    image-rendering: pixelated; width: 100%; aspect-ratio: 1 / 1;
    border: 1px solid #e0e0e0;
}
.cd-save-btns { display: flex; gap: 6px; margin-top: 8px; }
.cd-save-btn {
    flex: 1; padding: 7px 0; font-size: 12px; font-weight: 600;
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
    border: 1.5px solid #B4C5E4; background: white; color: #3C3744;
}
.cd-save-btn:disabled { opacity: 0.35; cursor: default; }
.cd-save-btn.primary { border-color: #3C3744; color: #3C3744; }
.cd-save-btn.primary:not(:disabled):hover { background: #3C3744; color: #FBFFF1; }
.cd-result-box {
    background: #f9f9f9; border-radius: 10px; padding: 12px;
    margin-top: 10px; font-size: 12px; line-height: 1.9;
    border: 1px solid #eee;
}
.rval  { color: #3C3744; font-weight: 700; }
.rlbl  { color: #aaa; }
.rok   { color: #16a34a; font-weight: 700; }
.rwarn { color: #e53935; font-weight: 700; }
.rnote { color: #2563eb; }

/* 타이머 설정 모달 */
.cd-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.cd-modal {
    background: #FBFFF1; border-radius: 16px; padding: 28px;
    width: 360px; max-width: calc(100vw - 32px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18); position: relative;
}
.cd-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: #aaa; line-height: 1;
}
.cd-modal-close:hover { color: #3C3744; }
.cd-modal-head {
    display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
}
.cd-modal-head canvas {
    border-radius: 8px; border: 1.5px solid #B4C5E4;
    image-rendering: pixelated; flex-shrink: 0;
}
.cd-modal-head .slot-sub   { font-size: 12px; color: #aaa; margin-top: 2px; }
#cdModalName {
    font-size: 15px; font-weight: 700; color: #3C3744;
    border: none; border-bottom: 1.5px solid transparent; background: transparent;
    outline: none; width: 100%; padding: 2px 0; transition: border-color 0.15s;
}
#cdModalName:hover, #cdModalName:focus { border-bottom-color: #B4C5E4; }
.cd-modal-section { margin-bottom: 20px; }
.cd-modal-section-title {
    font-size: 12px; font-weight: 700; color: #3C3744;
    margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #e8e8e8;
}
.cd-sound-opts {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
}
.cd-sound-opt {
    padding: 5px 14px; font-size: 12px; font-weight: 600; border-radius: 20px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #888;
    transition: all 0.15s;
}
.cd-sound-opt.active { border-color: #3C3744; background: #3C3744; color: #FBFFF1; }
.cd-sound-opt:not(.active):hover { border-color: #3C3744; color: #3C3744; }
.cd-vol-row {
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: #888;
}
.cd-vol-row label { font-weight: 600; color: #3C3744; white-space: nowrap; }
.cd-vol-row input[type=range] { flex: 1; accent-color: #3C3744; }
.cd-vol-row .vol-val { font-weight: 700; color: #3C3744; min-width: 30px; text-align: right; }
.cd-vol-row button {
    padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 14px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #3C3744;
    transition: all 0.15s; white-space: nowrap;
}
.cd-vol-row button:hover { border-color: #3C3744; }
.cd-wait-row {
    display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.cd-wait-row input[type=number] {
    width: 70px; padding: 6px 10px; border-radius: 8px; text-align: center;
    border: 1.5px solid #B4C5E4; font-size: 14px; font-weight: 700; color: #3C3744;
    background: white;
}
.cd-wait-row input[type=number]:focus { outline: none; border-color: #3C3744; }
.cd-wait-hint { font-size: 11px; color: #aaa; margin-top: 6px; line-height: 1.5; }
.cd-modal-footer {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px;
}
.cd-modal-footer button {
    padding: 9px 22px; font-size: 13px; font-weight: 700; border-radius: 10px;
    cursor: pointer; transition: all 0.15s;
}
.cd-modal-btn-cancel {
    border: 1.5px solid #B4C5E4; background: white; color: #888;
}
.cd-modal-btn-cancel:hover { border-color: #3C3744; color: #3C3744; }
.cd-modal-btn-save {
    border: none; background: #3C3744; color: #FBFFF1;
}
.cd-modal-btn-save:hover { background: #2a2730; }

/* 슬롯 타이머 활성 표시 */
.cd-slot-item.timer-on { border-color: #16a34a; }
.cd-slot-item.timer-on .slot-label { background: rgba(22,163,74,0.8); }

/* 타이머 테스트 2열 레이아웃 */
.cd-test-layout {
    display: flex; gap: 0; align-items: flex-start;
}
.cd-test-left { flex: 1; min-width: 0; }
.cd-test-divider {
    width: 1px; background: #e8e8e8; align-self: stretch; margin: 0 20px; flex-shrink: 0;
}
.cd-test-right { width: 180px; flex-shrink: 0; }
.cd-active-slots {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 332px; overflow-y: auto; overflow-x: hidden;
}
.cd-active-slots::-webkit-scrollbar { width: 4px; }
.cd-active-slots::-webkit-scrollbar-track { background: transparent; }
.cd-active-slots::-webkit-scrollbar-thumb { background: #B4C5E4; border-radius: 4px; }
.cd-active-slots::-webkit-scrollbar-thumb:hover { background: #3C3744; }
.cd-active-slot-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; border-radius: 8px; border: 1.5px solid #B4C5E4; background: white;
}
.cd-active-slot-item canvas {
    width: 32px; height: 32px; border-radius: 4px;
    image-rendering: pixelated; flex-shrink: 0;
}
.cd-active-slot-name {
    font-size: 11px; font-weight: 700; color: #3C3744;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.cd-active-slot-item.state-found     { border-color: #16a34a; background: #f0fdf4; }
.cd-active-slot-item.state-waiting   { border-color: #f59e0b; background: #fffbeb; }
.cd-active-slot-item.state-searching { border-color: #B4C5E4; }
.cd-active-slot-toggle {
    padding: 2px 8px; font-size: 11px; font-weight: 700; border-radius: 12px;
    cursor: pointer; border: 1.5px solid #B4C5E4; background: white; color: #3C3744;
    transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
}
.cd-active-slot-toggle.exclude { border-color: #e53935; color: #e53935; }
.cd-active-slot-toggle.exclude:hover { background: #fff5f5; }
/* 타이머 테스트 패널 */
.cd-test-state {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 700;
    margin-bottom: 14px;
}
.cd-test-state.idle     { background: #f3f4f6; color: #9ca3af; }
.cd-test-state.found    { background: #dcfce7; color: #16a34a; }
.cd-test-state.waiting  { background: #fef9c3; color: #b45309; }
.cd-test-state.searching{ background: #dbeafe; color: #2563eb; }
.cd-test-dot {
    width: 8px; height: 8px; border-radius: 50%; background: currentColor;
}
.cd-test-state.found .cd-test-dot    { animation: cdBlink 0.8s infinite; }
.cd-test-state.waiting .cd-test-dot  { animation: cdBlink 1.2s infinite; }
.cd-test-log {
    background: #f9f9f9; border: 1px solid #eee; border-radius: 10px;
    padding: 10px 12px; max-height: 180px; overflow-y: auto;
    font-size: 12px; line-height: 1.8; font-family: monospace;
}
.cd-test-log .log-found    { color: #16a34a; }
.cd-test-log .log-wait     { color: #b45309; }
.cd-test-log .log-search   { color: #2563eb; }
.cd-test-log .log-sound    { color: #7c3aed; }
.cd-test-log .log-info     { color: #9ca3af; }
#cdAutoBtn {
    padding: 9px 20px; font-size: 13px; font-weight: 700; border-radius: 10px;
    cursor: pointer; border: none; background: #3C3744; color: #FBFFF1; transition: all 0.2s;
}
#cdAutoBtn:hover:not(:disabled) { background: #2a2730; }
#cdAutoBtn:disabled { background: #ccc; color: #fff; cursor: not-allowed; }
#cdMatchInterval::-webkit-inner-spin-button,
#cdMatchInterval::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#cdMatchInterval { -moz-appearance: textfield; }
#cdMatchInterval:disabled { background: #f3f4f6; color: #aaa; cursor: not-allowed; }
#cdMatchThreshold:disabled { opacity: 0.4; cursor: not-allowed; }
.cd-test-slot-select {
    padding: 6px 12px; border-radius: 8px; border: 1.5px solid #B4C5E4;
    font-size: 13px; color: #3C3744; background: white; cursor: pointer; margin-bottom: 14px;
}

@media (max-width: 700px) {
    .cd-main-layout { flex-direction: column; }
    .cd-result-panel { width: 100%; }
    #cdCropCanvas { width: 100%; height: auto; }
}
