/* =========================================================================
   NetWeb · tokens.css · v1.0 · 2026-11-05
   Единый источник токенов и базовых компонентов: Mini App в Telegram,
   PWA/сайт вне Telegram, итоговая доска (design/final).

   Как это устроено
   1. Схема. color-scheme + light-dark(): вне Telegram тема берётся из системы
      (prefers-color-scheme), внутри — из Telegram.WebApp.colorScheme
      (tg-theme.js ставит data-scheme="light|dark" на <html>).
   2. Запасная палитра --nw-fb-* — только для сайта/PWA вне Telegram:
      светлая «как iOS», тёмная «графит».
   3. Семантика --nw-* = themeParams Telegram (--tg-theme-*), иначе запасная.
      Внутри Telegram фон, текст, ссылки и кнопки — ТОЛЬКО из темы пользователя.
   4. Бренд — один акцент (терракота) для кольца срока, выбранных чипов и вкладки.
   5. Типографика (rem, системный шрифт), отступы, радиусы, движение, слои.
   6–7. Базовые компоненты телефона и сайта.

   ВАЖНО: семантика объявлена на `:root, .nw-theme`. Любой контейнер, который
   задаёт свои --tg-theme-* (кадр доски, превью темы), должен иметь класс
   .nw-theme — иначе var() разрешится по значениям :root.
   Требуется Safari 17.5+ / Chrome 123+ (light-dark, color-mix).
   ========================================================================= */

/* ---------- 1. Схема ---------- */
:root { color-scheme: light dark; }
[data-scheme="light"] { color-scheme: light; }
[data-scheme="dark"]  { color-scheme: dark; }

/* ---------- 2–5. Токены ---------- */
:root, .nw-theme {
  /* 2. Запасная палитра (вне Telegram). light | dark */
  --nw-fb-bg:             light-dark(#FFFFFF, #16181C);
  --nw-fb-secondary-bg:   light-dark(#F2F2F7, #0E0F11);
  --nw-fb-section-bg:     light-dark(#FFFFFF, #16181C);
  --nw-fb-text:           light-dark(#1C1C1E, #E8EAED);
  --nw-fb-hint:           light-dark(#8E8E93, #8B9098);
  --nw-fb-link:           var(--nw-accent-ink);   /* вне Telegram ссылки — бренд */
  --nw-fb-button:         var(--nw-accent-fill);
  --nw-fb-button-text:    #FFFFFF;
  --nw-fb-section-header: light-dark(#6D6D72, #9AA0A8);
  --nw-fb-destructive:    light-dark(#C4321F, #FF6B5E);
  --nw-fb-separator:      light-dark(#E3E3E8, #2A2E35);

  /* 3. themeParams → семантика */
  --nw-bg:             var(--tg-theme-bg-color, var(--nw-fb-bg));
  --nw-secondary-bg:   var(--tg-theme-secondary-bg-color, var(--nw-fb-secondary-bg));
  --nw-section-bg:     var(--tg-theme-section-bg-color, var(--nw-fb-section-bg));
  --nw-text:           var(--tg-theme-text-color, var(--nw-fb-text));
  --nw-hint:           var(--tg-theme-hint-color, var(--nw-fb-hint));
  --nw-link:           var(--tg-theme-link-color, var(--nw-fb-link));
  --nw-button:         var(--tg-theme-button-color, var(--nw-fb-button));
  --nw-button-text:    var(--tg-theme-button-text-color, var(--nw-fb-button-text));
  --nw-section-header: var(--tg-theme-section-header-text-color, var(--nw-fb-section-header));
  --nw-destructive:    var(--tg-theme-destructive-text-color, var(--nw-fb-destructive));
  --nw-separator:      var(--tg-theme-section-separator-color, var(--nw-fb-separator));

  /* Каркас iOS «inset grouped»: страница темнее карточек.
     Страж темы (tg-theme.js) переключает через data-nw-page / data-nw-card. */
  --nw-page: var(--nw-secondary-bg);
  --nw-card: var(--nw-section-bg);
  --nw-bottom-bar-bg: var(--tg-theme-bottom-bar-bg-color, var(--nw-page));

  /* Производные (считаются от темы, поэтому работают в любой теме Telegram) */
  --nw-text-2:    color-mix(in srgb, var(--nw-text) 66%, var(--nw-card));  /* вторые строки ≥4.5:1 */
  --nw-text-3:    var(--nw-hint);                                          /* только иконки, плейсхолдер */
  --nw-link-ink:  color-mix(in oklab, var(--nw-link) 80%, var(--nw-text)); /* мелкий текст-ссылка ≥4.5:1 */
  --nw-link-tint: color-mix(in srgb, var(--nw-link) 12%, var(--nw-card));
  --nw-fill:      color-mix(in srgb, var(--nw-hint) 15%, transparent);
  --nw-fill-2:    color-mix(in srgb, var(--nw-hint) 26%, transparent);
  --nw-sep:       color-mix(in srgb, var(--nw-text) 13%, transparent);
  --nw-glass:     color-mix(in srgb, var(--nw-card) 84%, transparent);
  --nw-glass-line: color-mix(in srgb, var(--nw-text) 9%, transparent);
  --nw-dim:       light-dark(rgba(0,0,0,.32), rgba(0,0,0,.56));
  --nw-ring-track: color-mix(in srgb, var(--nw-hint) 28%, transparent);
  --nw-ring-idle:  color-mix(in srgb, var(--nw-hint) 75%, var(--nw-card));

  /* 4. Бренд: терракота. Один акцент на всё приложение. */
  --nw-accent:      light-dark(#B4532A, #E07B4C); /* кольцо, обводки, иконки */
  --nw-accent-ink:  light-dark(#A3461F, #EC9064); /* текст акцентом */
  --nw-accent-fill: #B4532A;                      /* заливка под белым текстом (4.99:1) */
  --nw-on-accent:   #FFFFFF;
  --nw-accent-tint: color-mix(in srgb, var(--nw-accent) 14%, var(--nw-card));
  --nw-mark:        color-mix(in srgb, var(--nw-accent) 24%, transparent); /* подсветка совпадения */
  /* Действия свайпа (не статусы): «Был контакт» и «Отложить». Белый текст ≥5:1. */
  --nw-swipe-done:  #1E7B3A;
  --nw-swipe-later: #5E6673;
  /* Снэкбар: инверсная плашка, одинакова во всех темах */
  --nw-snack-bg:    light-dark(rgba(28,28,30,.94), rgba(62,62,66,.97));
  --nw-snack-text:  #FFFFFF;
  --nw-snack-link:  #8CC2FF;

  /* 5. Типографика: системный шрифт, размеры iOS Dynamic Type (Large) в rem */
  --nw-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nw-fs-large: 2.125rem;   --nw-lh-large: 2.5625rem;  /* 34/41 bold   — заголовок вкладки */
  --nw-fs-title2: 1.375rem;  --nw-lh-title2: 1.75rem;   /* 22/28 bold   — имя в карточке на сайте, пустые состояния */
  --nw-fs-title3: 1.25rem;   --nw-lh-title3: 1.5625rem; /* 20/25 bold   — заголовок секции */
  --nw-fs-name:  1.5rem;     --nw-lh-name: 1.8125rem;   /* 24/29 bold   — имя в карточке */
  --nw-fs-body:  1.0625rem;  --nw-lh-body: 1.375rem;    /* 17/22        — имя в строке, текст */
  --nw-fs-callout: 1rem;     --nw-lh-callout: 1.3125rem;/* 16/21        */
  --nw-fs-sub:   .9375rem;   --nw-lh-sub: 1.25rem;      /* 15/20        — вторая и третья строка */
  --nw-fs-foot:  .8125rem;   --nw-lh-foot: 1.125rem;    /* 13/18        — сноски, счётчик поиска */
  --nw-fs-cap:   .75rem;     --nw-lh-cap: 1rem;         /* 12/16        — подписи ячеек */
  --nw-fs-cap2:  .6875rem;   --nw-lh-cap2: .8125rem;    /* 11/13        — подписи вкладок, метки */
  --nw-w-regular: 400; --nw-w-medium: 500; --nw-w-semibold: 600; --nw-w-bold: 700;
  --nw-track-tight: -0.02em; --nw-track: -0.005em;

  /* Отступы: шаг 4 */
  --nw-sp-1: 4px; --nw-sp-2: 8px; --nw-sp-3: 12px; --nw-sp-4: 16px; --nw-sp-5: 20px;
  --nw-sp-6: 24px; --nw-sp-8: 32px; --nw-sp-10: 40px; --nw-sp-12: 48px;
  --nw-gutter: 16px;

  /* Размеры и зоны касания */
  --nw-hit: 44px;  --nw-row-min: 56px;  --nw-field-h: 44px;  --nw-chip-h: 34px;
  --nw-avatar: 44px;  --nw-channel: 40px;  --nw-mainbtn-h: 50px;
  --nw-tabbar-h: 64px;  --nw-tabbar-gap: 26px;  /* от низа экрана, над индикатором */
  --nw-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --nw-tabbar-clear: calc(var(--nw-tabbar-h) + var(--nw-tabbar-gap) + 24px); /* нижний отступ контента */
  --nw-kb-h: 0px; /* высота клавиатуры: ставит JS по visualViewport */

  /* Радиусы */
  --nw-r-xs: 6px; --nw-r-sm: 10px; --nw-r-md: 14px; --nw-r-lg: 18px; --nw-r-xl: 22px;
  --nw-r-sheet: 30px; --nw-r-full: 999px;

  /* Тени и стекло */
  --nw-shadow-1: 0 1px 2px light-dark(rgba(0,0,0,.05), rgba(0,0,0,.4));
  --nw-shadow-float: 0 8px 28px light-dark(rgba(0,0,0,.10), rgba(0,0,0,.55)), 0 1px 3px light-dark(rgba(0,0,0,.06), rgba(0,0,0,.4));
  --nw-shadow-sheet: 0 -6px 30px light-dark(rgba(0,0,0,.14), rgba(0,0,0,.6));
  --nw-blur: blur(22px) saturate(1.8);

  /* Движение */
  --nw-ease: cubic-bezier(.2,.8,.2,1);
  --nw-ease-ios: cubic-bezier(.32,.72,0,1);      /* push, лист */
  --nw-dur-press: 120ms; --nw-dur-fast: 160ms; --nw-dur-push: 240ms; --nw-dur-sheet: 320ms;
  --nw-snack-life: 5s;                            /* «Отменить» живёт 5 секунд */

  /* Слои */
  --nw-z-sticky: 10; --nw-z-fade: 24; --nw-z-tabbar: 30; --nw-z-dock: 32; --nw-z-snack: 40;
  --nw-z-dim: 50; --nw-z-sheet: 60; --nw-z-toast: 70; --nw-z-cmdk: 90;

  /* Сайт (ноутбук) */
  --nw-d-top-h: 56px; --nw-d-side-w: 248px; --nw-d-pane-w: 440px; --nw-d-row-h: 40px;
  --nw-d-fs: .84375rem; --nw-d-lh: 1.25rem;   /* 13.5/20 */
  --nw-d-fs-sm: .75rem; --nw-d-fs-title: 1.375rem;
  --nw-d-side-bg: light-dark(#F6F6F8, #0E0F11);
  --nw-d-raised:  light-dark(#FFFFFF, #1E2126);
  --nw-d-row-line: light-dark(#EFEFF2, #22252B);
  --nw-d-group-bg: light-dark(#FAFAFB, #1A1C21);
}

/* Страж темы: какой цвет из themeParams — страница, какой — карточка */
[data-nw-page="bg"]        { --nw-page: var(--nw-bg); }
[data-nw-card="bg"]        { --nw-card: var(--nw-bg); }
[data-nw-card="secondary"] { --nw-card: var(--nw-secondary-bg); }

@media (prefers-reduced-motion: reduce) {
  :root, .nw-theme { --nw-dur-press: 1ms; --nw-dur-fast: 1ms; --nw-dur-push: 1ms; --nw-dur-sheet: 1ms; }
}

/* =========================================================================
   6. Компоненты телефона (Mini App и PWA)
   ========================================================================= */
.nw-app {
  font-family: var(--nw-font); font-size: var(--nw-fs-body); line-height: var(--nw-lh-body);
  color: var(--nw-text); background: var(--nw-page); letter-spacing: var(--nw-track);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums;
}
.nw-app *, .nw-app *::before, .nw-app *::after { box-sizing: border-box; }
/* Сброс кнопок с нулевой специфичностью: классы компонентов всегда сильнее */
:where(.nw-app, .nw-desk) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.nw-app :is(button, [role="button"], .nw-chip, .nw-tab, .nw-row) { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.nw-app :is([aria-disabled="true"], :disabled) { opacity: .45; pointer-events: none; }
.nw-num { font-variant-numeric: tabular-nums; }

/* Иконки: спрайт prototype/shared/icons.svg, 24 px, линия 1.9 */
.nw-ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nw-ic--16 { width: 16px; height: 16px; } .nw-ic--18 { width: 18px; height: 18px; } .nw-ic--20 { width: 20px; height: 20px; }
.nw-ic--22 { width: 22px; height: 22px; } .nw-ic--28 { width: 28px; height: 28px; }

/* Экран и типографика */
.nw-screen { padding: 6px var(--nw-gutter) var(--nw-tabbar-clear); }
.nw-screen--pushed { padding-bottom: calc(var(--nw-mainbtn-h) + 58px); } /* под BottomButton */
.nw-eyebrow { font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); font-weight: var(--nw-w-medium); color: var(--nw-text-2); margin: 6px 0 0 2px; }
.nw-large-title { font-size: var(--nw-fs-large); line-height: var(--nw-lh-large); font-weight: var(--nw-w-bold); letter-spacing: var(--nw-track-tight); margin: 0 0 12px 1px; }
.nw-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 2px 9px; }
.nw-section-head h3 { margin: 0; font-size: var(--nw-fs-title3); line-height: var(--nw-lh-title3); font-weight: var(--nw-w-bold); letter-spacing: -0.015em; }
.nw-section-head h3 span { color: var(--nw-text-2); font-weight: var(--nw-w-medium); }
.nw-section-head--sm { margin: 18px 4px 7px; }
.nw-section-head--sm h3 { font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); font-weight: var(--nw-w-semibold); color: var(--nw-text-2); letter-spacing: 0; }
.nw-section-head--sm h3 b { color: var(--nw-text); font-weight: var(--nw-w-semibold); }
.nw-link { color: var(--nw-link-ink); font-size: var(--nw-fs-sub); font-weight: var(--nw-w-medium); text-decoration: none; white-space: nowrap; }
.nw-link--quiet { color: var(--nw-text-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; font-weight: var(--nw-w-regular); }
.nw-footnote { font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); margin: 8px 4px 0; }
.nw-t2 { color: var(--nw-text-2); }

/* Inset-группа и строки */
.nw-list { background: var(--nw-card); border-radius: var(--nw-r-lg); overflow: hidden; position: relative; }
.nw-row { display: flex; align-items: center; gap: 13px; padding: 11px 14px 11px 16px; min-height: var(--nw-row-min); position: relative; background: var(--nw-card); }
.nw-row + .nw-row::before, .nw-row + .nw-swipe::before, .nw-swipe + .nw-row::before, .nw-swipe + .nw-swipe::before {
  content: ""; position: absolute; z-index: 2; top: 0; right: 0; left: var(--nw-sep-inset, 70px); height: .5px; background: var(--nw-sep); }
.nw-swipe { position: relative; }
.nw-row:active { background: color-mix(in srgb, var(--nw-hint) 14%, var(--nw-card)); }
.nw-row__body { flex: 1; min-width: 0; }
.nw-row__title { font-size: var(--nw-fs-body); line-height: var(--nw-lh-body); font-weight: var(--nw-w-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.nw-row__title--regular { font-weight: var(--nw-w-regular); }
.nw-row__sub { font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); color: var(--nw-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-row__sub b, .nw-city { color: var(--nw-text); font-weight: var(--nw-w-medium); }
.nw-row__meta { font-size: .875rem; line-height: 1.125rem; color: var(--nw-text-2); white-space: nowrap; flex: none; }
.nw-row__value { color: var(--nw-text-2); font-size: var(--nw-fs-body); white-space: nowrap; flex: none; }
.nw-row__chev { color: var(--nw-text-3); flex: none; width: 18px; height: 18px; }
.nw-row__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--nw-fill); color: var(--nw-text-2); }

/* Строка человека «Сегодня» = строка списка чатов Telegram:
   срок — на месте времени (серым), кнопка канала — на месте бейджа, повод — 3-я строка */
.nw-person { align-items: flex-start; padding: 13px 14px 13px 18px; --nw-sep-inset: 86px; }
.nw-person > .nw-avatar { margin-top: 4px; }
.nw-person__body { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 10px; }
.nw-person__top { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.nw-person__top .nw-row__title { flex: 1; min-width: 0; }
.nw-person__when { font-size: .875rem; line-height: 1.125rem; color: var(--nw-text-2); white-space: nowrap; flex: none; padding-top: 2px; }
.nw-person__l2 { grid-column: 1; }
.nw-person__l3 { grid-column: 1; margin-top: 1px; font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); color: var(--nw-text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nw-person__act { grid-column: 2; grid-row: 2 / span 2; align-self: end; justify-self: end; }
.nw-person__extra { grid-column: 1 / -1; margin-top: 10px; }
.nw-person--check .nw-person__top { grid-column: 1; }
.nw-person--check .nw-person__act { grid-row: 1 / span 3; align-self: center; }

/* Аватар + кольцо срока (фирменный приём).
   --p — доля пройденного пути до конца окна, 0–100. Акцент только если окно открыто. */
.nw-avatar { --s: var(--nw-avatar); --h: 210; --p: 0; position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 50%; margin: 5px; }
.nw-avatar > i { font-style: normal; position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  font-weight: var(--nw-w-semibold); font-size: calc(var(--s) * .36); letter-spacing: .02em;
  background: light-dark(hsl(var(--h) 30% 89%), hsl(var(--h) 16% 26%)); color: light-dark(hsl(var(--h) 32% 30%), hsl(var(--h) 40% 84%)); }
.nw-avatar--ring::before { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--nw-ring-color, var(--nw-ring-idle)) calc(var(--p) * 1%), var(--nw-ring-track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.4px)); }
.nw-avatar--ring.is-open { --nw-ring-color: var(--nw-accent); }
.nw-avatar--sm { --s: 40px; margin: 4px; }
.nw-avatar--sm.nw-avatar--ring::before { inset: -4px; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.9px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.9px)); }
.nw-avatar--xs { --s: 28px; margin: 0; }
.nw-avatar--hero { --s: 72px; margin: 6px; }
.nw-avatar--hero.nw-avatar--ring::before { inset: -6px; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.9px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.9px)); }
.nw-avatar__badge { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--nw-card); display: grid; place-items: center; color: var(--nw-accent-ink); }
.nw-avatar__badge .nw-ic { width: 13px; height: 13px; stroke-width: 2.3; }
.nw-avatar__badge--done { background: var(--nw-accent-fill); color: var(--nw-on-accent); box-shadow: 0 0 0 2px var(--nw-card); }

/* Кнопка канала (одна в строке — предпочтительный канал) */
.nw-channel { position: relative; width: var(--nw-channel); height: var(--nw-channel); border-radius: 50%; display: grid; place-items: center; background: var(--nw-link-tint); color: var(--nw-link); flex: none; }
.nw-channel::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; } /* зона касания 44 */
.nw-channel .nw-ic { width: 21px; height: 21px; }
.nw-channel:active { transform: scale(.94); transition: transform var(--nw-dur-press) var(--nw-ease); }

/* Отложенная попытка контакта: «Написали через WhatsApp в 8:52 — связались?» */
.nw-attempt { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--nw-fill); font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); }
.nw-attempt b { color: var(--nw-text); font-weight: var(--nw-w-semibold); }
.nw-attempt > span { flex: 1; min-width: 0; }

/* Капсула-действие */
.nw-pill { height: 32px; padding: 0 12px; border-radius: var(--nw-r-full); background: var(--nw-link-tint); color: var(--nw-link-ink); font-size: .90625rem; font-weight: var(--nw-w-semibold); display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; white-space: nowrap; position: relative; }
.nw-pill::after { content: ""; position: absolute; inset: -6px -2px; } /* зона касания 44 */
.nw-pill--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--nw-sep); color: var(--nw-text); font-weight: var(--nw-w-medium); }
.nw-pill--accent { background: var(--nw-accent-tint); color: var(--nw-accent-ink); }
.nw-pill--lg { height: 36px; padding: 0 14px; }
.nw-pill--sm { height: 30px; padding: 0 10px; font-size: .84375rem; gap: 4px; }

/* Чипы */
.nw-chip-row { display: flex; gap: 8px; overflow-x: auto; white-space: nowrap; margin: 0 calc(-1 * var(--nw-gutter)); padding: 0 var(--nw-gutter); scrollbar-width: none; }
.nw-chip-row::-webkit-scrollbar { display: none; }
.nw-chip-row--wrap { flex-wrap: wrap; overflow: visible; white-space: normal; margin: 0; padding: 0; }
.nw-chip { height: var(--nw-chip-h); padding: 0 13px; border-radius: var(--nw-r-full); background: var(--nw-card); box-shadow: inset 0 0 0 .5px var(--nw-sep);
  font-size: var(--nw-fs-sub); font-weight: var(--nw-w-medium); color: var(--nw-text); display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; position: relative; }
.nw-chip::after { content: ""; position: absolute; inset: -5px 0; } /* зона касания 44 */
.nw-chip__n { color: var(--nw-text-2); font-weight: var(--nw-w-regular); }
.nw-chip .nw-ic { width: 16px; height: 16px; color: var(--nw-text-2); }
.nw-chip.is-on { background: var(--nw-accent-tint); color: var(--nw-accent-ink); box-shadow: none; }
.nw-chip.is-on :is(.nw-chip__n, .nw-ic) { color: var(--nw-accent-ink); }
.nw-chip--suggest { box-shadow: inset 0 0 0 1.5px var(--nw-accent); }
.nw-chip--dashed { background: transparent; box-shadow: none; outline: 1px dashed var(--nw-fill-2); outline-offset: -1px; color: var(--nw-text-2); }
.nw-chip--sm { height: 30px; padding: 0 11px; font-size: .875rem; }
.nw-chip--on-page { background: var(--nw-card); }

/* Факт с подписью: «Группа Підприємці», «Близость Близкие» — разные поля, разные чипы */
.nw-fact { height: 30px; padding: 0 11px; border-radius: var(--nw-r-full); box-shadow: inset 0 0 0 1px var(--nw-sep); display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; white-space: nowrap; }
.nw-fact small { font-size: .875rem; color: var(--nw-text-2); }
.nw-fact b { font-weight: var(--nw-w-semibold); }

/* Поиск: поле сверху, iOS-вид без веб-рамки фокуса (только каретка и «очистить») */
.nw-search-row { display: flex; gap: 12px; align-items: center; }
.nw-search { flex: 1; min-width: 0; height: var(--nw-field-h); border-radius: var(--nw-r-xl); background: var(--nw-card); box-shadow: var(--nw-shadow-1), inset 0 0 0 .5px var(--nw-sep);
  display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; color: var(--nw-text-2); font-size: var(--nw-fs-body); }
.nw-search > .nw-ic { color: var(--nw-text-3); width: 20px; height: 20px; }
.nw-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--nw-text); padding: 0; caret-color: var(--nw-link); }
.nw-search input::placeholder { color: var(--nw-text-2); }
.nw-search :focus, .nw-search :focus-visible { outline: none; }
.nw-search__q { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--nw-text); white-space: nowrap; overflow: hidden; }
.nw-search__ph { color: var(--nw-text-2); }
.nw-search__clear { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--nw-hint) 70%, transparent); color: var(--nw-card); }
.nw-search__clear .nw-ic { width: 11px; height: 11px; stroke-width: 3; }
.nw-search__cancel { color: var(--nw-link-ink); font-size: var(--nw-fs-body); flex: none; }
.nw-caret { display: inline-block; width: 2px; height: 22px; border-radius: 1px; background: var(--nw-link); margin-left: -3px; }
/* Токен в поле: «Лондон ×» — найденный город превращается в фильтр сам */
.nw-token { height: 28px; padding: 0 6px 0 8px; border-radius: var(--nw-r-full); background: var(--nw-accent-tint); color: var(--nw-accent-ink); display: inline-flex; align-items: center; gap: 4px; font-size: var(--nw-fs-sub); font-weight: var(--nw-w-semibold); flex: none; }
.nw-token .nw-ic { width: 15px; height: 15px; stroke-width: 2.1; }
.nw-token .nw-ic:last-child { width: 13px; height: 13px; stroke-width: 2.6; opacity: .8; }
/* Метка совпавшего поля + подсветка */
.nw-match { display: inline-block; font-size: .71875rem; line-height: 1.0625rem; font-weight: var(--nw-w-semibold); padding: 0 6px; border-radius: 6px; background: var(--nw-fill); color: var(--nw-text-2); margin-right: 6px; vertical-align: 1px; letter-spacing: .01em; }
.nw-app mark, .nw-desk mark { background: var(--nw-mark); color: var(--nw-text); border-radius: 4px; padding: 0 2px; margin: 0 -1px; }
.nw-count { font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); margin: 10px 4px 0; }
.nw-count b { color: var(--nw-text); font-weight: var(--nw-w-semibold); }
/* Строка уточнений, прижатая к клавиатуре (зона большого пальца) */
.nw-dock { position: absolute; z-index: var(--nw-z-dock); left: 0; right: 0; bottom: var(--nw-kb-h); padding: 8px var(--nw-gutter); background: var(--nw-page); box-shadow: 0 -.5px 0 var(--nw-sep); }

/* Плавающий стеклянный таб-бар + отдельная круглая кнопка «+» справа (iOS 26) */
.nw-fade { position: absolute; z-index: var(--nw-z-fade); left: 0; right: 0; bottom: 0; height: 132px; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--nw-page) 0%, transparent), color-mix(in srgb, var(--nw-page) 88%, transparent) 46%, var(--nw-page) 72%); }
.nw-tabbar { position: absolute; z-index: var(--nw-z-tabbar); left: 18px; right: 96px; bottom: var(--nw-tabbar-gap); height: var(--nw-tabbar-h); border-radius: 32px; padding: 4px; display: flex;
  background: var(--nw-glass); -webkit-backdrop-filter: var(--nw-blur); backdrop-filter: var(--nw-blur); box-shadow: var(--nw-shadow-float), inset 0 0 0 .5px var(--nw-glass-line); }
.nw-tabbar--full { right: 18px; }
.nw-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 28px; font-size: var(--nw-fs-cap2); line-height: var(--nw-lh-cap2); font-weight: var(--nw-w-semibold); color: var(--nw-text); }
.nw-tab .nw-ic { width: 25px; height: 25px; stroke-width: 1.8; }
.nw-tab.is-on { background: var(--nw-accent-tint); color: var(--nw-accent-ink); }
.nw-fab { position: absolute; z-index: var(--nw-z-tabbar); right: 18px; bottom: var(--nw-tabbar-gap); width: var(--nw-tabbar-h); height: var(--nw-tabbar-h); border-radius: 50%; display: grid; place-items: center;
  background: var(--nw-glass); -webkit-backdrop-filter: var(--nw-blur); backdrop-filter: var(--nw-blur); box-shadow: var(--nw-shadow-float), inset 0 0 0 .5px var(--nw-glass-line); color: var(--nw-accent-ink); }
.nw-fab .nw-ic { width: 28px; height: 28px; stroke-width: 2.2; }

/* Нижние кнопки. Внутри Telegram — нативные BottomButton/SecondaryButton (это их вид),
   вне Telegram (PWA, сайт < 1024) — этот же блок нашей разметкой. */
.nw-mainbar { position: absolute; z-index: var(--nw-z-tabbar); left: 0; right: 0; bottom: 0; padding: 8px 16px calc(8px + max(var(--nw-safe-bottom), 26px)); display: flex; gap: 10px; background: var(--nw-bottom-bar-bg); }
.nw-mainbar--kb { bottom: var(--nw-kb-h); padding-bottom: 8px; background: var(--nw-card); z-index: calc(var(--nw-z-sheet) + 1); } /* над листом */
.nw-mainbtn { flex: 1; min-width: 0; height: var(--nw-mainbtn-h); border-radius: var(--nw-r-md); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: var(--nw-fs-body); font-weight: var(--nw-w-semibold); background: var(--nw-button); color: var(--nw-button-text); letter-spacing: -0.01em; white-space: nowrap; }
.nw-mainbtn--secondary { background: var(--nw-card); color: var(--nw-link-ink); }

/* Снэкбар «Отменить» (вместо подтверждений) */
.nw-snack { position: absolute; z-index: var(--nw-z-snack); left: 16px; right: 16px; bottom: calc(var(--nw-tabbar-h) + var(--nw-tabbar-gap) + 12px); min-height: 54px; border-radius: 16px;
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 12px; background: var(--nw-snack-bg); color: var(--nw-snack-text); box-shadow: var(--nw-shadow-float); font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub);
  -webkit-backdrop-filter: var(--nw-blur); backdrop-filter: var(--nw-blur); }
.nw-snack__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--nw-accent-fill); color: #fff; flex: none; }
.nw-snack__icon .nw-ic { width: 18px; height: 18px; stroke-width: 2.6; }
.nw-snack__text { flex: 1; min-width: 0; }
.nw-snack__text small { display: block; font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: rgba(255,255,255,.78); }
.nw-snack__action { color: var(--nw-snack-link); font-weight: var(--nw-w-semibold); flex: none; }
.nw-snack--above-bar { bottom: calc(var(--nw-mainbtn-h) + 58px + 10px); }

/* Свайп-действия строки (у каждого есть дубль-кнопка) */
.nw-swipe__actions { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.nw-swipe__btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 96px; color: #fff; font-size: var(--nw-fs-foot); line-height: 1rem; font-weight: var(--nw-w-semibold); }
.nw-swipe__btn--done { background: var(--nw-swipe-done); margin-right: auto; }
.nw-swipe__btn--later { background: var(--nw-swipe-later); margin-left: auto; }
.nw-swipe.is-right > .nw-row { transform: translateX(96px); }
.nw-swipe.is-left > .nw-row { transform: translateX(-96px); }
.nw-swipe > .nw-row { transition: transform var(--nw-dur-fast) var(--nw-ease); z-index: 1; }

/* Баннер поездки */
.nw-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.nw-banner__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--nw-accent-tint); color: var(--nw-accent-ink); display: grid; place-items: center; flex: none; }
.nw-banner__title { font-size: var(--nw-fs-callout); line-height: var(--nw-lh-callout); font-weight: var(--nw-w-semibold); }
.nw-banner__sub { font-size: .875rem; line-height: 1.1875rem; color: var(--nw-text-2); }

/* Карточка человека */
.nw-hero { display: flex; gap: 14px; align-items: center; padding: 8px 2px 0; }
.nw-hero__name { font-size: var(--nw-fs-name); line-height: var(--nw-lh-name); font-weight: var(--nw-w-bold); letter-spacing: var(--nw-track-tight); }
.nw-hero__alt { font-size: .875rem; line-height: 1.1875rem; color: var(--nw-text-2); }
.nw-hero__l2 { font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); color: var(--nw-text-2); margin-top: 2px; }
.nw-hero__l2 b { color: var(--nw-text); font-weight: var(--nw-w-medium); }
.nw-facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.nw-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.nw-tile { height: 62px; border-radius: 16px; background: var(--nw-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--nw-link); font-size: .78125rem; font-weight: var(--nw-w-medium); position: relative; }
.nw-tile span { color: var(--nw-text); }
.nw-tile.is-preferred { background: var(--nw-link-tint); }
.nw-tile.is-preferred span { color: var(--nw-link-ink); font-weight: var(--nw-w-semibold); }
.nw-status { margin-top: 10px; }
.nw-status__cells { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.nw-status__cells > div { padding: 10px 12px 11px; position: relative; min-width: 0; }
.nw-status__cells > div + div::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: .5px; background: var(--nw-sep); }
.nw-status small { display: block; font-size: var(--nw-fs-cap); line-height: var(--nw-lh-cap); color: var(--nw-text-2); }
.nw-status b { display: block; font-size: var(--nw-fs-callout); line-height: var(--nw-lh-callout); font-weight: var(--nw-w-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.nw-status em { display: block; font-style: normal; font-size: var(--nw-fs-cap); line-height: var(--nw-lh-cap); color: var(--nw-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-status .is-now b { color: var(--nw-accent-ink); }  /* единственный акцентный срок в карточке */
.nw-status__line { display: flex; align-items: center; gap: 8px; padding: 10px 14px 11px 12px; box-shadow: inset 0 .5px 0 var(--nw-sep); font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); }
.nw-status__line .nw-ic { color: var(--nw-text-2); width: 18px; height: 18px; }
.nw-status__line > span { flex: 1; min-width: 0; }
.nw-para { padding: 12px 14px 12px 16px; font-size: var(--nw-fs-sub); line-height: 1.3125rem; }
.nw-source { display: flex; align-items: center; gap: 6px; font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); margin-top: 8px; flex-wrap: wrap; }
.nw-ai { display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 5px; background: var(--nw-fill); color: var(--nw-text-2); font-size: .6875rem; font-weight: var(--nw-w-bold); letter-spacing: .03em; }
.nw-scores { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 16px; }
.nw-scores__lock { width: 32px; height: 32px; border-radius: 10px; background: var(--nw-fill); color: var(--nw-text-2); display: grid; place-items: center; flex: none; }
.nw-scores__blur { filter: blur(5px); opacity: .8; font-size: .875rem; white-space: nowrap; overflow: hidden; } /* до тапа */
.nw-scores.is-revealed .nw-scores__blur { filter: none; opacity: 1; }
.nw-timeline { padding: 4px 0; position: relative; }
.nw-timeline::before { content: ""; position: absolute; left: 78px; top: 18px; bottom: 18px; width: 1.5px; background: var(--nw-sep); }
.nw-tl-item { display: flex; gap: 12px; padding: 9px 14px 9px 16px; position: relative; }
.nw-tl-item__date { width: 46px; flex: none; font-size: var(--nw-fs-foot); line-height: 1.25rem; color: var(--nw-text-2); font-weight: var(--nw-w-medium); }
.nw-tl-item__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--nw-card); box-shadow: inset 0 0 0 2px var(--nw-hint); flex: none; margin-top: 6px; position: relative; z-index: 1; }
.nw-tl-item.is-now .nw-tl-item__dot { background: var(--nw-accent); box-shadow: none; }
.nw-tl-item__text { font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); min-width: 0; }
.nw-tl-item__text small { display: block; font-size: .84375rem; line-height: 1.125rem; color: var(--nw-text-2); }
.nw-note-input { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; color: var(--nw-text-2); font-size: var(--nw-fs-sub); }
.nw-note-input .nw-channel { margin-left: auto; width: 34px; height: 34px; }

/* Лист (sheet): detent medium/large, хваталка, «Отмена» слева. Один лист за раз. */
.nw-dim { position: absolute; inset: 0; background: var(--nw-dim); z-index: var(--nw-z-dim); }
.nw-sheet { position: absolute; z-index: var(--nw-z-sheet); left: 0; right: 0; bottom: 0; border-radius: var(--nw-r-sheet) var(--nw-r-sheet) 0 0; background: var(--nw-card); box-shadow: var(--nw-shadow-sheet); }
.nw-sheet--page { background: var(--nw-page); }
.nw-sheet__grab { width: 36px; height: 5px; border-radius: 3px; background: var(--nw-fill-2); margin: 6px auto 0; }
.nw-sheet__head { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; padding: 4px 16px 2px; height: 44px; }
.nw-sheet__head b { text-align: center; font-size: var(--nw-fs-body); font-weight: var(--nw-w-semibold); }
.nw-sheet__cancel { color: var(--nw-link-ink); font-size: var(--nw-fs-body); }
.nw-sheet__body { padding: 0 var(--nw-gutter); }
.nw-sheet__input { font-size: var(--nw-fs-callout); line-height: 1.4375rem; color: var(--nw-text); margin-top: 2px; }
.nw-sheet__input u { text-decoration: none; background-image: linear-gradient(var(--nw-accent), var(--nw-accent)); background-size: 100% 1.5px; background-repeat: no-repeat; background-position: 0 100%; }

/* Распознанный чип: поле + значение + «✕». Тап — правка, «✕» — «это просто текст». */
.nw-recog-row { display: flex; flex-wrap: wrap; gap: 7px; }
.nw-recog { height: 30px; border-radius: 10px; padding: 0 7px 0 9px; display: inline-flex; align-items: center; gap: 5px; background: var(--nw-accent-tint); color: var(--nw-text); font-size: .84375rem; font-weight: var(--nw-w-medium); white-space: nowrap; }
.nw-recog small { color: var(--nw-accent-ink); font-size: .71875rem; font-weight: var(--nw-w-semibold); }
.nw-recog .nw-ic { color: var(--nw-accent-ink); width: 14px; height: 14px; stroke-width: 2.4; opacity: .75; }
.nw-recog.is-pending { background: var(--nw-fill); color: var(--nw-text-2); }
.nw-recog.is-pending small { color: var(--nw-text-2); }
.nw-recog--add { background: transparent; outline: 1px dashed var(--nw-fill-2); outline-offset: -1px; color: var(--nw-text-2); }

/* Сегменты, чекбокс, переключатель */
.nw-segmented { display: flex; background: var(--nw-fill); border-radius: 9px; padding: 2px; }
.nw-segmented > * { flex: 1; height: 30px; border-radius: 7px; display: grid; place-items: center; font-size: .875rem; font-weight: var(--nw-w-medium); color: var(--nw-text); white-space: nowrap; }
.nw-segmented > .is-on { background: var(--nw-card); box-shadow: 0 1px 3px light-dark(rgba(0,0,0,.14), rgba(0,0,0,.5)); font-weight: var(--nw-w-semibold); }
.nw-check { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.6px var(--nw-ring-idle); display: grid; place-items: center; color: #fff; position: relative; }
.nw-check::after { content: ""; position: absolute; inset: -9px; }
.nw-check.is-on { background: var(--nw-accent-fill); box-shadow: none; }
.nw-check .nw-ic { width: 15px; height: 15px; stroke-width: 2.8; }
.nw-switch { width: 51px; height: 31px; border-radius: 16px; background: var(--nw-fill-2); position: relative; flex: none; }
.nw-switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform var(--nw-dur-fast) var(--nw-ease); }
.nw-switch.is-on { background: var(--nw-accent-fill); }
.nw-switch.is-on::before { transform: translateX(20px); }

/* Пустое состояние + почтовый штамп (единственный «брендовый момент» внутри Mini App) */
.nw-empty { text-align: center; padding: 20px 20px 18px; }
.nw-empty h3 { margin: 0; font-size: var(--nw-fs-title2); line-height: var(--nw-lh-title2); font-weight: var(--nw-w-bold); letter-spacing: var(--nw-track-tight); }
.nw-empty p { margin: 6px 0 14px; font-size: var(--nw-fs-sub); line-height: 1.3125rem; color: var(--nw-text-2); }
.nw-stamp { display: block; margin: 2px auto 10px; color: var(--nw-accent); }
.nw-stamp text { fill: currentColor; font-family: var(--nw-font); font-weight: 700; letter-spacing: .16em; }

/* Подсказка клавиши (сайт) */
.nw-kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font: 600 .71875rem/1 var(--nw-font); color: var(--nw-text-2);
  background: var(--nw-d-raised); box-shadow: inset 0 0 0 1px var(--nw-sep), 0 1px 0 var(--nw-sep); letter-spacing: 0; }

/* Фокус с клавиатуры — только :focus-visible (на телефоне не видно) */
.nw-app :focus-visible, .nw-desk :focus-visible { outline: 2px solid var(--nw-accent); outline-offset: 2px; border-radius: 6px; }

/* =========================================================================
   7. Сайт на ноутбуке (вне Telegram: палитра --nw-fb-*, тема по системе)
   ========================================================================= */
.nw-desk { position: relative; display: grid; grid-template-rows: var(--nw-d-top-h) minmax(0,1fr); height: 100%; overflow: hidden;
  font-family: var(--nw-font); font-size: var(--nw-d-fs); line-height: var(--nw-d-lh); color: var(--nw-text); background: var(--nw-card);
  -webkit-font-smoothing: antialiased; letter-spacing: -0.003em; font-variant-numeric: tabular-nums; }
.nw-desk *, .nw-desk *::before, .nw-desk *::after { box-sizing: border-box; }
.nw-desk__body { display: grid; grid-template-columns: var(--nw-d-side-w) minmax(0,1fr) var(--nw-d-pane-w); min-height: 0; }
@media (max-width: 1279px) { .nw-desk__body { grid-template-columns: 64px minmax(0,1fr) 400px; } }
.nw-topbar { display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--nw-separator); background: var(--nw-card); }
.nw-brand { display: flex; align-items: center; gap: 10px; width: calc(var(--nw-d-side-w) - 30px); font-weight: var(--nw-w-bold); font-size: 1rem; }
.nw-dsearch { flex: 1; max-width: 720px; height: 36px; border-radius: 10px; background: var(--nw-page); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; color: var(--nw-text-2); }
.nw-dsearch .nw-ic { width: 18px; height: 18px; }
.nw-dsearch .nw-kbd { margin-left: auto; }
.nw-btn { height: 32px; border-radius: 9px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; font-weight: var(--nw-w-semibold); font-size: .84375rem; white-space: nowrap;
  background: var(--nw-d-raised); color: var(--nw-text); box-shadow: inset 0 0 0 1px var(--nw-separator); }
.nw-btn .nw-ic { width: 17px; height: 17px; color: var(--nw-text-2); }
.nw-btn--primary { background: var(--nw-accent-fill); color: var(--nw-on-accent); box-shadow: none; }
.nw-btn--primary .nw-ic { color: #fff; }
.nw-btn--primary .nw-kbd { background: rgba(0,0,0,.22); color: #fff; box-shadow: none; }
.nw-btn--ghost { background: transparent; box-shadow: none; color: var(--nw-text-2); font-weight: var(--nw-w-medium); }
.nw-btn .nw-kbd { min-width: 18px; height: 18px; font-size: .6875rem; }
@media (hover: hover) { .nw-btn:hover { background: color-mix(in srgb, var(--nw-hint) 10%, var(--nw-d-raised)); } .nw-btn--primary:hover { background: color-mix(in srgb, #000 10%, var(--nw-accent-fill)); } }

.nw-side { background: var(--nw-d-side-bg); border-right: 1px solid var(--nw-separator); padding: 12px 10px; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.nw-nav { height: 30px; border-radius: 8px; padding: 0 8px; display: flex; align-items: center; gap: 9px; font-size: .84375rem; font-weight: var(--nw-w-medium); color: var(--nw-text); white-space: nowrap; flex: none; }
.nw-nav .nw-ic { width: 17px; height: 17px; color: var(--nw-text-2); stroke-width: 1.8; }
.nw-nav__count { margin-left: auto; color: var(--nw-text-2); font-weight: var(--nw-w-regular); font-size: .8125rem; }
.nw-nav__bar { width: 44px; height: 4px; border-radius: 2px; background: var(--nw-fill); position: relative; overflow: hidden; flex: none; margin-left: auto; }
.nw-nav__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--nw-fill-2); }
.nw-nav__bar + .nw-nav__count { margin-left: 0; width: 26px; text-align: right; }
.nw-nav.is-on { background: var(--nw-accent-tint); color: var(--nw-accent-ink); }
.nw-nav.is-on :is(.nw-ic, .nw-nav__count) { color: var(--nw-accent-ink); }
.nw-nav.is-on .nw-nav__bar i { background: var(--nw-accent); }
@media (hover: hover) { .nw-nav:not(.is-on):hover { background: var(--nw-fill); } }
.nw-side__head { font-size: .75rem; font-weight: var(--nw-w-semibold); color: var(--nw-text-2); padding: 12px 8px 3px; display: flex; justify-content: space-between; flex: none; }
.nw-side__head span { font-weight: var(--nw-w-regular); }
.nw-trip-tile { margin: 6px 2px 4px; padding: 10px 12px; border-radius: 12px; background: var(--nw-card); box-shadow: inset 0 0 0 1px var(--nw-separator); display: flex; gap: 10px; align-items: center; flex: none; }
.nw-trip-tile .nw-banner__icon { width: 32px; height: 32px; }
.nw-trip-tile b { display: block; font-size: .84375rem; }
.nw-trip-tile small { display: block; font-size: .75rem; line-height: 1rem; color: var(--nw-text-2); }

.nw-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--nw-separator); position: relative; background: var(--nw-card); }
.nw-main__head { display: flex; align-items: center; gap: 10px; padding: 14px 20px 10px; }
.nw-main__head h2 { margin: 0; font-size: var(--nw-d-fs-title); line-height: 1.75rem; font-weight: var(--nw-w-bold); letter-spacing: var(--nw-track-tight); white-space: nowrap; }
.nw-main__head h2 span { color: var(--nw-text-2); font-weight: var(--nw-w-medium); }
.nw-filterbar { display: flex; align-items: center; gap: 8px; padding: 0 20px 10px; flex-wrap: nowrap; }
.nw-fchip { height: 28px; border-radius: 14px; padding: 0 8px 0 11px; display: inline-flex; align-items: center; gap: 6px; background: var(--nw-accent-tint); color: var(--nw-accent-ink); font-size: .8125rem; font-weight: var(--nw-w-medium); white-space: nowrap; }
.nw-fchip small { font-size: .8125rem; opacity: .8; font-weight: var(--nw-w-regular); }
.nw-fchip .nw-ic { width: 14px; height: 14px; stroke-width: 2.2; }
.nw-fchip--add { background: transparent; color: var(--nw-text-2); box-shadow: inset 0 0 0 1px var(--nw-separator); }
.nw-select { height: 28px; border-radius: 8px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; color: var(--nw-text-2); white-space: nowrap; }
.nw-select b { color: var(--nw-text); font-weight: var(--nw-w-medium); }
.nw-select .nw-ic { width: 14px; height: 14px; }
.nw-seg-d { display: inline-flex; background: var(--nw-fill); border-radius: 9px; padding: 2px; }
.nw-seg-d > * { height: 26px; padding: 0 10px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: var(--nw-w-medium); color: var(--nw-text-2); }
.nw-seg-d > .is-on { background: var(--nw-d-raised); color: var(--nw-text); box-shadow: 0 1px 2px light-dark(rgba(0,0,0,.12), rgba(0,0,0,.5)); }
.nw-seg-d .nw-ic { width: 15px; height: 15px; }

.nw-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .84375rem; }
.nw-table th { text-align: left; font-weight: var(--nw-w-medium); font-size: .75rem; color: var(--nw-text-2); height: 32px; padding: 0 8px; border-bottom: 1px solid var(--nw-separator); white-space: nowrap; }
.nw-table th[aria-sort] { color: var(--nw-text); }
.nw-table td { height: var(--nw-d-row-h); padding: 0 8px; border-bottom: 1px solid var(--nw-d-row-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-table :is(td, th):first-child { padding-left: 18px; text-overflow: clip; }
.nw-table tr.is-selected td { background: var(--nw-accent-tint); }
.nw-table tr.is-active td:first-child { box-shadow: inset 3px 0 0 var(--nw-accent); }
.nw-table tr.is-active td { background: color-mix(in srgb, var(--nw-hint) 9%, var(--nw-card)); }
.nw-table tr.is-selected.is-active td { background: var(--nw-accent-tint); }
@media (hover: hover) { .nw-table tbody tr:not(.nw-group):hover td { background: color-mix(in srgb, var(--nw-hint) 7%, var(--nw-card)); } }
.nw-table tr.nw-group td { height: 34px; background: var(--nw-d-group-bg); font-weight: var(--nw-w-semibold); font-size: .8125rem; color: var(--nw-text); }
.nw-table tr.nw-group td span { color: var(--nw-text-2); font-weight: var(--nw-w-regular); margin-left: 6px; }
.nw-table tr.nw-more td { height: 32px; color: var(--nw-text-2); font-size: .8125rem; }
.nw-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.nw-who b { font-weight: var(--nw-w-semibold); overflow: hidden; text-overflow: ellipsis; }
.nw-who small { color: var(--nw-text-2); font-size: .75rem; margin-left: 2px; overflow: hidden; text-overflow: ellipsis; }
.nw-cb { width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--nw-ring-idle); display: inline-grid; place-items: center; vertical-align: middle; color: #fff; }
.nw-cb.is-on { background: var(--nw-accent-fill); box-shadow: none; }
.nw-cb .nw-ic { width: 12px; height: 12px; stroke-width: 3; }
.nw-tag { display: inline-flex; height: 22px; align-items: center; gap: 4px; padding: 0 8px; border-radius: 11px; background: var(--nw-fill); font-size: .75rem; font-weight: var(--nw-w-medium); color: var(--nw-text); white-space: nowrap; }
.nw-tag .nw-ic { width: 13px; height: 13px; }
/* Окно в таблице: дата обычным цветом, акцент — только мини-кольцо */
.nw-win { display: inline-flex; align-items: center; gap: 7px; }
.nw-win i { --p: 0; width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--nw-ring-color, var(--nw-ring-idle)) calc(var(--p) * 1%), var(--nw-ring-track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.4px)); }
.nw-win.is-open i { --nw-ring-color: var(--nw-accent); }
.nw-chan { display: inline-flex; gap: 4px; }
.nw-chan > span { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--nw-separator); color: var(--nw-text-2); }
.nw-chan > span.is-preferred { background: var(--nw-accent-tint); box-shadow: none; color: var(--nw-accent-ink); }
.nw-chan .nw-ic { width: 15px; height: 15px; }

.nw-bulkbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 54px; display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 14px; border-radius: 12px;
  background: var(--nw-d-raised); box-shadow: var(--nw-shadow-float), inset 0 0 0 1px var(--nw-separator); white-space: nowrap; font-size: .84375rem; z-index: 5; }
.nw-bulkbar > b { font-weight: var(--nw-w-semibold); margin-right: 8px; }
.nw-bulkbar .nw-btn { height: 30px; box-shadow: none; background: transparent; }
@media (hover: hover) { .nw-bulkbar .nw-btn:hover { background: var(--nw-fill); } }
.nw-hintbar { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; border-top: 1px solid var(--nw-separator); background: color-mix(in srgb, var(--nw-card) 92%, transparent);
  display: flex; align-items: center; gap: 12px; padding: 0 20px; font-size: .75rem; color: var(--nw-text-2); white-space: nowrap; overflow: hidden; }
.nw-hintbar > span { display: inline-flex; align-items: center; gap: 6px; }
.nw-hintbar > span:last-child { margin-left: auto; }

.nw-pane { padding: 18px 24px 24px; overflow: hidden; background: var(--nw-card); min-width: 0; }
.nw-pane__top { display: flex; align-items: center; gap: 8px; color: var(--nw-text-2); font-size: .78125rem; margin-bottom: 12px; }
.nw-pane__top > :last-child { margin-left: auto; }
.nw-ibtn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--nw-text-2); box-shadow: inset 0 0 0 1px var(--nw-separator); }
.nw-ibtn .nw-ic { width: 17px; height: 17px; }
.nw-dsec { font-size: .75rem; font-weight: var(--nw-w-semibold); color: var(--nw-text-2); margin: 16px 0 6px; display: flex; justify-content: space-between; gap: 8px; }
.nw-dsec a { color: var(--nw-accent-ink); font-weight: var(--nw-w-medium); }
.nw-dstatus { display: grid; grid-template-columns: 1fr 1fr 1fr; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--nw-separator); margin-top: 14px; }
.nw-dstatus > div { padding: 9px 12px; min-width: 0; }
.nw-dstatus > div + div { box-shadow: inset 1px 0 0 var(--nw-separator); }
.nw-dstatus small { display: block; font-size: .71875rem; color: var(--nw-text-2); line-height: .9375rem; }
.nw-dstatus b { display: block; font-size: .90625rem; line-height: 1.25rem; font-weight: var(--nw-w-semibold); white-space: nowrap; }
.nw-dstatus em { display: block; font-style: normal; font-size: .71875rem; line-height: .9375rem; color: var(--nw-text-2); }
.nw-dstatus .is-now b { color: var(--nw-accent-ink); }
.nw-dstatus__line { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; box-shadow: inset 0 1px 0 var(--nw-separator); font-size: .8125rem; }
.nw-dstatus__line .nw-ic { width: 16px; height: 16px; color: var(--nw-text-2); }
.nw-dstatus__line > span { flex: 1; }
.nw-dkv { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; font-size: .84375rem; }
.nw-dkv > * { height: 30px; display: flex; align-items: center; border-bottom: 1px solid var(--nw-d-row-line); min-width: 0; white-space: nowrap; overflow: hidden; }
.nw-dkv > .k { color: var(--nw-text-2); }

/* Палитра команд ⌘K */
.nw-cmdk { position: absolute; z-index: var(--nw-z-cmdk); left: 50%; top: 96px; width: 680px; transform: translateX(-50%); border-radius: 16px; overflow: hidden;
  background: var(--nw-d-raised); box-shadow: 0 24px 80px light-dark(rgba(0,0,0,.22), rgba(0,0,0,.7)), inset 0 0 0 1px var(--nw-separator); }
.nw-cmdk__input { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px; font-size: 1.125rem; border-bottom: 1px solid var(--nw-separator); }
.nw-cmdk__input .nw-ic { color: var(--nw-text-3); }
.nw-cmdk__input em { margin-left: auto; font-style: normal; font-size: .8125rem; color: var(--nw-text-2); }
.nw-cmdk__group { padding: 10px 18px 4px; font-size: .75rem; font-weight: var(--nw-w-semibold); color: var(--nw-text-2); }
.nw-cmdk__item { margin: 0 8px; height: 42px; padding: 0 10px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-size: .90625rem; white-space: nowrap; }
.nw-cmdk__item .nw-ic { width: 18px; height: 18px; color: var(--nw-text-2); }
.nw-cmdk__item small { color: var(--nw-text-2); font-size: .84375rem; overflow: hidden; text-overflow: ellipsis; }
.nw-cmdk__item.is-active { background: var(--nw-accent-tint); }
.nw-cmdk__keys { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; }
.nw-cmdk__label { font-size: .71875rem; font-weight: var(--nw-w-semibold); padding: 1px 7px; border-radius: 6px; background: var(--nw-fill); color: var(--nw-text-2); }
.nw-cmdk__foot { height: 42px; margin-top: 8px; display: flex; align-items: center; gap: 16px; padding: 0 18px; font-size: .78125rem; color: var(--nw-text-2); border-top: 1px solid var(--nw-separator); }
.nw-cmdk__foot > span { display: inline-flex; gap: 6px; align-items: center; }
.nw-cmdk__foot > span:last-child { margin-left: auto; }
.nw-scrim { position: absolute; inset: 0; background: light-dark(rgba(20,20,24,.28), rgba(0,0,0,.55)); z-index: calc(var(--nw-z-cmdk) - 1); }
