.bd-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-width:0}
.bd-title-row>h1,.bd-title-row>h2{min-width:0;overflow-wrap:anywhere}
.bd-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0;max-width:100%}
.bd-name-entry{font-size:12px;color:#475569;line-height:1.4;cursor:pointer;max-width:100%;text-align:left;overflow-wrap:anywhere;border:0;background:none;padding:6px 0}
.bd-name-entry:disabled{cursor:default;opacity:1}
.bd-rule{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px;flex-shrink:0;min-height:30px;background:none;border:0;padding:3px 0;color:#64748b;font-size:11px;line-height:1.4;white-space:nowrap;cursor:pointer}
.bd-rule:disabled{cursor:default;opacity:.75}
.bd-rule i{display:block;position:relative;width:28px;height:16px;flex-shrink:0;border-radius:12px;background:#94a3b8;transition:background .15s}
.bd-rule i:after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:white;transition:transform .15s}
.bd-rule[aria-checked=true] i{background:#0284c7}.bd-rule[aria-checked=true] i:after{transform:translateX(12px)}
.bd-rule[aria-busy=true] i{opacity:.5}.bd-name-entry:focus-visible,.bd-rule:focus-visible{outline:2px solid #0284c7;outline-offset:3px;border-radius:4px}
.bd-field-title{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:32px;margin-bottom:6px;min-width:0}
.bd-field-title>label{margin:0!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4}
.mw-dimension-party-row .bd-field-title{min-height:32px}
.mw-dimension-role>label{display:flex;align-items:center;min-height:32px!important;margin-bottom:6px!important;line-height:1.4}
.bd-dialog{position:fixed;inset:0;margin:auto;border:1px solid #cbd5e1;border-radius:16px;padding:22px;max-width:calc(100vw - 28px);width:420px;background:#fff;color:#0f172a;box-shadow:0 25px 80px #0f172a40;max-height:90dvh;overflow:auto}
.bd-dialog,.bd-dialog *{box-sizing:border-box}.bd-dialog::backdrop{background:#0f172a80}.bd-dialog h2{font-size:18px;font-weight:600;margin:0 0 16px}.bd-dialog label{display:block;font-size:13px;margin:16px 0 6px}
.bd-dialog input,.bd-dialog select{display:block;width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:9px;font-size:14px;background:#fff;color:#0f172a}
.bd-dialog p{font-size:12px;line-height:1.7;color:#64748b;margin-top:10px}.bd-dialog .bd-error{color:#b91c1c;white-space:pre-wrap;overflow-wrap:anywhere;min-height:20px}
.bd-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.bd-dialog footer button{border:1px solid #cbd5e1;border-radius:8px;font-size:13px;padding:8px 14px;background:#fff}.bd-dialog button[type=submit]{background:#0284c7;color:#fff;border-color:#0284c7}.bd-dialog button:disabled{opacity:.6;cursor:wait}
.bd-notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:10000;background:#0f172a;color:white;padding:10px 16px;border-radius:10px;max-width:calc(100vw - 28px);font-size:13px;overflow-wrap:anywhere;box-shadow:0 8px 30px #0f172a30}
html[data-theme=dark] .bd-name-entry,html[data-theme=dark] .bd-rule{color:#cbd5e1}html[data-theme=dark] .bd-dialog{background:#0f172a;color:#f8fafc}html[data-theme=dark] .bd-dialog input{background:#1e293b;color:#f8fafc}
@media(max-width:420px){.bd-controls{gap:6px;justify-content:flex-start}.bd-field-title{gap:4px}.bd-field-title .bd-rule{font-size:10px;gap:4px}.mw-dimension-party-row{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)!important}.bd-field-title>label{font-size:11px!important}.bd-rule i{width:26px}.bd-rule[aria-checked=true] i:after{transform:translateX(10px)}}
