/* One switch geometry and palette, shared by native and farming controls. */
:root{--tata-switch-on:#99c761;--tata-switch-on-border:#7ca64f;--tata-switch-off:#e7dfef;--tata-switch-off-border:#c7b9d8}
body .glass-switch[role="switch"]{
 box-sizing:border-box;position:relative;flex:0 0 44px;width:44px;min-width:44px;height:26px;
 padding:0;margin-block:0;border:1px solid var(--tata-switch-off-border);border-radius:999px;
 background:var(--tata-switch-off);box-shadow:inset 0 1px 2px #69547d12;
 vertical-align:middle;transition:background-color .15s,border-color .15s;
}
body .glass-switch[role="switch"][aria-checked="true"]{background:var(--tata-switch-on);border-color:var(--tata-switch-on-border)}
body .glass-switch[role="switch"][aria-checked="false"]{background:var(--tata-switch-off);border-color:var(--tata-switch-off-border)}
body .glass-switch[role="switch"] .knob,
body .glass-switch[role="switch"].press .knob{
 box-sizing:border-box;position:absolute;left:2px;top:2px;width:20px;height:20px;margin:0;
 border:1px solid #c3b7d2;border-radius:50%;background:#fffefa;box-shadow:0 1px 2px #69547d35;
 transform:translateX(0);transition:transform .15s ease-out;backdrop-filter:none;-webkit-backdrop-filter:none;
}
body .glass-switch[role="switch"][aria-checked="true"] .knob{left:2px;transform:translateX(18px);border-color:var(--tata-switch-on-border)}
body .glass-switch[role="switch"][aria-checked="false"] .knob{left:2px;transform:translateX(0)}
body .glass-switch[role="switch"] .knob:after{display:none}
body .glass-switch[role="switch"]:disabled{opacity:.5;cursor:not-allowed}
body .el-switch{--el-switch-on-color:var(--tata-switch-on);--el-switch-off-color:var(--tata-switch-off)}

/* Leave a fixed column for the control, even with long names and browser zoom. */
body .m-card,body .task-row,body .m-row{box-sizing:border-box;min-width:0;max-width:100%}
body .m-head,body .task-name-cell{min-width:0;max-width:100%;gap:10px}
body .m-head>.m-name,body .task-name-cell>.task-label{flex:1 1 auto;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
body .m-head>.glass-switch[role="switch"],body .task-name-cell>.glass-switch[role="switch"]{margin-left:auto;align-self:center}
body .m-head>.el-tag{flex:0 0 auto}
body :is(.m-card,.task-row):has([data-farming-master]) [role="switch"][aria-label^="启用任务"]{display:none!important}
body .m-pills,body .task-pills{min-width:0;max-width:100%;row-gap:8px}
body .m-pills>.pill,body .task-pills>.pill{box-sizing:border-box;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4!important;height:auto!important;min-height:30px;text-align:center}
body .m-summary,body .task-status,body #camp-run-summary p{overflow-wrap:anywhere}
@media(max-width:760px){
 body .m-head,body .task-name-cell{gap:8px}
 body .task-row .task-name-cell{width:100%}
}
@media(prefers-reduced-motion:reduce){body .glass-switch[role="switch"],body .glass-switch[role="switch"] .knob{transition:none}}

/* A single server option occupies the whole selector, including its highlight. */
body .region-switch[aria-label="服务器类型"]:has(>button:only-of-type)>.region-thumb{
 width:calc(100% - 8px);transform:none!important;transition:none;
}
