.ai-plan { max-height: 46vh; overflow-y: auto; margin-top: 12px; display: flex; flex-direction: column; gap: 8px;
  padding-right: 4px; }
.ai-drip { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--panel2); }
.ai-drip .adh { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 12px; }
.ai-drip .adseg { font-weight: 700; padding: 1px 8px; border-radius: 20px; font-size: 11px; }
.ai-drip .adseg.no_reg { color: var(--gold); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.ai-drip .adseg.reg_no_dep { color: var(--accent); background: var(--accent-soft, color-mix(in srgb, var(--accent) 16%, transparent)); }
.ai-drip .adwhen { color: var(--muted); }
.ai-drip .adtitle { color: var(--text); font-weight: 600; margin-left: auto; }
.ai-drip .adtext { font-size: 12.5px; color: var(--muted); line-height: 1.45; white-space: pre-line; }
/* Контент-план «по дням и этапам» */
.plan-wrap { overflow-x: auto; padding-bottom: 8px; }
.plan-tbl { border-collapse: separate; border-spacing: 8px; }
.plan-tbl th { font-size: 12px; color: var(--muted); font-weight: 700; text-align: left;
  padding: 0 4px 2px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.plan-tbl td { vertical-align: top; }
.plan-day { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap;
  padding-top: 10px; padding-right: 4px; }
.plan-day small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }
.pcell { width: 290px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px;
  background: var(--panel2); cursor: text; transition: border-color .12s; }
.pcell:hover { border-color: var(--accent); }
.pcell .pct { display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
  font-weight: 700; font-size: 11.5px; color: var(--accent); margin-bottom: 4px; }
.pcell .pcx { color: var(--muted); cursor: pointer; font-weight: 400; }
.pcell .pcx:hover { color: var(--danger); }
.pcell .pcb { font-size: 12.5px; line-height: 1.45; color: var(--text); white-space: pre-line;
  overflow-wrap: anywhere; }
.pcell.off { opacity: .4; }
.pcell.off .pcb { text-decoration: line-through; }
.pcell textarea { width: 100%; min-height: 120px; font-size: 12.5px; margin: 0; }
.plan-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel2); }
.plan-bar .spacer { flex: 1; }

.ai-loading { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 13.5px; }
.ai-loading .spin { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-loading .spin { animation-duration: 2.4s; } }

/* «✨ План напоминаний» — одно окно на оба вида плана */
.modal:has(.dp) { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.dp fieldset { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.dp legend { padding: 0; margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.dp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dp-opts.one { grid-template-columns: 1fr; }
.modal .dp label.dp-kind, .modal .dp label.dp-radio {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); cursor: pointer;
  text-transform: none; letter-spacing: normal; font-size: 13.5px; font-weight: 500; color: var(--text);
  transition: border-color .15s, background-color .15s; }
.modal .dp label.dp-kind:hover, .modal .dp label.dp-radio:hover { border-color: var(--border-2); }
.modal .dp label.dp-kind:has(input:checked), .modal .dp label.dp-radio:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft); }
.modal .dp label.dp-radio:has(input[value="replace"]:checked) {
  border-color: color-mix(in srgb, var(--danger) 60%, var(--border)); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.modal .dp label.dp-kind.off { opacity: .55; cursor: not-allowed; }
.modal .dp label.dp-live { margin-top: 14px; }
.modal .dp label input[type="radio"], .modal .dp label input[type="checkbox"] {
  width: 18px; height: 18px; margin: 1px 0 0; padding: 0; flex: none; accent-color: var(--accent); }
.dp label > span { display: grid; gap: 2px; min-width: 0; }
.dp label small { color: var(--text-dim); font-size: 12px; font-weight: 400; line-height: 1.4; }
.dp-steps { max-height: 190px; overflow-y: auto; display: grid; gap: 2px; padding: 4px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.modal .dp label.dp-step { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; min-height: 40px;
  border-radius: 8px; cursor: pointer; text-transform: none; letter-spacing: normal; font-size: 13.5px; font-weight: 500; color: var(--text); }
.modal .dp label.dp-step:hover { background: var(--panel-3); }
.dp-step > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dp-step small { flex: none; padding: 1px 8px; border-radius: 20px; background: var(--panel-3); }
@media (max-width: 520px) {
  .dp-opts { grid-template-columns: 1fr; }
  .modal .dp .mrow { flex-direction: column; gap: 0; }
}
@media (max-width: 820px) {
  .dp select, .dp textarea { font-size: 16px; }
  .dp .mact button { min-height: 44px; }
}
