.dd-switch-card{border:1px solid #dfe7f1;border-radius:7px;overflow:hidden;background:#fff}
.dd-switch-card.selected{border-color:#347dff}
.dd-switch-card>.dd-device{border:0;border-radius:0;background:#f1f6ff;padding:12px}
.dd-switch-card .dd-device-tags small{display:none}
.dd-switch-panel{padding:10px 10px 12px}
.dd-channel-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.dd-channel-card{position:relative;min-width:0;border:1px solid #dce5f2;border-radius:6px;background:#fff;overflow:hidden}
.dd-channel-card.selected{border-color:#347dff;background:#f5f9ff}
.dd-channel-target{display:flex;flex-direction:column;align-items:stretch;gap:7px;width:100%;min-height:104px;padding:9px 8px 8px;border:0;background:transparent;color:#172642;font:inherit;font-size:12px;cursor:pointer;position:relative}
.dd-channel-name{font-size:16px;line-height:1.2;text-align:center}
.dd-channel-value{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:54px;padding:6px 3px;border:1px solid #dce8f9;border-radius:5px;background:#f7faff}
.dd-channel-value .dm-icon svg{width:24px;height:26px}
.dd-channel-label{line-height:1.4;font-size:12px}
.dd-channel-placeholder{color:#8191aa;font-size:11px}
.dd-channel-plus{display:grid;place-items:center;width:23px;height:23px;border:1px solid #cdd9eb;border-radius:50%;color:#8b9cb5;font-size:21px;line-height:1}
.dd-channel-card.is-empty .dd-channel-value{border-style:dashed;background:#fcfdff}
.dd-channel-clear{position:absolute;right:8px;top:34px;display:grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid #d2deee;border-radius:50%;background:#fff;color:#748ba9;font:inherit;font-size:18px;line-height:1;cursor:pointer}
.dd-channel-clear:hover{background:#eaf2ff;color:#246aff}
.dd-channel-target:disabled,.dd-channel-clear:disabled{cursor:wait}
.dd-channel-target.dd-drag-over{outline:2px dashed #2876ff;outline-offset:-3px;background:#eaf4ff}
.dd-channel-target.dd-drag-over .dd-channel-value{opacity:.45}
.dd-channel-target.dd-drag-over:after{content:'松开完成分配';position:absolute;bottom:15px;left:3px;right:3px;text-align:center;color:#2876ff;font-size:12px;background:#eaf4ff}
.dd-switch-mode .dd-list{max-height:none;overflow:visible}
.dd-switch-mode .dd-assignment{border-top:0;margin-top:4px}
.dd-switch-purposes{padding-top:5px}
.dd-body .dd-switch-purposes h3{margin:12px 0 4px;font-size:14px}
.dd-switch-drag-hint{margin:0 0 9px;color:#8191aa;font-size:11px;line-height:1.6}
.dd-switch-mode .dd-kind-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.dd-switch-mode .dd-kind-grid button{padding:5px 2px 7px;font-size:11px;gap:5px;min-height:70px;cursor:grab;user-select:none}
.dd-switch-mode .dd-kind-grid .dm-icon svg{width:23px;height:25px}
.dd-switch-mode .dd-kind-grid button:active{cursor:grabbing}
.dd-switch-mode .dd-kind-grid button.dd-dragging{opacity:.45}
.dd-switch-mode .dd-kind-grid button:disabled{cursor:wait}
.dd-purpose-grip{font-size:12px;line-height:1;color:#9faec5;letter-spacing:1px}
.dd-switch-mode .dd-kind-grid button.selected:after,.dd-switch-mode .dd-room-grid button.selected:after{display:none}
.dd-purpose-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.dd-purpose-heading h3{white-space:nowrap}
.dd-switch-mode .dd-room-grid button{padding:8px 3px;min-height:62px}
@media(min-width:1800px){
  .dd-switch-mode{width:620px}.dd-open:has(.dd-switch-mode) .wb-main{margin-right:620px}
  .dd-switch-mode .dd-switch-card>.dd-device{padding:13px 14px}
  .dd-switch-mode .dd-device-copy strong{font-size:14px}.dd-switch-mode .dd-device-copy>span{font-size:12px}
  .dd-switch-panel{padding:11px 12px 13px}.dd-channel-choices{gap:10px}
  .dd-channel-target{min-height:112px}.dd-channel-name{font-size:17px}.dd-channel-value{min-height:59px}
  .dd-switch-mode .dd-room-grid button{min-height:68px;font-size:12px}
  .dd-switch-mode .dd-kind-grid button{min-height:74px;font-size:11px}
}
@media(max-width:430px){
  .dd-switch-mode .dd-body{padding-left:16px;padding-right:16px}.dd-switch-panel{padding:9px 8px 11px}
  .dd-channel-choices{gap:7px}.dd-channel-target{padding:9px 5px 6px;gap:7px;min-height:106px}
  .dd-channel-name{font-size:16px}.dd-channel-value{padding:6px 2px;min-height:55px;gap:5px}
  .dd-channel-label{font-size:12px}.dd-channel-placeholder{font-size:10px}.dd-channel-value .dm-icon svg{width:23px;height:25px}
  .dd-channel-clear{top:34px;right:5px}
  .dd-switch-mode .dd-kind-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

.dd-drawer {width:min(610px,100vw)}
.dd-drawer::backdrop {background:#14253b52}
.dd-header {align-items:center;padding:17px 23px;border-bottom:1px solid #dde5ef}
.dd-header h2 {margin:0}
.dd-body {padding:5px 23px 20px;overscroll-behavior:contain}
.dd-body:focus-visible {outline:2px solid #99baff;outline-offset:-2px}
.dd-drawer .dd-message {margin:6px 0}
.dd-filters {gap:2px;padding:3px;background:#f1f4f8}
.dd-filters button {padding:5px 9px;background:transparent;border-radius:4px}
.dd-filters button.selected {color:#175bdb;background:white;font-weight:650;box-shadow:0 1px 4px #1c34561a}
.dd-list-heading {display:flex;align-items:center;justify-content:space-between;margin:14px 0 8px}
.dd-list-heading h3 {margin:0;font-size:15px}
.dd-selection-count {font-size:12px;color:#65758c}
.dd-drawer .dd-list {gap:0;margin:0;max-height:none;overflow:visible;border:1px solid #d9e3ef;border-radius:7px}
.dd-list .dd-device,.dd-list .dd-switch-card {border:0;border-radius:0}
.dd-list>.dd-device,.dd-list>.dd-switch-card {border-bottom:1px solid #e2eaf3}
.dd-list>:last-child {border-bottom:0}
.dd-list .dd-device {min-height:42px;padding:5px 10px;gap:9px}
.dd-list .dd-switch-card>.dd-device {background:white}
.dd-list .dd-device.selected {background:#edf4ff;box-shadow:inset 3px 0 #2c70f3}
.dd-list .dd-device:focus-visible {outline-offset:-2px}
.dd-list .dd-device>.dm-icon {padding:3px}
.dd-list .dd-device>.dm-icon svg {width:18px;height:18px}
.dd-device-copy {gap:0}
.dd-device-tags {gap:1px}
.dd-device-tags .dd-badge {padding:0 5px}
.dd-switch-card .dd-device-tags small {display:block}
.dd-target-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dd-select-field {display:grid;gap:5px;min-width:0;font-size:12px;color:#526783}
.dd-select-field select {width:100%;box-sizing:border-box;min-height:37px;padding:5px 8px;font:inherit;background:#fff;color:#233b58;border:1px solid #cfdded;border-radius:5px}
.dd-select-field select:focus-visible {outline:2px solid #91b6ff}
.dd-details>.dd-connection {margin:9px 0 0;padding:0;border:0}
.dd-drawer>.dd-actions {align-items:center;gap:9px;padding:12px 23px max(14px,env(safe-area-inset-bottom))}
.dd-drawer>.dd-actions .wb-button {flex:none;min-height:36px}
.dd-assignment-summary {flex:1;min-width:0;display:grid;gap:2px;overflow-wrap:anywhere}
.dd-assignment-summary span {font-size:11px;color:#72839b}
.dd-assignment-summary strong {font-size:13px;color:#294665}
@media(min-width:1650px) { .dd-open .wb-main,.dd-open:has(.dd-switch-mode) .wb-main {margin-right:610px} }
@media(max-width:600px) {
  .dd-header,.dd-drawer>.dd-actions {padding-inline:14px}
  .dd-body {padding-inline:14px}
  .dd-device-copy {min-width:0}
  .dd-actions .wb-button {padding:6px 10px}
  .dd-assignment-summary span {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
}
