#modal:has(.dy-account-form):not(.time-editing){width:calc(100vw - 40px);max-width:1180px;max-height:94vh}
#modal:has(.dy-account-form) .modal-head{padding:17px 22px}
#modal:has(.dy-account-form) #modal-body{padding:0}
#account-form.dy-account-form{margin:0;min-width:0}
#account-form.dy-account-form .account-form-content{padding:0;min-width:0}
.dy-account-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 22px;border-bottom:1px solid var(--border)}
.dy-account-identity{display:flex;align-items:center;gap:10px;min-width:0}
.dy-account-identity .account-avatar{width:38px;height:38px;flex-shrink:0}
.dy-account-identity h3{font-size:14px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}
.dy-account-identity p{color:var(--muted);font-size:11px;margin-top:3px;display:flex;align-items:center;gap:9px}
.dy-account-identity p span{font-size:10px;color:var(--green)}
.dy-account-controls{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex-wrap:wrap}
.dy-account-controls label{display:inline-flex;align-items:center;gap:7px;margin:0;font-size:12px;white-space:nowrap}
.dy-account-controls .text-button{font-size:12px;white-space:nowrap}
.dy-account-controls .dy-control-button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:8px 11px;white-space:nowrap;font-size:12px;border-color:var(--border);color:var(--blue);background:var(--blue-soft);border-radius:8px}
.dy-account-controls .dy-control-button .icon{width:14px;height:14px}
.dy-feature-toggle input{width:14px;height:14px;margin:0;accent-color:var(--blue)}
.dy-account-form .dy-config-fields{padding:0}
.dy-tasks{display:grid;grid-template-columns:162px minmax(0,1fr);border:0;border-radius:0;overflow:visible}
.dy-task-sidebar{min-width:0;background:var(--surface-soft);border-right:1px solid var(--border);padding:16px 10px;display:flex;flex-direction:column;gap:12px}
.dy-tasks-heading{padding:0 8px;display:block}
.dy-tasks-heading h3{font-size:12px;margin:0;color:var(--muted);font-weight:500;display:flex;align-items:center;justify-content:space-between}
#dy-task-total{font-size:10px;background:var(--surface);border:1px solid var(--border);border-radius:5px;min-width:20px;text-align:center;padding:1px 4px}
.dy-task-tabs{flex-direction:column;gap:6px;padding:0;max-height:440px;border:0;overflow:auto}
.dy-task-tabs button{position:relative;width:100%;gap:9px;padding:11px 10px;text-align:left;border:1px solid transparent;background:transparent;border-radius:9px}
.dy-task-tabs button[aria-selected=true]{background:var(--surface);border-color:var(--border);box-shadow:0 2px 7px #172b4d06}
.dy-task-tabs button[aria-selected=true]:before{content:'';position:absolute;left:-1px;top:13px;bottom:13px;width:3px;background:var(--blue);border-radius:2px}
.dy-task-dot{width:5px;height:5px;flex-shrink:0;align-self:flex-start;margin-top:7px}
.dy-task-tab-copy{display:grid;gap:5px;min-width:0;max-width:none!important}
.dy-task-tab-copy strong{font-size:12px;font-weight:550;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dy-task-tab-copy small{font-size:10px;color:var(--muted);line-height:1.4;white-space:nowrap}
#dy-task-add{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:2px;padding:9px 8px;font-size:11px;background:var(--surface)}
#dy-task-add .icon{width:13px;height:13px}
.dy-task-workspace{min-width:0}
.dy-task-actions{padding:15px 20px 0;min-height:32px}
.dy-task-actions>div{gap:8px;align-items:center}
.dy-task-actions .fine{font-size:11px}
.dy-task-actions button{font-size:11px}
.dy-task-actions .dy-task-run,.dy-task-actions .dy-task-delete{min-height:33px;padding:8px 11px;border:1px solid transparent;border-radius:7px;gap:5px;font-weight:550}
.dy-task-actions .dy-task-run{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 2px 5px #2563eb16}
.dy-task-actions .dy-task-delete{background:var(--red-soft);color:var(--red);border-color:color-mix(in srgb,var(--red) 22%,var(--border))}
.dy-task-actions .dy-task-run:disabled,.dy-task-actions .dy-task-delete:disabled{opacity:1;color:var(--muted);background:var(--surface-soft);border-color:var(--border);box-shadow:none;cursor:not-allowed}
.dy-task-actions button .icon{width:13px;height:13px}
#dy-task-panel{padding:14px 20px 20px;container-type:inline-size}
.dy-task-meta{grid-template-columns:minmax(0,1fr) minmax(170px,.72fr) auto;gap:14px;align-items:end;margin:0 0 16px}
.dy-task-meta label{font-size:11px;color:var(--muted)}
.dy-task-meta input:not(.switch){margin:6px 0 0;padding:10px 11px;font-size:12px;min-height:38px}
.dy-task-meta .time-field{min-width:0;margin:0}
.dy-task-meta .time-field-label{font-size:11px;color:var(--muted)}
.dy-task-meta .time-trigger{margin-top:6px;padding:9px 10px;min-height:38px}
.dy-task-meta .time-field-status:empty{display:none}
.dy-task-enabled{grid-column:auto;align-self:end;margin:0 0 10px!important;white-space:nowrap;color:var(--text)!important}
.dy-plan-fields{margin:0!important;padding:0!important;min-width:0}
.dy-editor-columns{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);gap:16px;align-items:stretch;min-width:0}
.dy-editor-columns>section{min-width:0}
.dy-friends-panel{padding:14px;border-radius:11px;grid-column:auto;display:flex;flex-direction:column}
.dy-panel-head{margin-bottom:12px;gap:8px;align-items:center}
.dy-panel-head strong{font-size:12px}
.dy-panel-title{display:flex;align-items:center;gap:8px;min-width:0}
.dy-count-badge{display:inline-flex;align-items:center;font-size:10px;white-space:nowrap;color:var(--blue);background:var(--blue-soft);padding:3px 6px;border-radius:5px}
.dy-friends-panel #dy-sync{min-width:92px;padding:7px 9px;font-size:10px;border-radius:7px;min-height:31px;gap:5px}
.dy-friend-toolbar{display:flex;align-items:center;gap:8px}
.dy-friend-toolbar #dy-friend-search{flex:1;min-width:0;margin:0;padding:9px 10px;font-size:11px;border-radius:7px;min-height:35px}
.dy-selection-filter{flex-shrink:0;padding:8px 9px;min-height:34px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--muted);font-size:10px;cursor:pointer;white-space:nowrap}
.dy-selection-filter[aria-pressed=true]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue)}
#dy-friend-state{margin:9px 0 11px;font-size:10px;line-height:1.6;color:var(--muted)}
.dy-friend-list{gap:8px;max-height:366px;min-height:110px;align-content:start;flex:1}
.dy-friend{padding:11px 9px 7px;border-radius:8px}
.dy-friend-select{grid-template-columns:29px minmax(0,1fr);gap:7px;padding-right:13px}
.dy-friend-avatar{width:29px;height:29px}
.dy-friend-checkbox{top:9px;right:8px;width:13px!important;height:13px!important;min-width:13px}
.dy-friend-name{font-size:11px;line-height:17px}
.dy-friend-uid{font-size:9px;line-height:13px;margin-top:2px}
.dy-friend-footer{margin-top:8px;gap:4px;min-height:22px}
.dy-spark-badge{font-size:9px;line-height:14px;padding:2px 5px}
.dy-check-target{font-size:10px;padding:2px;min-height:22px}
.dy-friend-list:has(>.dy-friends-empty){align-content:stretch}
.dy-friends-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:170px;padding:24px 12px;text-align:center}
.dy-friends-empty>strong{font-size:12px;font-weight:550;color:var(--text)}
.dy-friends-empty>p{margin:0;font-size:11px;line-height:1.7;color:var(--muted)}
.dy-friends-empty>.primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;margin-top:5px;padding:8px 13px;min-height:34px;border-radius:8px;font-size:11px}
.dy-friends-empty>.primary>.icon{width:14px;height:14px}
.dy-friends-empty>.primary[aria-busy=true]{cursor:progress}
@container(min-width:340px){.dy-friend-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container(min-width:560px){.dy-friend-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
.dy-message-panel{padding:14px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}
.dy-section-caption{font-size:10px;color:var(--muted);white-space:nowrap}
.dy-message-panel label{font-size:11px;line-height:1.6;margin:0;color:var(--muted)}
.dy-message-options{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:12px;margin-bottom:13px;align-items:end}
.dy-message-options label{min-width:0}
.dy-message-options select{margin:6px 0 0;min-width:0;font-size:11px;padding:9px;min-height:36px}
.dy-message-options .select-trigger{margin-top:6px;padding:9px 10px;height:38px;min-height:38px;font-size:11px;border-radius:8px;gap:8px}
.dy-input-unit{position:relative;display:block;margin-top:6px}
.dy-input-unit input{padding:9px 30px 9px 10px!important;font-size:11px!important;margin:0!important;height:38px;min-height:38px}
.dy-input-unit>span{position:absolute;right:22px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none}
.dy-message-panel textarea{display:block;width:100%;margin:6px 0 0;resize:vertical;min-height:86px;font:inherit;line-height:1.8;padding:10px 11px;border:1px solid var(--border);border-radius:8px;color:var(--text);background:var(--surface)}
.dy-message-tools{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:7px 0 13px;flex-wrap:wrap}
.dy-message-tools>small{font-size:10px;color:var(--muted)}
.dy-message-tools .dy-message-tokens{margin:0;gap:4px}
.dy-message-tools .dy-message-tokens button{font-size:10px;padding:3px 6px;gap:3px}
.dy-message-panel #dy-ai-prompt{display:block;margin-top:8px}
.dy-message-panel #dy-ai-prompt textarea{min-height:70px}
.dy-preview{margin-top:13px}
.dy-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dy-preview-toolbar #dy-preview{font-size:11px;padding:8px 10px;min-height:32px}
.dy-preview-toolbar #dy-preview-quota{font-size:10px;line-height:1.6;margin:0;max-width:160px;color:var(--muted)}
.dy-preview #dy-preview-result{font-size:12px;line-height:1.8;padding:10px 11px;margin-top:10px;background:var(--blue-soft);border-radius:7px}
.dy-preview #dy-preview-result:empty{display:none}
.dy-message-note{font-size:10px!important;line-height:1.8!important;color:var(--muted);margin-top:13px}
.dy-account-form #form-error:empty{display:none}
.dy-account-form #form-error:not(:empty){margin:0 20px 15px}
#account-form.dy-account-form>.form-actions{position:sticky;bottom:0;z-index:2;padding:13px 22px;align-items:center;border-top:1px solid var(--border);background:var(--surface)}
.dy-save-hint{margin-right:auto;font-size:11px;color:var(--muted)}
.dy-account-form>.form-actions button{min-height:36px;font-size:12px}
@container(max-width:700px){.dy-editor-columns{grid-template-columns:1fr}.dy-friend-list{max-height:245px}.dy-task-meta{grid-template-columns:minmax(0,1fr) minmax(160px,1fr)}.dy-task-enabled{grid-column:1/-1;margin:0!important}}
@media(max-width:720px){
 #modal:has(.dy-account-form):not(.time-editing){width:calc(100vw - 20px);max-height:96vh}
 #modal:has(.dy-account-form) .modal-head{padding:14px 16px}
 .dy-account-toolbar{align-items:flex-start;padding:13px 15px;gap:12px;flex-direction:column}
 .dy-account-controls{width:100%;justify-content:space-between;gap:10px}
 .dy-account-controls label,.dy-account-controls .text-button,.dy-account-controls .dy-control-button{font-size:11px}
 .dy-tasks{grid-template-columns:1fr}
 .dy-task-sidebar{border:0;border-bottom:1px solid var(--border);padding:12px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
 .dy-tasks-heading{grid-column:1/-1;padding:0}
 .dy-tasks-heading h3{justify-content:flex-start;gap:8px}
 .dy-task-tabs{grid-column:1;flex-direction:row;max-height:none;overflow-x:auto;align-items:stretch}
 .dy-task-tabs button{width:auto;min-width:128px;max-width:190px;padding:9px 10px;background:var(--surface)}
 #dy-task-add{grid-column:2;align-self:stretch;white-space:nowrap;font-size:10px;margin:0;padding:7px 10px}
 .dy-task-tab-copy strong{font-size:11px}.dy-task-tab-copy small{font-size:9px}
 .dy-task-actions{padding:12px 14px 0;flex-direction:row;align-items:center}
 .dy-task-actions>div{width:auto;gap:7px}
 .dy-task-actions .dy-task-run,.dy-task-actions .dy-task-delete{padding:7px 8px;font-size:10px;min-height:32px}
 .dy-task-actions .fine{font-size:10px}
 #dy-task-panel{padding:12px 14px 16px}
 .dy-task-meta{gap:10px;margin-bottom:13px}
 .dy-editor-columns{gap:12px}
 .dy-friends-panel,.dy-message-panel{padding:12px}
 #account-form.dy-account-form>.form-actions{padding:11px 14px}
 .dy-save-hint{font-size:10px}
}
@media(max-width:420px){.dy-task-meta{grid-template-columns:minmax(0,1fr) 145px}.dy-task-meta .time-trigger-edit{display:none}.dy-friend-toolbar{gap:6px}.dy-message-options{grid-template-columns:minmax(0,1fr) 92px}.dy-save-hint{display:none}.dy-account-form>.form-actions{justify-content:flex-end}}

#modal.time-editing:has(.dy-account-form){width:360px;max-width:calc(100vw - 24px);height:min(460px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);border-radius:14px}
#modal:has(.dy-account-form) .time-editor .time-editor-head{padding:13px 16px}
#modal:has(.dy-account-form) .time-editor .time-editor-head strong{font-size:14px}
#modal:has(.dy-account-form) .time-editor .time-editor-head .icon-button{width:31px;height:31px;border-radius:8px}
#modal:has(.dy-account-form) .time-editor .time-editor-body{padding:15px 16px 0}
#modal:has(.dy-account-form) .time-editor .time-parts{gap:12px;margin-bottom:14px}
#modal:has(.dy-account-form) .time-editor .time-part{gap:6px}
#modal:has(.dy-account-form) .time-editor .time-part>button{width:84px;height:46px;border-radius:9px;gap:12px}
#modal:has(.dy-account-form) .time-editor .time-part-value{font-size:20px}
#modal:has(.dy-account-form) .time-editor .time-part>span{font-size:11px}
#modal:has(.dy-account-form) .time-editor .time-colon{line-height:44px;font-size:22px}
#modal:has(.dy-account-form) .time-editor .time-options-card{padding:10px 9px 9px;border-radius:10px}
#modal:has(.dy-account-form) .time-editor .time-options-title{font-size:11px;margin-bottom:8px}
#modal:has(.dy-account-form) .time-editor .time-options-scroll{height:156px}
#modal:has(.dy-account-form) .time-editor .time-grid{gap:4px}
#modal:has(.dy-account-form) .time-editor .time-option{height:33px;padding:6px 0;font-size:12px;border-radius:7px}
#modal:has(.dy-account-form) .time-editor .time-editor-note{font-size:10px;margin-top:12px}
#modal:has(.dy-account-form) .time-editor .time-editor-actions{padding:12px 16px;gap:9px}
#modal:has(.dy-account-form) .time-editor .time-editor-actions button{min-height:36px;padding:8px 12px;font-size:12px;border-radius:8px}
