/* ==========================================================================
   notes.html — «Мысли и заметки»

   Демо-телефон собран из тех же виджетов, что и приложение (Flutter):
   экран верстается в родных точках iPhone (390 × 844 pt) и уменьшается
   через transform. Значения отступов, кеглей, радиусов и цветов
   перенесены из кода:
     • Обзор — lib/pages/family_overview/family_overview_page.dart
     • Диктовка — lib/screens/lists_page/quick_list_voice_input_sheet.dart,
       lib/widgets/voice_dictation_panel.dart
     • Мысли и заметки — lib/pages/knowledge_base/knowledge_notes_page.dart
     • Заметка — knowledge_note_page.dart, widgets/detail_actions_bar.dart
     • Создать из заметки — knowledge_note_create_sheet.dart,
       knowledge_note_scope_dialog.dart
     • Список — screens/list_page (карточка товара, подвал BottomActionsBar)
   Картинки разделов и товаров — assets/navigation_sections,
   assets/knowledge_sections, web_site/assets/png.

   Сценарий (--notes-cycle: 18s):
     0–7%     Обзор, нажатие «Диктовать»
     7–35%    Окно диктовки: Семейная, запись, «Готово», «Создать заметку»
     35–52%   Мысли и заметки — новая заметка сверху
     52–68%   Заметка → «Создать из заметки» → «Покупки» → «Семейный»
     68–97%   Готовый список покупок
   ========================================================================== */

.notes-demo {
  --notes-cycle: 18s;
  --ios-blue: #007aff;
  --ink: #1f2328;
  --muted: #66707c;
  --border: #d8dade;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  min-height: 734px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 207, 74, 0.9), transparent 26%),
    radial-gradient(circle at 92% 90%, rgba(136, 169, 149, 0.62), transparent 32%),
    linear-gradient(145deg, #245ef2 0%, #2f6bff 52%, #1d4ed8 100%);
  box-shadow:
    0 30px 64px rgba(47, 107, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.notes-demo::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 1.5px, transparent 2px);
  background-size: 26px 26px;
  content: "";
  mask-image: linear-gradient(165deg, rgba(0, 0, 0, 0.9), transparent 74%);
}

.app-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Корпус — как на lists.html ---------- */

.notes-phone {
  position: absolute;
  z-index: 2;
  top: 48px;
  left: 50%;
  width: 274px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 15.7% / 7.4%;
  background: linear-gradient(110deg, #343842 0%, #0a0b0f 28%, #1d2027 69%, #050608 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    inset 0 0 0 2px rgba(255, 255, 255, 0.07),
    0 34px 46px rgba(8, 28, 80, 0.42);
  transform: translateX(-50%);
  animation: notes-phone-float 5s ease-in-out infinite;
}

.notes-screen {
  position: relative;
  overflow: hidden;
  width: 262px;
  height: 567px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14.1% / 6.5%;
  background: #fff;
  clip-path: inset(0 round 14.1% / 6.5%);
}

.notes-phone-button {
  position: absolute;
  top: 22.75%;
  right: -2.5px;
  width: 2.5px;
  height: 12.1%;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, #3d424d, #111319);
}

/* ==========================================================================
   Приложение: холст 390 × 844 pt
   ========================================================================== */

.app {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: 390px;
  height: 844px;
  color: #000;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.25;
  transform: scale(0.6718);
  transform-origin: 0 0;
  -webkit-font-smoothing: antialiased;
}

.app svg {
  display: block;
  flex: none;
}

.app svg:not([fill]) {
  fill: currentColor;
}

/* Статус-бар iOS */
.app-statusbar {
  position: absolute;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 30px 0 52px;
  color: #000;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-statusbar-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-battery {
  position: relative;
  display: grid;
  width: 27px;
  height: 13px;
  place-items: center;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-style: normal;
}

.app-battery::after {
  position: absolute;
  top: 4px;
  right: -3px;
  width: 1.5px;
  height: 5px;
  border-radius: 0 1px 1px 0;
  background: rgba(0, 0, 0, 0.4);
  content: "";
}

.app-battery b {
  font-size: 10px;
  font-weight: 800;
}

/* Сцены */
.app-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* AppPageBackground.blueGold */
.app-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #dfeaff 0%, #eff4ff 52%, #d6e4ff 100%);
}

.app-bg::before,
.app-bg::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.app-bg::before {
  top: 82px;
  right: -142px;
  width: 330px;
  height: 330px;
  background: rgba(79, 128, 238, 0.16);
}

.app-bg::after {
  top: 520px;
  left: -96px;
  width: 210px;
  height: 210px;
  background: rgba(255, 211, 90, 0.28);
}

/* CupertinoNavigationBar */
.app-navbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  height: 98px;
  align-items: center;
  padding: 54px 8px 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.16);
  background: rgba(249, 249, 249, 0.94);
  color: var(--ios-blue);
}

.app-navbar-tinted {
  border-bottom: 0;
  background: #dfeaff;
}

.app-navbar > b {
  overflow: hidden;
  color: #000;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-navbar-side {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 8px;
}

.app-navbar-right {
  justify-content: flex-end;
}

.app-back {
  gap: 6px;
  padding-left: 2px;
  font-size: 17px;
}

/* Сегменты (ListsFamilyFilterBar, _KnowledgeNoteScopeSelector) */
.app-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border: 0.6px solid rgba(60, 60, 67, 0.05);
  border-radius: 16px;
  background: rgba(242, 242, 247, 0.6);
}

.app-segment > span {
  margin: 0 2px;
  padding: 10px 0;
  border: 0.6px solid transparent;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.app-segment .is-yellow,
.voice-scope-family {
  color: #ffcf4a;
}

.app-segment .is-blue,
.voice-scope-personal {
  color: var(--ios-blue);
}

.app-segment .is-on.is-yellow {
  border-color: rgba(255, 207, 74, 0.28);
  background: rgba(255, 207, 74, 0.18);
}

.app-segment .is-on.is-blue {
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(0, 122, 255, 0.18);
}

/* BottomActionsBar */
.app-bottombar {
  position: absolute;
  z-index: 6;
  right: 12px;
  bottom: 30px;
  left: 12px;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-around;
  padding: 6px 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
  color: var(--ios-blue);
}

.app-tab {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 60px;
}

.app-tab small {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.app-mic {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  margin: -4px 0;
  place-items: center;
  border-radius: 50%;
}

.app-mic-sparkle {
  position: absolute;
  right: 0;
  bottom: 2px;
}

.app-badge-wrap {
  position: relative;
}

.app-badge-wrap i {
  position: absolute;
  top: -7px;
  right: -9px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: var(--ios-blue);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

/* Модалки */
.app-dim {
  position: absolute;
  z-index: 20;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
}

.app-alert {
  position: absolute;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: 290px;
  padding: 20px 16px 14px;
  border-radius: 14px;
  background: rgba(242, 242, 247, 0.97);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.08);
}

.app-alert > b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

.app-spinner {
  display: block;
  width: 22px;
  height: 22px;
  margin: 18px auto 8px;
  border: 2.5px solid rgba(60, 60, 67, 0.18);
  border-top-color: rgba(60, 60, 67, 0.7);
  border-radius: 50%;
  animation: app-spin 0.8s linear infinite;
}

/* collectionSurfaceDecoration */
.app-surface {
  border: 0.9px solid rgba(216, 218, 222, 0.82);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 242, 244, 0.94));
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.055),
    0 1px 4px rgba(0, 0, 0, 0.02);
}

.app-icon-btn {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.09);
  color: var(--ios-blue);
}

.app-primary {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: var(--ios-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.app-filled {
  display: grid;
  min-height: 50px;
  place-items: center;
  border-radius: 8px;
  background: var(--ios-blue);
  color: #fff;
  font-size: 17px;
}

/* ---------- 1. Обзор ---------- */

.scene-overview {
  animation: sc-overview var(--notes-cycle) ease-in-out infinite;
}

.ov-scope {
  position: relative;
  z-index: 2;
  height: 74px;
  padding: 12px 12px 0;
  background: #e8f0ff;
}

.ov-filter {
  display: flex;
  align-items: center;
  margin: 0 8px;
  padding: 2px;
  border: 0.6px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ov-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.ov-dropdown svg {
  color: rgba(60, 60, 67, 0.6);
}

.ov-filter-sep {
  width: 1px;
  height: 22px;
  margin: 0 8px;
  background: rgba(60, 60, 67, 0.15);
}

.ov-filter .app-segment {
  flex: 1;
}

.ov-hero {
  position: relative;
  overflow: hidden;
  min-height: 184px;
  margin: 12px 12px 0;
  padding: 20px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  background: #f8faff;
  box-shadow: 0 20px 44px rgba(38, 77, 153, 0.11);
}

.ov-orb {
  position: absolute;
  border-radius: 50%;
}

.ov-orb-blue {
  top: -52px;
  right: -36px;
  width: 150px;
  height: 150px;
  background: rgba(47, 107, 255, 0.12);
}

.ov-orb-gold {
  right: 42px;
  bottom: -58px;
  width: 128px;
  height: 128px;
  background: rgba(255, 211, 90, 0.38);
}

.ov-hero h5 {
  position: relative;
  margin: 0;
  color: #17366f;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.ov-hero p {
  position: relative;
  margin: 8px 0 0;
  color: #62769c;
  font-size: 14px;
}

.ov-metrics {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 16px;
  color: #62769c;
  font-size: 14px;
}

.ov-metrics span {
  padding: 5px 0;
}

.ov-metrics b {
  color: #17366f;
  font-weight: 600;
}

.ov-metrics strong {
  color: #2454cd;
}

.ov-sections-title {
  position: relative;
  padding: 24px 20px 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

.ov-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 12px;
}

.ov-card {
  position: relative;
  display: flex;
  overflow: hidden;
  height: 178px;
  flex-direction: column;
  padding: 14px 13px 13px 15px;
  border: 0.9px solid rgba(216, 218, 222, 0.82);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f4f5f7);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.063);
}

.ov-card.is-prominent {
  background: linear-gradient(135deg, #f1f6ff, #fff);
}

.ov-card.is-active {
  border-color: rgba(0, 122, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), #fff);
}

.ov-card img {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.ov-card strong {
  position: relative;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.4px;
}

.ov-card.is-active strong,
.ov-card.is-active em {
  color: var(--ios-blue);
}

.ov-card small {
  position: relative;
  max-width: 78px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ov-card b {
  margin-top: auto;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.08;
}

.ov-card em {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.18;
}

.ov-card em svg {
  color: rgba(102, 112, 124, 0.8);
}

.ov-dictate .app-mic {
  animation: ov-dictate-press var(--notes-cycle) ease-in-out infinite;
}

/* ---------- Окно диктовки ---------- */

.voice-dim {
  animation: voice-dim var(--notes-cycle) ease-in-out infinite;
}

.voice-popup {
  position: absolute;
  z-index: 21;
  right: 12px;
  bottom: 46px;
  left: 12px;
  padding: 16px;
  border-radius: 28px;
  background: #f2f2f7;
  transform: translateY(110%);
  animation: voice-popup var(--notes-cycle) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.sheet-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.sheet-header b {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}

.voice-hints {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.voice-scope {
  margin-top: 10px;
}

.voice-scope > span {
  font-size: 16px;
}

.voice-scope-personal {
  animation: voice-scope-personal var(--notes-cycle) ease-in-out infinite;
}

.voice-scope-family {
  animation: voice-scope-family var(--notes-cycle) ease-in-out infinite;
}

.voice-recorder {
  position: relative;
  display: grid;
  grid-template-columns: 40px auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1.1px solid rgba(216, 218, 222, 0.75);
  border-radius: 18px;
  background: rgba(253, 253, 254, 0.76);
}

.voice-rec-dot {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  grid-column: 1;
  grid-row: 1;
  border-radius: 50%;
}

.voice-rec-live {
  background: rgba(255, 59, 48, 0.14);
  color: #ff3b30;
  animation: voice-live var(--notes-cycle) step-end infinite;
}

.voice-rec-done {
  background: rgba(0, 122, 255, 0.14);
  color: var(--ios-blue);
  animation: voice-done var(--notes-cycle) step-end infinite;
}

.voice-recorder b {
  grid-column: 2;
  grid-row: 1;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.voice-rec-live-text {
  animation: voice-live var(--notes-cycle) step-end infinite;
}

.voice-rec-done-text {
  animation: voice-done var(--notes-cycle) step-end infinite;
}

.voice-wave {
  display: flex;
  height: 20px;
  align-items: center;
  justify-content: space-between;
  grid-column: 3;
  color: #ff3b30;
  animation: voice-wave-color var(--notes-cycle) step-end infinite;
}

.voice-wave i {
  width: 1.5px;
  height: 30%;
  border-radius: 2px;
  background: currentColor;
  animation: app-wave 0.9s ease-in-out infinite;
}

.voice-wave i:nth-child(2n) { animation-delay: -0.2s; }
.voice-wave i:nth-child(3n) { animation-delay: -0.45s; }
.voice-wave i:nth-child(5n) { animation-delay: -0.65s; }

.voice-timer {
  position: relative;
  width: 44px;
  height: 18px;
  grid-column: 4;
  color: #ff3b30;
  font-size: 14px;
  font-weight: 600;
}

.voice-timer span {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.voice-timer span:nth-child(1) { animation: voice-t1 var(--notes-cycle) step-end infinite; }
.voice-timer span:nth-child(2) { animation: voice-t2 var(--notes-cycle) step-end infinite; }
.voice-timer span:nth-child(3) { animation: voice-t3 var(--notes-cycle) step-end infinite; }
.voice-timer span:nth-child(4) { animation: voice-t4 var(--notes-cycle) step-end infinite; }
.voice-timer span:nth-child(5) { animation: voice-t5 var(--notes-cycle) step-end infinite; }

.voice-status {
  position: relative;
  height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.voice-status span {
  position: absolute;
  inset: 0;
}

.voice-status-live {
  animation: voice-live var(--notes-cycle) step-end infinite;
}

.voice-status-done {
  animation: voice-done var(--notes-cycle) step-end infinite;
}

.voice-actions {
  position: relative;
  height: 50px;
  margin-top: 12px;
  animation: voice-actions-h var(--notes-cycle) step-end infinite;
}

.voice-done {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  animation: voice-done-btn var(--notes-cycle) ease-in-out infinite;
}

.voice-review {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  animation: voice-done var(--notes-cycle) step-end infinite;
}

.voice-continue {
  padding: 12px 0;
  color: var(--ios-blue);
  font-size: 17px;
  text-align: center;
}

.voice-create {
  animation: voice-create-press var(--notes-cycle) ease-in-out infinite;
}

.voice-divider {
  display: block;
  height: 1px;
  margin: 20px 0;
  background: var(--border);
}

.voice-guidance {
  margin: 0 0 12px;
  font-size: 15px;
  text-align: center;
}

.voice-popup h6 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.voice-transcript {
  min-height: 96px;
  padding: 12px 14px;
  border: 0.9px solid rgba(0, 122, 255, 0.42);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-size: 16px;
  line-height: 1.4;
}

.voice-transcript span {
  opacity: 0;
}

.voice-transcript span:nth-child(1) { animation: voice-w1 var(--notes-cycle) linear infinite; }
.voice-transcript span:nth-child(2) { animation: voice-w2 var(--notes-cycle) linear infinite; }
.voice-transcript span:nth-child(3) { animation: voice-w3 var(--notes-cycle) linear infinite; }

.voice-caret {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 2px;
  vertical-align: -3px;
  background: var(--ios-blue);
  animation: app-blink 1s steps(2, start) infinite;
}

.voice-cancel {
  display: block;
  padding: 14px 0 2px;
  color: var(--ios-blue);
  font-size: 17px;
  text-align: center;
}

.save-dim {
  z-index: 28;
  animation: save-dim var(--notes-cycle) ease-in-out infinite;
}

.save-alert {
  animation: save-alert var(--notes-cycle) ease-in-out infinite;
}

/* ---------- 2. Мысли и заметки ---------- */

.scene-notes {
  animation: sc-notes var(--notes-cycle) ease-in-out infinite;
}

.notes-review-link {
  position: relative;
  padding: 14px 0;
  color: var(--ios-blue);
  font-size: 17px;
  text-align: center;
}

.notes-list {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 0 12px;
}

.note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px;
  padding: 16px;
}

.note-card-new {
  animation: note-card-new var(--notes-cycle) ease-out infinite;
}

.note-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.family-badge,
.personal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.family-badge {
  border: 0.8px solid #e1e3e6;
  background: linear-gradient(135deg, #fff, #f0f2f4);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  color: #9a6400;
}

.family-badge img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.personal-badge {
  gap: 4px;
  padding: 4px 7px;
  background: #eef5fe;
  color: var(--ios-blue);
}

.note-author {
  display: grid;
  grid-template-columns: 16px 92px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(226, 206, 160, 0.42);
  color: #8d7548;
  font-size: 12px;
}

.note-author small {
  color: var(--muted);
  font-size: 12px;
}

.note-author b {
  color: var(--ink);
  font-weight: 600;
}

.note-date {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.note-date + .note-date {
  margin-top: 0;
}

.note-card-actions {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 20px;
  padding-top: 2px;
  color: var(--ios-blue);
}

.note-card-actions .is-red {
  color: #ff3b30;
}

/* ---------- 3. Заметка + «Создать из заметки» ---------- */

.scene-note {
  animation: sc-note var(--notes-cycle) ease-in-out infinite;
}

.note-body {
  position: relative;
  margin: 0;
  padding: 20px;
  font-size: 17px;
  line-height: 1.4;
}

.detail-bar {
  position: absolute;
  right: 16px;
  bottom: 50px;
  left: 16px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 15px;
  align-items: center;
  padding: 9px;
  border: 1px solid #e3e5e8;
  border-radius: 40px;
  background: #fff;
}

.detail-round {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #007aff;
}

.detail-round::before,
.detail-round::after {
  position: absolute;
  border: 1px solid #969ca6;
  border-radius: 50%;
  content: "";
  inset: 0;
}

.detail-round::after {
  border-color: #d4d7dd;
  inset: -5px;
}

.detail-round-left::before,
.detail-round-left::after {
  border-right-color: transparent;
  border-top-color: transparent;
  transform: rotate(-45deg);
}

.detail-round-right::before,
.detail-round-right::after {
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
}

.detail-center {
  padding: 8px 0;
  color: #007aff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: detail-press var(--notes-cycle) ease-in-out infinite;
}

.create-dim {
  animation: create-dim var(--notes-cycle) ease-in-out infinite;
}

.create-sheet {
  position: absolute;
  z-index: 21;
  right: 10px;
  bottom: 44px;
  left: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fdfdfe;
  transform: translateY(115%);
  animation: create-sheet var(--notes-cycle) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.create-grabber {
  display: block;
  width: 32px;
  height: 4px;
  margin: 0 auto;
  border-radius: 4px;
  background: var(--border);
}

.create-head {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.create-head b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
}

.create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.create-card {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(#fdfdfe, #f1f2f4);
}

.create-card img {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
}

.create-card b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.create-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.create-card-shopping {
  animation: create-pick var(--notes-cycle) ease-in-out infinite;
}

.create-cancel {
  display: block;
  margin-top: 8px;
  padding: 12px 0;
  border-radius: 14px;
  background: #f1f2f4;
  color: #007aff;
  font-size: 16px;
  text-align: center;
}

.scope-alert {
  width: 300px;
  text-align: center;
  animation: scope-alert var(--notes-cycle) ease-in-out infinite;
}

.scope-alert p {
  margin: 10px 0 14px;
  color: rgba(60, 60, 67, 0.75);
  font-size: 14px;
  line-height: 1.35;
}

.scope-option {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #b9d1fb;
  border-radius: 15px;
  background: linear-gradient(#f3f7ff, #e5eeff);
}

.scope-option b {
  display: block;
  color: #007aff;
  font-size: 15px;
  font-weight: 600;
}

.scope-option small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.scope-option-family {
  border-color: #e0a800;
  background: linear-gradient(#fffcf2, #fff1be);
  animation: scope-pick var(--notes-cycle) ease-in-out infinite;
}

.scope-option-family b {
  color: #8b6200;
}

.scope-cancel {
  display: block;
  margin: 12px -16px -14px;
  padding: 12px 0;
  border-top: 0.5px solid rgba(60, 60, 67, 0.29);
  color: #007aff;
  font-size: 17px;
}

/* ---------- 4. Список покупок ---------- */

.scene-list {
  animation: sc-list var(--notes-cycle) ease-in-out infinite;
}

.list-bg {
  position: absolute;
  inset: 0;
  background: #fff;
}

.list-navbar {
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  border-bottom: 0;
  background: #fff;
}

.list-nav-left {
  gap: 18px;
  padding-left: 10px;
}

.list-progress {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 4px;
}

.list-progress i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #d1d1d6;
}

.list-progress small {
  color: rgba(60, 60, 67, 0.6);
  font-size: 9px;
}

.list-items {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 10px 16px 0;
}

.item-card {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 80px 34px;
  gap: 0 10px;
  align-items: center;
  min-height: 96px;
  padding: 14px 10px 30px 18px;
  border: 1px solid #e5e5ea;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f5f5f6);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  opacity: 0;
}

.item-card:nth-child(1) { animation: item-in-1 var(--notes-cycle) ease-out infinite; }
.item-card:nth-child(2) { animation: item-in-2 var(--notes-cycle) ease-out infinite; }
.item-card:nth-child(3) { animation: item-in-3 var(--notes-cycle) ease-out infinite; }
.item-card:nth-child(4) { animation: item-in-4 var(--notes-cycle) ease-out infinite; }

.item-check {
  width: 25px;
  height: 25px;
  border: 2.5px solid #007aff;
  border-radius: 50%;
}

.item-text b {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.item-text small {
  display: block;
  margin-top: 6px;
  color: rgba(60, 60, 67, 0.6);
  font-size: 11px;
}

.item-text strong {
  margin-right: 8px;
  color: #3c3c43;
  font-weight: 700;
}

.item-card img {
  width: 76px;
  height: 62px;
  object-fit: contain;
}

.item-side {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #007aff;
}

.item-label {
  position: absolute;
  bottom: 9px;
  left: 50%;
  padding: 3px 10px;
  border: 1px solid #d1d1d6;
  border-radius: 999px;
  color: rgba(60, 60, 67, 0.6);
  font-size: 10px;
  transform: translateX(-50%);
}

.list-bottombar {
  padding: 6px 8px;
}

.list-bottombar .app-tab {
  min-width: 0;
}

/* ==========================================================================
   Карточки вокруг телефона и шаги
   ========================================================================== */

.notes-float {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.93);
  color: #111827;
  box-shadow: 0 18px 38px rgba(16, 39, 105, 0.28);
  backdrop-filter: blur(18px);
  opacity: 0;
}

.notes-float > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.11);
  font-size: 16px;
}

.notes-float small {
  display: block;
  color: #245ef2;
  font-size: 9px;
  font-weight: 700;
}

.notes-float strong {
  display: block;
  font-size: 11px;
  font-weight: 750;
}

.notes-float-remember {
  top: 96px;
  left: 14px;
  width: 196px;
  animation: notes-float-remember var(--notes-cycle) ease-out infinite;
}

.notes-float-forget {
  bottom: 150px;
  left: 14px;
  width: 208px;
  animation: notes-float-forget var(--notes-cycle) ease-out infinite;
}

.notes-float-forget > span:first-child {
  background: rgba(136, 169, 149, 0.2);
}

.notes-float-time {
  top: 72px;
  right: 14px;
  animation: notes-float-time var(--notes-cycle) ease-out infinite;
}

.notes-float-time > span:first-child {
  background: rgba(255, 207, 74, 0.28);
}

.notes-float-result {
  right: 14px;
  bottom: 150px;
  width: 200px;
  animation: notes-float-result var(--notes-cycle) ease-out infinite;
}

.notes-float-result > span:first-child {
  background: rgba(52, 199, 89, 0.16);
}

.notes-demo-steps {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 15px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(16, 39, 105, 0.5);
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  font-weight: 650;
  box-shadow: 0 14px 30px rgba(16, 39, 105, 0.24);
  backdrop-filter: blur(18px);
}

.notes-step {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  white-space: nowrap;
}

.notes-step i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.notes-step-1 { animation: notes-step-1 var(--notes-cycle) ease-in-out infinite; }
.notes-step-2 { animation: notes-step-2 var(--notes-cycle) ease-in-out infinite; }
.notes-step-3 { animation: notes-step-3 var(--notes-cycle) ease-in-out infinite; }

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes notes-phone-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes app-spin { to { transform: rotate(360deg); } }
@keyframes app-blink { to { opacity: 0; } }
@keyframes app-wave {
  0%, 100% { height: 22%; }
  50% { height: 100%; }
}

/* Сцены */
@keyframes sc-overview {
  0%, 35% { opacity: 1; }
  36.5%, 98% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes sc-notes {
  0%, 35% { opacity: 0; transform: translateX(30px); }
  36.5%, 51.5% { opacity: 1; transform: none; }
  53%, 100% { opacity: 0; transform: translateX(-30px); }
}

@keyframes sc-note {
  0%, 51.5% { opacity: 0; transform: translateX(30px); }
  53%, 67.5% { opacity: 1; transform: none; }
  69%, 100% { opacity: 0; }
}

@keyframes sc-list {
  0%, 67.5% { opacity: 0; }
  69%, 96.5% { opacity: 1; }
  98.5%, 100% { opacity: 0; }
}

/* Обзор → диктовка */
@keyframes ov-dictate-press {
  0%, 4.5% { background: transparent; color: #007aff; transform: scale(1); }
  5.5% { background: #007aff; color: #fff; transform: scale(0.88); box-shadow: 0 0 16px 3px rgba(0, 122, 255, 0.35); }
  7%, 100% { background: transparent; color: #007aff; transform: scale(1); }
}

@keyframes voice-dim {
  0%, 6.5% { opacity: 0; }
  8.5%, 35% { opacity: 1; }
  36.5%, 100% { opacity: 0; }
}

@keyframes voice-popup {
  0%, 6.5% { transform: translateY(110%); }
  9.5%, 100% { transform: translateY(0); }
}

@keyframes voice-scope-personal {
  0%, 11.5% { background: rgba(0, 122, 255, 0.18); border-color: rgba(0, 122, 255, 0.28); }
  12.5%, 100% { background: transparent; border-color: transparent; }
}

@keyframes voice-scope-family {
  0%, 11.5% { background: transparent; border-color: transparent; transform: scale(1); }
  12% { transform: scale(0.95); }
  12.5%, 100% { background: rgba(255, 207, 74, 0.18); border-color: rgba(255, 207, 74, 0.28); transform: scale(1); }
}

@keyframes voice-live {
  0% { opacity: 1; }
  27.5% { opacity: 0; }
}

@keyframes voice-done {
  0% { opacity: 0; }
  27.5% { opacity: 1; }
}

@keyframes voice-t1 { 0% { opacity: 0; } 9.5% { opacity: 1; } 13% { opacity: 0; } }
@keyframes voice-t2 { 0% { opacity: 0; } 13% { opacity: 1; } 17.5% { opacity: 0; } }
@keyframes voice-t3 { 0% { opacity: 0; } 17.5% { opacity: 1; } 21.5% { opacity: 0; } }
@keyframes voice-t4 { 0% { opacity: 0; } 21.5% { opacity: 1; } 25% { opacity: 0; } }
@keyframes voice-t5 { 0% { opacity: 0; } 25% { opacity: 1; } 27.5% { opacity: 0; } }

@keyframes voice-w1 {
  0%, 13% { opacity: 0; }
  14.5%, 100% { opacity: 1; }
}

@keyframes voice-w2 {
  0%, 18% { opacity: 0; }
  19.5%, 100% { opacity: 1; }
}

@keyframes voice-w3 {
  0%, 23% { opacity: 0; }
  24.5%, 100% { opacity: 1; }
}

@keyframes voice-wave-color {
  0% { color: #ff3b30; }
  27.5% { color: #007aff; }
}

@keyframes voice-actions-h {
  0% { height: 50px; }
  27.5% { height: 98px; }
}

@keyframes voice-done-btn {
  0%, 25.5% { opacity: 1; transform: scale(1); filter: none; }
  26.5% { opacity: 1; transform: scale(0.96); filter: brightness(0.85); }
  27.5%, 100% { opacity: 0; transform: scale(1); filter: none; }
}

@keyframes voice-create-press {
  0%, 30% { transform: scale(1); filter: none; }
  31% { transform: scale(0.96); filter: brightness(0.82); }
  32%, 100% { transform: scale(1); filter: none; }
}

@keyframes save-dim {
  0%, 31.5% { opacity: 0; }
  32%, 35% { opacity: 0.6; }
  36%, 100% { opacity: 0; }
}

@keyframes save-alert {
  0%, 31.5% { opacity: 0; transform: translate(-50%, -50%) scale(1.08); }
  32.5%, 35% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  36%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* Заметки */
@keyframes note-card-new {
  0%, 36.5% { opacity: 0; transform: translateY(-16px); box-shadow: none; }
  39% { opacity: 1; transform: none; box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.5); }
  49% { box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.5); }
  51.5%, 100% { opacity: 1; transform: none; box-shadow: 0 5px 16px rgba(0, 0, 0, 0.055); }
}

/* Заметка → создать */
@keyframes detail-press {
  0%, 54.5% { opacity: 1; }
  55% { opacity: 0.4; }
  56%, 100% { opacity: 1; }
}

@keyframes create-dim {
  0%, 55% { opacity: 0; }
  56.5%, 67.5% { opacity: 1; }
  69%, 100% { opacity: 0; }
}

@keyframes create-sheet {
  0%, 55% { transform: translateY(115%); }
  57.5%, 60.5% { transform: translateY(0); }
  62.5%, 100% { transform: translateY(115%); }
}

@keyframes create-pick {
  0%, 59% { opacity: 1; transform: scale(1); }
  59.8% { opacity: 0.55; transform: scale(0.97); }
  61%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes scope-alert {
  0%, 61.5% { opacity: 0; transform: translate(-50%, -50%) scale(1.08); }
  62.8%, 67% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  68%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@keyframes scope-pick {
  0%, 65% { opacity: 1; transform: scale(1); }
  65.8% { opacity: 0.55; transform: scale(0.97); }
  66.8%, 100% { opacity: 1; transform: scale(1); }
}

/* Список */
@keyframes item-in-1 {
  0%, 69.5% { opacity: 0; transform: translateY(14px); }
  71.5%, 100% { opacity: 1; transform: none; }
}

@keyframes item-in-2 {
  0%, 72% { opacity: 0; transform: translateY(14px); }
  74%, 100% { opacity: 1; transform: none; }
}

@keyframes item-in-3 {
  0%, 74.5% { opacity: 0; transform: translateY(14px); }
  76.5%, 100% { opacity: 1; transform: none; }
}

@keyframes item-in-4 {
  0%, 77% { opacity: 0; transform: translateY(14px); }
  79%, 100% { opacity: 1; transform: none; }
}

/* Карточки вокруг */
@keyframes notes-float-remember {
  0% { opacity: 0; transform: translateX(-12px) scale(0.94); }
  1.5%, 6.5% { opacity: 1; transform: none; }
  8.5%, 100% { opacity: 0; transform: translateX(-12px) scale(0.94); }
}

@keyframes notes-float-forget {
  0%, 38% { opacity: 0; transform: translateX(-12px) scale(0.94); }
  40.5%, 50% { opacity: 1; transform: none; }
  52.5%, 100% { opacity: 0; transform: translateX(-12px) scale(0.94); }
}

@keyframes notes-float-time {
  0%, 46% { opacity: 0; transform: translateX(12px) scale(0.94); }
  48.5%, 56% { opacity: 1; transform: none; }
  58.5%, 100% { opacity: 0; transform: translateX(12px) scale(0.94); }
}

@keyframes notes-float-result {
  0%, 81% { opacity: 0; transform: translateX(12px) scale(0.94); }
  83.5%, 95% { opacity: 1; transform: none; }
  97.5%, 100% { opacity: 0; transform: translateX(12px) scale(0.94); }
}

/* Шаги */
@keyframes notes-step-1 {
  0%, 35%, 99%, 100% { background: #fff; color: #245ef2; }
  36.5%, 97% { background: transparent; color: rgba(255, 255, 255, 0.76); }
}

@keyframes notes-step-2 {
  0%, 35%, 53%, 100% { background: transparent; color: rgba(255, 255, 255, 0.76); }
  36.5%, 51.5% { background: #fff; color: #245ef2; }
}

@keyframes notes-step-3 {
  0%, 51.5%, 98%, 100% { background: transparent; color: rgba(255, 255, 255, 0.76); }
  53%, 96.5% { background: #fff; color: #245ef2; }
}

/* ==========================================================================
   Секции страницы
   ========================================================================== */

/* Как это работает: «путь одной мысли».
   Одна и та же фраза проходит три состояния: голос → заметка → дело.
   За сценами — пунктирная линия; точка видна только в просветах между сценами,
   будто мысль перелетает из одной сцены в другую. В конце ставится галочка.
   Цикл анимаций общий (7s), чтобы точка и галочка были синхронны. */
.notes-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 52px;
}

.notes-path::before {
  position: absolute;
  top: 88px;
  right: 8%;
  left: 8%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--brand-blue) 0 8px, transparent 8px 16px);
  content: "";
  opacity: 0.32;
}

.notes-path-dot {
  position: absolute;
  z-index: 0;
  top: 83px;
  left: 8%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 0 0 6px var(--brand-blue-soft);
  animation: notes-path-travel 7s ease-in-out infinite;
}

@keyframes notes-path-travel {
  0%, 8% { left: 8%; }
  42%, 52% { left: calc(50% - 6px); }
  88%, 100% { left: calc(92% - 12px); }
}

.notes-path-step {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
}

.notes-path-stage {
  position: relative;
  z-index: 1;
  display: grid;
  height: 176px;
  place-items: center;
  padding: 16px;
  border: 1px solid var(--warm-line);
  border-radius: 26px;
  background: linear-gradient(160deg, var(--brand-blue-soft), var(--warm-paper-strong) 72%);
  box-shadow: 0 12px 30px rgba(26, 36, 67, 0.045);
}

.notes-path-step:nth-child(3) .notes-path-stage {
  border-color: rgba(82, 116, 96, 0.16);
  background: linear-gradient(160deg, var(--warm-sage-soft), var(--warm-paper-strong) 72%);
}

.notes-path-step:nth-child(4) .notes-path-stage {
  border-color: rgba(255, 207, 74, 0.34);
  background: linear-gradient(160deg, rgba(255, 207, 74, 0.2), var(--warm-paper-strong) 72%);
}

/* Сцена 1: голос */
.notes-path-voice {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 12px;
}

.notes-path-wave {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 3px;
}

.notes-path-wave span {
  display: block;
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--brand-blue);
  animation: notes-path-wave 1.1s ease-in-out infinite;
}

.notes-path-wave span:nth-child(odd) { animation-delay: -0.4s; }
.notes-path-wave span:nth-child(3n) { animation-delay: -0.7s; }

@keyframes notes-path-wave {
  0%, 100% { height: 8px; }
  50% { height: 32px; }
}

.notes-path-say {
  max-width: 24ch;
  color: var(--warm-ink-soft);
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.45;
  text-align: center;
}

/* Сцена 2: заметка */
.notes-path-note {
  display: grid;
  width: 100%;
  max-width: 250px;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: var(--warm-paper-strong);
  box-shadow: 0 6px 18px rgba(26, 36, 67, 0.06);
}

.notes-path-note small {
  color: var(--warm-muted);
  font-size: 11px;
}

.notes-path-note p {
  margin: 0;
  color: var(--warm-ink);
  font-size: 13px;
  line-height: 1.45;
}

.notes-path-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-self: start;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--warm-sage-soft);
  color: var(--warm-sage-deep);
  font-size: 10px;
  font-weight: 750;
}

/* Сцена 3: дело */
.notes-path-task {
  display: grid;
  width: 100%;
  max-width: 250px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 4px 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--warm-paper-strong);
  box-shadow: 0 6px 18px rgba(26, 36, 67, 0.06);
}

.notes-path-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--brand-yellow);
  border-radius: 7px;
  animation: notes-path-check-box 7s infinite;
}

.notes-path-check::after {
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #3d2e05;
  border-left: 2px solid #3d2e05;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
  animation: notes-path-check-tick 7s infinite;
}

@keyframes notes-path-check-box {
  0%, 82% { background: transparent; }
  88%, 100% { background: var(--brand-yellow); }
}

@keyframes notes-path-check-tick {
  0%, 82% { opacity: 0; }
  88%, 100% { opacity: 1; }
}

.notes-path-task p {
  margin: 1px 0 0;
  color: var(--warm-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.notes-path-task small {
  grid-column: 2;
  color: #8b6810;
  font-size: 11px;
}

/* Подписи шагов */
.notes-path-time {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-self: start;
  margin-top: 6px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 10px;
  font-weight: 750;
}

.notes-path-step:nth-child(3) .notes-path-time {
  background: var(--warm-sage-soft);
  color: var(--warm-sage-deep);
}

.notes-path-step:nth-child(4) .notes-path-time {
  background: rgba(255, 207, 74, 0.24);
  color: #8b6810;
}

.notes-path-step h3 {
  margin: 4px 0 0;
  color: var(--warm-ink);
  font-family: "Onest", "Inter", sans-serif;
  font-size: 24px;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.notes-path-step > p {
  max-width: 42ch;
  margin: 0;
  color: var(--warm-muted);
  font-size: 13px;
  line-height: 1.58;
}

/* Одна заметка — восемь вариантов: бенто-сетка.
   Арт раздела — фон в правом нижнем углу, частично срезан краем;
   широкие и узкие карточки чередуются в шахматном порядке. */
.notes-bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 12px;
  margin-top: 48px;
}

.notes-bento-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(47, 107, 255, 0.08);
  border-radius: 26px;
  background: linear-gradient(160deg, #fff 0%, #fff 38%, var(--tint) 100%);
  box-shadow: 0 12px 30px rgba(26, 36, 67, 0.05);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.notes-bento-card.is-wide {
  grid-column: span 2;
}

.notes-bento-text {
  position: relative;
  z-index: 1;
}

.notes-bento-card h3 {
  margin: 0 0 8px;
  color: var(--warm-ink);
  font-family: "Onest", "Inter", sans-serif;
  font-size: 21px;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.notes-bento-card p {
  margin: 0;
  color: var(--warm-muted);
  font-size: 13px;
  line-height: 1.55;
}

.notes-bento-card img {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 118px;
  height: 118px;
  object-fit: contain;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.notes-bento-card.is-wide .notes-bento-text {
  max-width: 55%;
}

.notes-bento-card.is-wide h3 {
  font-size: 28px;
}

.notes-bento-card.is-wide p {
  font-size: 14px;
}

.notes-bento-card.is-wide img {
  right: -6px;
  bottom: -34px;
  width: 220px;
  height: 220px;
}

@media (hover: hover) and (pointer: fine) {
  .notes-bento-card:hover {
    box-shadow: 0 24px 52px rgba(26, 36, 67, 0.12);
    transform: translateY(-4px);
  }

  .notes-bento-card:hover img {
    transform: translate(-4px, -6px) rotate(-3deg) scale(1.04);
  }
}

@media (max-width: 1100px) {
  .notes-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: dense;
  }
}

@media (max-width: 680px) {
  .notes-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    margin-top: 34px;
  }

  .notes-bento-card,
  .notes-bento-card.is-wide {
    grid-column: auto;
    min-height: 168px;
    padding: 22px 132px 22px 22px;
  }

  .notes-bento-card.is-wide .notes-bento-text {
    max-width: none;
  }

  .notes-bento-card.is-wide h3 {
    font-size: 22px;
  }

  .notes-bento-card.is-wide p {
    font-size: 13px;
  }

  .notes-bento-card img,
  .notes-bento-card.is-wide img {
    right: -14px;
    bottom: -18px;
    width: 128px;
    height: 128px;
  }
}

/* Сценарии из жизни: фраза → результат */








/* Появление при прокрутке (включается scripts в notes.html) */
.js-reveal .notes-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js-reveal .notes-reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   Обучающаяся автозамена (VoiceCorrectionTranscript)
   Исправленное вручную слово — #176B3A, сплошное подчёркивание 1.5;
   исправленное автоматически — #4F8B69, пунктир.
   ========================================================================== */

.ac-layout {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: 48px;
}

.ac-demo {
  --ac-cycle: 14s;

  min-height: 676px;
  justify-self: center;
}

.ac-popup {
  transform: none;
  animation: none;
}

.ac-dim {
  opacity: 0.35;
}

.ac-seg {
  color: var(--ios-blue);
}

.ac-seg-on {
  border-color: rgba(255, 207, 74, 0.28) !important;
  background: rgba(255, 207, 74, 0.18);
  color: #ffcf4a;
}

.ac-rec-done {
  background: rgba(0, 122, 255, 0.14);
  color: var(--ios-blue);
}

.ac-wave {
  display: flex;
  height: 20px;
  align-items: center;
  justify-content: space-between;
  grid-column: 3;
}

.ac-wave i {
  width: 1.5px;
  height: 22%;
  border-radius: 2px;
  background: var(--ios-blue);
}

.ac-wave i:nth-child(3n) { height: 55%; }
.ac-wave i:nth-child(4n) { height: 80%; }

.ac-timer {
  grid-column: 4;
  color: var(--ios-blue);
  font-size: 14px;
  font-weight: 600;
}

.ac-actions {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.ac-transcripts {
  position: relative;
  height: 100px;
}

.ac-popup .voice-transcript {
  position: absolute;
  inset: 0;
}

.ac-popup .voice-transcript span {
  opacity: 1;
  animation: none;
}

.ac-popup .ac-t1 {
  animation: ac-t1 var(--ac-cycle) ease-in-out infinite;
}

.ac-popup .ac-t2 {
  opacity: 0;
  animation: ac-t2 var(--ac-cycle) ease-in-out infinite;
}

.ac-popup .voice-transcript .ac-word {
  position: relative;
  display: inline;
  border-radius: 6px;
  animation: ac-word-tap var(--ac-cycle) ease-in-out infinite;
}

.ac-popup .voice-transcript .ac-wrong {
  opacity: 1;
  animation: ac-wrong var(--ac-cycle) linear infinite;
}

.ac-popup .voice-transcript .ac-fixed {
  font-size: 0;
  color: #176b3a;
  text-decoration: underline solid 1.5px;
  text-underline-offset: 3px;
  opacity: 0;
  animation: ac-fixed var(--ac-cycle) linear infinite;
}

.ac-popup .voice-transcript .ac-word::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.28);
  content: "";
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: ac-tap var(--ac-cycle) ease-out infinite;
}

.ac-popup .voice-transcript .ac-auto {
  border-radius: 6px;
  color: #4f8b69;
  text-decoration: underline dotted 1px;
  text-underline-offset: 3px;
  animation: ac-auto var(--ac-cycle) ease-in-out infinite;
}

.ac-popover {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 124px;
  left: 16px;
  padding: 11px;
  border: 1px solid #d8d8dc;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: translateY(6px);
  animation: ac-popover var(--ac-cycle) ease-out infinite;
}

.ac-popover > b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.ac-popover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 7px;
}

.ac-field {
  position: relative;
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 7px;
  font-size: 16px;
}

.ac-placeholder {
  position: absolute;
  left: 10px;
  color: rgba(60, 60, 67, 0.3);
  animation: ac-placeholder var(--ac-cycle) step-end infinite;
}

.ac-typed {
  display: inline-block;
  overflow: hidden;
  width: 0;
  white-space: nowrap;
  border-right: 2px solid var(--ios-blue);
  animation: ac-type var(--ac-cycle) steps(7, end) infinite;
}

.ac-apply {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--ios-blue);
  color: #fff;
  font-size: 16px;
  animation: ac-apply var(--ac-cycle) ease-in-out infinite;
}

.ac-popover-arrow {
  position: absolute;
  bottom: -9px;
  left: 168px;
  width: 16px;
  height: 16px;
  border-right: 1px solid #d8d8dc;
  border-bottom: 1px solid #d8d8dc;
  background: #fff;
  transform: rotate(45deg);
}

.ac-tap {
  display: none;
}

.ac-float-next {
  top: 120px;
  right: 14px;
  animation: ac-float-next var(--ac-cycle) ease-out infinite;
}

.ac-float-next > span:first-child {
  background: rgba(255, 207, 74, 0.28);
}

.ac-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-step {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(47, 107, 255, 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  opacity: 0.5;
  transition: none;
}

.ac-step > span {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 10px;
  font-weight: 800;
}

.ac-step h3 {
  margin: 4px 0 7px;
  color: var(--warm-ink);
  font-family: "Onest", "Inter", sans-serif;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.ac-step p {
  margin: 0;
  color: var(--warm-muted);
  font-size: 13px;
  line-height: 1.55;
}

.ac-step-1 { animation: ac-step-1 14s ease-in-out infinite; }
.ac-step-2 { animation: ac-step-2 14s ease-in-out infinite; }
.ac-step-3 { animation: ac-step-3 14s ease-in-out infinite; }

@keyframes ac-t1 {
  0%, 52% { opacity: 1; }
  55%, 97% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes ac-t2 {
  0%, 56% { opacity: 0; }
  59%, 96% { opacity: 1; }
  99%, 100% { opacity: 0; }
}

@keyframes ac-tap {
  0%, 7% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  8.5% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  11%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

@keyframes ac-word-tap {
  0%, 7.5% { background: transparent; }
  9%, 31% { background: rgba(0, 122, 255, 0.14); }
  33%, 100% { background: transparent; }
}

@keyframes ac-wrong {
  0%, 31.9% { opacity: 1; font-size: 16px; }
  32%, 99.9% { opacity: 0; font-size: 0; }
  100% { opacity: 1; font-size: 16px; }
}

@keyframes ac-fixed {
  0%, 31.9% { opacity: 0; font-size: 0; }
  32%, 99.9% { opacity: 1; font-size: 16px; }
  100% { opacity: 0; font-size: 0; }
}

@keyframes ac-popover {
  0%, 10% { opacity: 0; transform: translateY(6px); }
  12%, 31% { opacity: 1; transform: none; }
  33%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes ac-placeholder {
  0% { opacity: 1; }
  15% { opacity: 0; }
  33% { opacity: 1; }
}

@keyframes ac-type {
  0%, 15% { width: 0; }
  25%, 33% { width: 4.6em; }
  34%, 100% { width: 0; }
}

@keyframes ac-apply {
  0%, 28% { filter: none; transform: scale(1); }
  29.5% { filter: brightness(0.8); transform: scale(0.95); }
  31%, 100% { filter: none; transform: scale(1); }
}

@keyframes ac-auto {
  0%, 60% { background: transparent; }
  63%, 78% { background: rgba(79, 139, 105, 0.16); }
  82%, 100% { background: transparent; }
}

@keyframes ac-float-next {
  0%, 50% { opacity: 0; transform: translateX(12px) scale(0.94); }
  53%, 66% { opacity: 1; transform: none; }
  70%, 100% { opacity: 0; transform: translateX(12px) scale(0.94); }
}

@keyframes ac-step-1 {
  0%, 12%, 100% { opacity: 1; background: #fff; border-color: rgba(47, 107, 255, 0.3); }
  15%, 97% { opacity: 0.5; background: rgba(255, 255, 255, 0.55); border-color: rgba(47, 107, 255, 0.11); }
}

@keyframes ac-step-2 {
  0%, 12%, 52%, 100% { opacity: 0.5; background: rgba(255, 255, 255, 0.55); border-color: rgba(47, 107, 255, 0.11); }
  15%, 49% { opacity: 1; background: #fff; border-color: rgba(47, 107, 255, 0.3); }
}

@keyframes ac-step-3 {
  0%, 52%, 100% { opacity: 0.5; background: rgba(255, 255, 255, 0.55); border-color: rgba(47, 107, 255, 0.11); }
  55%, 96% { opacity: 1; background: #fff; border-color: rgba(47, 107, 255, 0.3); }
}

@media (max-width: 980px) {
  .ac-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 980px) {
  .notes-path {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-left: 28px;
  }

  .notes-path::before {
    top: 20px;
    right: auto;
    bottom: 20px;
    left: 8px;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--brand-blue) 0 8px, transparent 8px 16px);
  }

  .notes-path-dot {
    display: none;
  }

  .notes-path-stage {
    max-width: 420px;
  }
}

@media (max-width: 680px) {
  .notes-path {
    margin-top: 34px;
  }
}

@media (max-width: 480px) {
  .notes-demo {
    min-height: 680px;
  }

  .notes-float {
    transform-origin: center;
    scale: 0.88;
  }

  .notes-float-remember,
  .notes-float-forget {
    left: 6px;
  }

  .notes-float-time,
  .notes-float-result {
    right: 6px;
  }
}

/* Без анимации — показываем итог сценария (готовый список) статично */
@media (prefers-reduced-motion: reduce) {
  .notes-path-dot,
  .notes-path-wave span,
  .notes-path-check,
  .notes-path-check::after {
    animation: none;
  }

  .notes-path-wave span {
    height: 18px;
  }

  .notes-path-check {
    background: var(--brand-yellow);
  }

  .notes-path-check::after {
    opacity: 1;
  }

  .notes-demo *,
  .notes-demo *::before,
  .notes-demo *::after {
    animation: none !important;
  }

  .ac-step {
    opacity: 1 !important;
  }

  .ac-popup .voice-transcript .ac-fixed {
    opacity: 1 !important;
    font-size: 16px !important;
  }

  .ac-popup .voice-transcript .ac-wrong {
    display: none;
  }

  .ac-popover {
    opacity: 0 !important;
  }

  .scene-list,
  .item-card,
  .notes-float-result {
    opacity: 1 !important;
    transform: none !important;
  }

  .notes-step-3 {
    background: #fff;
    color: #245ef2;
  }

  .js-reveal .notes-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
