/* 10.11.2026: «Отменить / Повторить» в графике и плашка «Удалено смен · Вернуть» (undo.js) */
.ud-bar { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ud-bar[hidden] { display: none !important; }
.ud-btn { height: 34px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  color: var(--ink-2, #374151); font: inherit; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; max-width: 440px; min-width: 0; }
.ud-btn b { font-size: 16px; line-height: 1; font-weight: 700; }
.ud-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-btn span:empty { display: none; }
.ud-btn:hover:not(:disabled) { background: var(--line); }
.ud-btn:disabled { opacity: .45; cursor: default; }
.ud-btn:focus-visible { outline: 2px solid var(--accent, #2563EB); outline-offset: 1px; }
.ud-redo.icon { padding: 0 9px; }
/* телефон: своя строка под полосой «N черновиков · Опубликовать» */
body.mb .ud-bar { padding: 6px 12px; justify-content: flex-end; background: var(--surface, #fff); border-bottom: 1px solid var(--line); }
body.mb .ud-bar.ud-empty { display: none !important; }
body.mb .ud-btn { min-height: 40px; height: auto; max-width: calc(100vw - 90px); }
body.mb .ud-redo.icon { min-width: 44px; justify-content: center; }
/* текст «что мешает» — по строкам */
#ch-text.ud-pre { white-space: pre-line; text-align: left; max-height: 50vh; overflow: auto; }
/* плашка внизу */
.ud-toast { position: fixed; z-index: 70; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  background: #111827; color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 14px; display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 24px); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; overflow: hidden; }
.ud-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ud-toast.err { background: #991B1B; }
.ud-toast-b { background: none; border: 0; color: #FCD34D; font: inherit; font-weight: 700; padding: 6px 4px; min-height: 36px; cursor: pointer; white-space: nowrap; }
.ud-toast-b:hover { text-decoration: underline; }
.ud-toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #FCD34D; transform-origin: left; animation: ud-shrink linear forwards; }
@keyframes ud-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
body.mb .ud-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .ud-toast { transition: none; } .ud-toast-bar { animation: none; } }
