#ck-control-hotbar{--ch-columns:auto-fill;--ch-rows:1;box-sizing:border-box;flex:none;display:flex;align-items:stretch;gap:8px;padding:6px 12px;background:var(--ui-chrome,#142731);color:var(--ui-text,#edf3f6);border-bottom:1px solid var(--ui-border,#34545f);font:13px/1.25 system-ui;min-width:0;max-height:35vh}
#ck-control-hotbar[hidden]{display:none!important}
#ck-control-hotbar header{display:flex;align-items:center;gap:6px;flex:none}#ck-control-hotbar header>div{display:flex}#ck-control-hotbar .ch-grip{font-size:11px;font-weight:650;color:var(--ui-muted,#a9bfc9)}
#ck-control-hotbar button,.ch-dialog button{box-sizing:border-box;font:600 13px/1.25 system-ui;cursor:pointer;background:var(--ui-raised,#203a48);color:var(--ui-accent,#8cdde1);border:1px solid var(--ui-border,#34545f);border-radius:9px;box-shadow:none;letter-spacing:normal;text-transform:none}
#ck-control-hotbar .ch-config,#ck-control-hotbar .ch-hide{width:36px;min-height:40px;padding:4px;font-size:18px;background:transparent;border-color:transparent}
#ck-control-hotbar .ch-grid{display:grid;grid-template-columns:repeat(var(--ch-columns),minmax(min(100%,100px),1fr));grid-auto-rows:44px;gap:6px;min-width:0;flex:1;overflow:auto;max-height:min(calc(35dvh - 12px),calc(var(--ch-rows)*50px - 6px));min-height:0;scrollbar-width:thin;overscroll-behavior:contain}
#ck-control-hotbar .ch-switch{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;padding:5px 10px;text-align:left;min-width:0;min-height:44px;position:relative;border-left:3px solid var(--ui-muted,#9aadb8)}
#ck-control-hotbar .ch-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ui-text,#edf3f6)}#ck-control-hotbar .ch-state{font:10px/1.2 system-ui;color:var(--ui-muted,#a9bfc9)}
#ck-control-hotbar .ch-switch[data-state=on]{border-left-color:var(--ui-good,#83d5a0);background:color-mix(in srgb,var(--ui-good,#83d5a0) 12%,var(--ui-raised,#203a48))}#ck-control-hotbar .ch-switch[data-state=on] .ch-state{color:var(--ui-good,#83d5a0)}
#ck-control-hotbar .ch-switch[data-state=mixed]{border-left-color:#e2bb73}#ck-control-hotbar .ch-switch[data-state=mixed] .ch-state{color:#e2bb73}#ck-control-hotbar .ch-switch[data-state=needs-setup]{border-left-color:var(--ui-danger,#e9978d)}
#ck-control-hotbar button:disabled,.ch-dialog button:disabled{opacity:.5;cursor:default}#ck-control-hotbar button:focus-visible,.ch-dialog :is(button,input,select,summary):focus-visible{outline:2px solid var(--ui-accent,#8cdde1);outline-offset:2px}
#ck-control-hotbar.floating{position:fixed;z-index:240;display:flex;flex-direction:column;border:1px solid var(--ui-border,#34545f);border-radius:12px;padding:6px 8px 12px;box-shadow:0 8px 28px #0006;overflow:hidden;resize:both;min-width:220px;min-height:112px;max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px)}
#ck-control-hotbar.floating header{justify-content:space-between;height:30px;flex:none}#ck-control-hotbar.floating .ch-grip{flex:1;cursor:grab;touch-action:none;padding:7px 6px}#ck-control-hotbar.floating .ch-grip:active{cursor:grabbing}#ck-control-hotbar.floating .ch-grid{max-height:none;align-content:start}
#ck-control-hotbar .ch-empty{grid-column:1/-1;min-height:44px;padding:7px 12px;border-style:dashed}
.ch-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-border,#34545f);border-radius:16px;background:var(--ui-chrome,#142731);color:var(--ui-text,#edf3f6);font:14px/1.5 system-ui;overflow:auto}
.ch-dialog::backdrop{background:#04111999}.ch-dialog[open]{display:flex;flex-direction:column}.ch-dialog header,.ch-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;padding:14px 18px;background:var(--ui-chrome,#142731)}.ch-dialog header{border-bottom:1px solid var(--ui-border,#34545f)}.ch-dialog footer{border-top:1px solid var(--ui-border,#34545f);justify-content:flex-end;flex-wrap:wrap}.ch-dialog h2{font-size:21px;line-height:1.2;margin:0}.ch-dialog button{min-height:40px;padding:8px 12px}.ch-dialog .ch-body{padding:16px 18px;overflow:auto;min-height:0}.ch-dialog p{margin:0 0 12px}.ch-dialog .ch-intro{color:var(--ui-muted,#a9bfc9)}
.ch-dialog .ch-enable{display:flex;gap:10px;align-items:center;font-weight:650;background:var(--ui-raised,#203a48);border-radius:10px;padding:12px;margin-bottom:14px}.ch-dialog input[type=checkbox]{width:19px;height:19px;flex:none;accent-color:var(--ui-accent,#8cdde1)}
.ch-dialog .ch-layout{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:10px}.ch-dialog .ch-field{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;margin-bottom:12px}
.ch-dialog :is(input[type=text],input[type=search],select){box-sizing:border-box;width:100%;min-width:0;min-height:42px;padding:9px;border:1px solid var(--ui-border,#34545f);border-radius:8px;background:var(--ui-deep,#0b1824);color:var(--ui-text,#edf3f6);font:14px system-ui}.ch-dialog .ch-hint{font-size:12px;color:var(--ui-muted,#a9bfc9)}.ch-dialog summary{padding:8px 0;cursor:pointer;font-weight:600;font-size:13px}.ch-dialog .ch-error,#ck-control-hotbar .ch-error{color:var(--ui-danger,#ffb4a7);font-size:12px;grid-column:1/-1}.ch-dialog .ch-error:empty{display:none}
.ch-dialog .ch-list{display:flex;flex-direction:column;gap:8px;margin-top:14px}.ch-dialog .ch-edit-row{display:flex;gap:6px;align-items:center}.ch-dialog .ch-edit-row>button:first-child{flex:1;min-width:0;text-align:left}.ch-dialog .ch-edit-row strong,.ch-dialog .ch-edit-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-dialog small{font-size:11px;color:var(--ui-muted,#a9bfc9);font-weight:400}.ch-dialog .ch-primary{background:var(--ui-accent,#8cdde1)!important;color:var(--ui-deep,#0b1824)!important;border-color:transparent!important}.ch-dialog .ch-delete{margin-right:auto;color:var(--ui-danger,#ffb4a7)!important}
.ch-dialog .ch-choices{max-height:320px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--ui-border,#34545f);border-radius:10px}.ch-dialog .ch-choice{display:flex;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--ui-border,#34545f)}.ch-dialog .ch-choice:last-child{border:0}.ch-dialog .ch-choice>span{min-width:0;overflow-wrap:anywhere}.ch-dialog .ch-choice strong,.ch-dialog .ch-choice small{display:block}.ch-dialog .ch-choice:has(input:checked){background:var(--ui-raised,#203a48)}
@media(max-width:700px){#ck-control-hotbar{padding:5px 8px;gap:4px}#ck-control-hotbar:not(.floating) .ch-grip,#ck-control-hotbar:not(.floating) .ch-hide{display:none}#ck-control-hotbar:not(.floating) .ch-config{width:32px}#ck-control-hotbar[data-rows="1"] .ch-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(96px,1fr)}#ck-control-hotbar.floating{resize:none}.ch-dialog .ch-layout{grid-template-columns:1fr 1fr}.ch-dialog .ch-layout>label:first-child{grid-column:1/-1}.ch-dialog header,.ch-dialog footer{padding:12px}.ch-dialog .ch-body{padding:14px}.ch-dialog button{min-height:44px}.ch-dialog .ch-choices{max-height:38dvh}}
/* The client hides the website header/footer globally; retain these dialog controls. */
body.beta-client .ch-dialog>header,body.beta-client .ch-dialog>footer,body.beta-client #ck-control-hotbar>header{display:flex!important;position:static;width:auto}

body.beta-client .ch-dialog>header,body.beta-client .ch-dialog>footer,body.beta-client #ck-control-hotbar>header{height:auto;min-height:0;margin:0;border-image:none;text-align:left;box-shadow:none;overflow:visible}body.beta-client .ch-dialog>header::after,body.beta-client #ck-control-hotbar>header::after{display:none!important}
#ck-control-hotbar.floating .ch-grip::before{content:"⠿ ";opacity:.65}
