/* Дизайн перенесён из ESIM-Lovets (SIM-Manager style): стеклянные карточки, Nunito,
   светлая тема по умолчанию, тёмная — [data-theme="dark"] по теме Telegram. */

:root {
  color-scheme: light;
  --page: 243 245 249;
  --surface: 255 255 255;
  --surface-hover: 241 244 249;
  --sunken: 246 248 251;
  --field: 255 255 255;
  --glass: 255 255 255;
  --border: 226 230 236;
  --border-strong: 203 209 219;
  --hairline: rgba(0, 0, 0, 0.07);
  --hairline-soft: rgba(0, 0, 0, 0.045);

  --txt: 29 29 31;
  --txt-muted: 85 85 90;
  --txt-faint: 100 100 105;

  --brand: 0 113 227;
  --brand-ink: 0 88 176;
  --brand-soft: 230 241 252;
  --ok-dot: 52 199 89;
  --ok-ink: 20 107 44;
  --danger: 215 0 21;
  --danger-ink: 162 0 15;
  --danger-soft: 255 230 229;
  --neutral-dot: 161 161 166;

  --glass-chip-alpha: 0.62;
  --glass-edge: rgba(255, 255, 255, 0.62);
  --shadow-sm: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.06), 0 3px 8px rgba(15, 23, 42, 0.08);
  --shadow-rim: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-popover: 0 0 0 1px rgba(16, 24, 40, 0.05), 0 14px 36px rgba(16, 24, 40, 0.14), 0 2px 6px rgba(16, 24, 40, 0.06);
  --card-sheen: linear-gradient(180deg, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0) 42%);
  --toggle-off: #c5cbd6;

  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --ground: radial-gradient(1100px 620px at 12% -12%, rgba(120, 170, 255, 0.34), transparent 62%),
    radial-gradient(900px 520px at 92% -4%, rgba(190, 152, 255, 0.24), transparent 60%),
    radial-gradient(760px 620px at 78% 108%, rgba(110, 214, 214, 0.18), transparent 62%),
    linear-gradient(180deg, #f7f9fc 0%, #eff2f7 100%);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --page: 23 30 42;
  --surface: 30 38 52;
  --surface-hover: 42 52 72;
  --sunken: 24 30 42;
  --field: 38 46 60;
  --glass: 22 28 40;
  --border: 62 68 80;
  --border-strong: 88 96 110;
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-soft: rgba(255, 255, 255, 0.09);

  --txt: 241 243 247;
  --txt-muted: 201 208 220;
  --txt-faint: 170 179 194;

  --brand: 10 132 255;
  --brand-ink: 142 199 255;
  --brand-soft: 38 58 84;
  --ok-dot: 72 222 128;
  --ok-ink: 142 230 168;
  --danger: 255 105 97;
  --danger-ink: 255 180 174;
  --danger-soft: 80 45 53;
  --neutral-dot: 154 163 178;

  --glass-chip-alpha: 0.6;
  --glass-edge: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.35), 0 3px 8px rgba(0, 0, 0, 0.3);
  --shadow-rim: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-popover: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 14px 36px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --card-sheen: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0) 42%);
  --toggle-off: rgba(255, 255, 255, 0.2);

  --ground: radial-gradient(1100px 620px at 12% -12%, rgba(0, 113, 227, 0.18), transparent 62%),
    radial-gradient(900px 520px at 92% -4%, rgba(10, 126, 164, 0.14), transparent 60%),
    radial-gradient(760px 620px at 78% 108%, rgba(0, 113, 227, 0.1), transparent 62%),
    linear-gradient(180deg, #1a2230 0%, #141a24 100%);
}


/* =========================================================================
 * Размерная сетка — одна на всё приложение, чтобы ничего не «гуляло»
 * ========================================================================= */
:root {
  --ctl: 44px;        /* поля, строки выбора, кнопки-иконки */
  --cell: 40px;       /* ячейки сеток (дни, числа, месяцы), сегменты */
  --r-ctl: 12px;
  --r-cell: 10px;
  --r-card: 18px;
  --gap: 8px;
  --grad: linear-gradient(180deg, #1a86f0, #0071e3);
  --grad-shadow: 0 1px 3px rgba(0, 113, 227, 0.35);
}

* { box-sizing: border-box; }

html {
  background-color: rgb(var(--page));
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  font-family: 'Nunito', 'Nunito Metric Fallback', 'Nunito Metric Fallback 2', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
  color: rgb(var(--txt));
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--ground);
}

::selection { background-color: rgb(var(--brand) / 0.18); }
[hidden] { display: none !important; }

button { font: inherit; color: inherit; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:not(:disabled) { cursor: pointer; }
button:not(:disabled):active { scale: 0.97; }
button { transition: background-color 120ms var(--ease-soft), color 120ms var(--ease-soft), border-color 120ms var(--ease-soft), scale 160ms cubic-bezier(0.2, 0, 0, 1); }

svg.lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }

.hint { display: block; margin-top: 8px; color: rgb(var(--txt-faint)); font-size: 12px; font-weight: 600; }
.center { text-align: center; margin-top: 48px; }
.error { margin: 0; color: rgb(var(--danger-ink)); font-size: 13px; font-weight: 700; }
.grow { flex: 1; min-width: 0; }

/* ---------- шапка ---------- */
.top { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 16px; }
h1 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title { display: flex; align-items: center; gap: 10px; }
.title svg.lucide {
  width: 36px; height: 36px; padding: 8px;
  border-radius: 12px;
  color: rgb(var(--brand));
  background: rgb(var(--brand) / 0.1);
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-ctl);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.btn svg.lucide { width: 18px; height: 18px; }
.btn.primary {
  color: #fff;
  background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px rgba(0, 113, 227, 0.24);
}
.btn.wide { width: 100%; height: 50px; border-radius: 16px; font-size: 16px; }
.btn:disabled { opacity: 0.5; box-shadow: none; }
.btn.round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  color: rgb(var(--txt));
  background: rgb(var(--glass) / var(--glass-chip-alpha));
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-rim), 0 6px 18px rgba(16, 24, 40, 0.12);
}
.btn.round svg.lucide { width: 22px; height: 22px; }

/* ---------- стеклянные карточки ---------- */
.card, .section {
  border-radius: var(--r-card);
  background-color: rgb(var(--glass) / 0.78);
  background-image: var(--card-sheen);
  box-shadow: var(--shadow-rim), var(--shadow-sm);
}
:root[data-theme='dark'] .card,
:root[data-theme='dark'] .section { background-color: rgb(var(--surface) / 0.78); }

/* =========================================================================
 * Список уведомлений
 * ========================================================================= */
.card { padding: 16px; margin-bottom: 12px; animation: fade-in 220ms cubic-bezier(0.2, 0, 0, 1); }
.card.off .card-text, .card.off .card-icon, .card.off .meta, .card.off .badges { opacity: 0.5; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 11px;
  color: rgb(var(--brand));
  background: rgb(var(--brand) / 0.1);
}
.card-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  white-space: pre-wrap;
  word-break: break-word;
}
.meta { margin-top: 12px; line-height: 20px; color: rgb(var(--txt-muted)); font-size: 13px; font-weight: 600; }
.meta div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.meta div + div { margin-top: 4px; }
.meta svg.lucide { width: 15px; height: 15px; color: rgb(var(--txt-faint)); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  background: rgb(var(--brand-soft));
  color: rgb(var(--brand-ink));
  font-size: 12px;
  font-weight: 700;
}
.badge svg.lucide { width: 13px; height: 13px; }

.card .err {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  color: rgb(var(--danger-ink));
  background: rgb(var(--danger-soft));
  font-size: 12px;
  font-weight: 700;
}
.card .err svg.lucide { width: 15px; height: 15px; }

.actions { display: grid; grid-template-columns: 1fr 1fr var(--ctl); gap: var(--gap); margin-top: 16px; }
.actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--r-cell);
  background: rgb(var(--surface));
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.actions button svg.lucide { width: 16px; height: 16px; }
.actions .test { color: rgb(var(--brand-ink)); }
.actions .del { color: rgb(var(--danger)); padding: 0; }

/* переключатель */
input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--toggle-off);
  cursor: pointer;
  transition: background-color 180ms var(--ease-soft);
}
input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 200ms var(--ease-spring);
}
input[type='checkbox']:checked { background: rgb(var(--brand)); }
input[type='checkbox']:checked::after { transform: translateX(18px); }

/* =========================================================================
 * Форма
 * ========================================================================= */
#form-view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

.section { padding: 16px; margin-bottom: 12px; }
/* единый ритм внутри секции: 16 между блоками (специфичнее, чем .field { margin: 0 }) */
#form .section > * + * { margin-top: 16px; }
#form .section > .sub { margin-top: 16px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.tile-icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  color: rgb(var(--brand));
  background: rgb(var(--brand) / 0.1);
}
.tile-icon svg.lucide { width: 17px; height: 17px; }

/* поля */
.field { display: block; min-width: 0; margin: 0; }
.label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: rgb(var(--txt-muted)); }

input:not([type='checkbox']), select, textarea {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--ctl);
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--r-ctl);
  background: rgb(var(--field));
  color: rgb(var(--txt));
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: normal;
  outline: none;
  transition: border-color 120ms var(--ease-soft), box-shadow 120ms var(--ease-soft);
}
textarea { height: auto; min-height: 84px; padding: 11px 12px; resize: none; line-height: 1.4; font-weight: 600; }
input::placeholder, textarea::placeholder { color: rgb(var(--txt-faint)); font-weight: 600; }
input:focus, select:focus, textarea:focus { border-color: rgb(var(--brand)); box-shadow: 0 0 0 3px rgb(var(--brand) / 0.16); }

/* дата/время: одинаковая высота и выравнивание на iOS/Android/десктопе */
input[type='date'], input[type='time'] { font-variant-numeric: tabular-nums; }
input[type='date']::-webkit-date-and-time-value,
input[type='time']::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type='date']::-webkit-calendar-picker-indicator,
input[type='time']::-webkit-calendar-picker-indicator { opacity: 0.45; margin: 0; cursor: pointer; }
:root[data-theme='dark'] input::-webkit-calendar-picker-indicator { filter: invert(1); }
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type='number'] { -moz-appearance: textfield; }

.select { position: relative; display: block; }
.select select { padding-right: 38px; text-overflow: ellipsis; }
.select svg.lucide {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: rgb(var(--txt-faint));
  pointer-events: none;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* сетки */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grid6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }

/* ячейки выбора (дни недели, числа, месяцы) */
.grid7 button, .grid6 button {
  height: var(--cell);
  min-width: 0;
  padding: 0;
  border: 1px solid rgb(var(--border));
  border-radius: var(--r-cell);
  background: rgb(var(--surface));
  color: rgb(var(--txt-muted));
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.grid6 button { font-size: 12px; }
.grid7 button.active, .grid6 button.active {
  border-color: transparent;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--grad-shadow);
}
#monthdays .last { grid-column: span 4; }

.grid3.links { margin-top: 8px; }
.links button {
  height: 34px;
  min-width: 0;
  padding: 0 6px;
  border: 0;
  border-radius: var(--r-cell);
  background: rgb(var(--brand-soft));
  color: rgb(var(--brand-ink));
  font-size: 13px;
  font-weight: 700;
}

/* сегмент из двух вариантов */
.seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: var(--r-ctl);
  background: rgb(var(--txt) / 0.06);
}
.seg button {
  height: 38px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgb(var(--txt-muted));
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seg button.active {
  color: rgb(var(--txt));
  background: rgb(var(--surface));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 0 0 1px rgb(var(--txt) / 0.04);
}

/* список вариантов (режим дней) */
.options {
  overflow: hidden;
  border: 1px solid rgb(var(--border));
  border-radius: 14px;
  background: rgb(var(--surface));
}
.options button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: var(--ctl);
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgb(var(--txt));
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
.options button + button { box-shadow: inset 0 1px 0 var(--hairline); }
.options button:active { scale: 1; background: rgb(var(--txt) / 0.04); }
.options button span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.options button svg.lucide { color: rgb(var(--txt-faint)); }
.options .tick { opacity: 0; color: rgb(var(--brand)) !important; }
.options button.active { color: rgb(var(--brand-ink)); background: rgb(var(--brand) / 0.06); }
.options button.active svg.lucide { color: rgb(var(--brand)); }
.options button.active .tick { opacity: 1; }

/* шаблоны — плитки 2 × N */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.tiles button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgb(var(--border));
  border-radius: 14px;
  background: rgb(var(--surface));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}
.tiles button span { min-width: 0; overflow-wrap: anywhere; }
.tiles button svg.lucide { width: 20px; height: 20px; color: rgb(var(--brand)); }
.tiles button.active { border-color: rgb(var(--brand) / 0.55); background: rgb(var(--brand-soft)); color: rgb(var(--brand-ink)); }

/* список времён и вариантов текста: поле + кнопка «убрать» одинаковой высоты */
.time-list { display: flex; flex-direction: column; gap: var(--gap); }
.time-item, .variant { display: grid; grid-template-columns: minmax(0, 1fr) var(--ctl); gap: var(--gap); align-items: start; }
.variant + .variant { margin-top: var(--gap); }
.variant textarea { min-height: var(--ctl); height: 64px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ctl);
  height: var(--ctl);
  padding: 0;
  border: 1px solid rgb(var(--border));
  border-radius: var(--r-ctl);
  background: rgb(var(--surface));
  color: rgb(var(--txt-muted));
}
.icon-btn:disabled { opacity: 0.35; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin-top: var(--gap);
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-cell);
  background: rgb(var(--brand-soft));
  color: rgb(var(--brand-ink));
  font-size: 13px;
  font-weight: 700;
}
.link-btn svg.lucide { width: 16px; height: 16px; }
#pick { margin-top: 16px; }

/* «Дополнительно» */
.more summary { list-style: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.more summary::-webkit-details-marker { display: none; }
.more .chev { color: rgb(var(--txt-faint)); transition: transform 200ms var(--ease-soft); }
.more[open] .chev { transform: rotate(180deg); }
.count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgb(var(--brand));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

/* предпросмотр */
.preview { background-color: rgb(var(--brand-soft) / 0.85) !important; }
.preview-summary { font-size: 14px; font-weight: 700; }
.preview-summary:empty { display: none; }
.preview-list { margin: 0; padding: 0; list-style: none; }
.preview-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgb(var(--brand) / 0.14);
}
.preview-list li:first-child { box-shadow: none; }
.up-day { color: rgb(var(--txt-muted)); }
.up-day::first-letter { text-transform: uppercase; }
.up-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.preview-list li.none { justify-content: flex-start; gap: 8px; color: rgb(var(--danger-ink)); font-weight: 700; }
.preview.bad { background-color: rgb(var(--danger-soft) / 0.85) !important; }

/* закреплённая кнопка «Сохранить» */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background-color: rgb(var(--glass) / 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 -1px 0 var(--hairline), 0 -8px 24px rgba(16, 24, 40, 0.06);
}
.bottom-bar .error { text-align: center; }

/* тост */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 90;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 11px 16px;
  border-radius: 14px;
  color: rgb(var(--txt));
  font-size: 14px;
  font-weight: 700;
  background-color: rgb(var(--glass) / 0.8);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-rim), var(--shadow-popover);
  animation: toast-in 320ms var(--ease-spring) backwards;
}
#form-view:not([hidden]) ~ #toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes toast-in { from { transform: translate(-50%, 14px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .card, #toast { animation: none; }
  button:active { scale: 1; }
}

/* ожидание ответа и предупреждения */
:root { --warn-ink: 138 90 0; --warn-soft: 255 243 214; }
:root[data-theme='dark'] { --warn-ink: 255 209 128; --warn-soft: 70 56 28; }

.meta .waiting { color: rgb(var(--warn-ink)); font-weight: 700; }
.meta .waiting svg.lucide { color: rgb(var(--warn-ink)); }

.warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgb(var(--warn-ink));
  background: rgb(var(--warn-soft));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.warn svg.lucide { width: 16px; height: 16px; margin-top: 1px; }

.preview-note { font-size: 13px; font-weight: 600; color: rgb(var(--txt-muted)); }
.preview-note:empty { display: none; }
#form .preview > .preview-note { margin-top: 8px; }
#form .section > .hint { margin-top: 8px; }

/* очень узкие экраны */
@media (max-width: 350px) {
  body { padding-left: 12px; padding-right: 12px; }
  .section, .card { padding: 12px; }
  .grid7, .grid6 { gap: 4px; }
  .tiles button { font-size: 12px; }
}
