/* ТурПульт — кабинет участника, версия 2 (редизайн 29.09.2026).
   Токены и размеры — из design/participant-cabinet-redesign/IMPLEMENTATION-SPEC.md.
   Порядок: токены → основа → компоненты UI-кита → каркас → экраны → адаптив. */

/* ── Токены ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #667085;          /* вторичный: 4.97:1 на белом */
  --text-3: #98a2b3;          /* только декоративное: 2.6:1 — не для смысла */
  --border: #e3e8ef;
  --border-2: #d0d7e2;
  --hover: #f1f4f8;

  --brand: #0aa36c;           /* иконки, индикаторы, точки — не текст (3.25:1) */
  --brand-cta: #068555;       /* кнопки с белым текстом: 4.67:1 (AA) */
  --brand-cta-hover: #067a51;
  --brand-cta-press: #056b47;
  --brand-text: #067a51;      /* зелёный текст на белом и на мягком фоне */
  --brand-soft: #e8f8f1;
  --brand-line: #9fdcc3;

  --action: #2563eb;
  --action-soft: #eaf2ff;
  --action-line: #bfd3fb;
  --hotel: #7c3aed;
  --hotel-soft: #f1eafe;
  --warning: #f59e0b;
  --warning-soft: #fff4df;
  --warning-text: #b45309;
  --warning-line: #fbd89a;
  --error: #e53935;
  --error-soft: #fdecec;
  --error-text: #c62828;
  --error-line: #f5b5b3;
  --navy: #0f172a;

  --r-input: 12px;
  --r-card: 16px;
  --r-sheet: 24px;
  --r-pill: 999px;

  --shadow-card: 0 8px 30px rgb(32 55 88 / .06);
  --shadow-pop: 0 12px 40px rgb(32 55 88 / .16);
  --shadow-sheet: 0 -16px 48px rgb(32 55 88 / .14);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 72px;
  --top-h: 64px;
  --side-w: 236px;
  --rail-w: 88px;
  --ctx-w: 380px;
  --gutter: 16px;
}

/* ── Основа ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font: 400 16px/24px var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; -webkit-tap-highlight-color: transparent; }
a { color: var(--action); text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.tnum, time { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 8px; }
.ti { line-height: 1; }
body.noscroll { overflow: hidden; }

/* типографика (спецификация §2) */
.h1 { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.h2 { font-size: 24px; line-height: 32px; font-weight: 700; margin: 0; }
.h3 { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0; }
.small { font-size: 14px; line-height: 20px; }
.cap { font-size: 12px; line-height: 16px; }
.muted { color: var(--text-2); }
.kicker { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-text); }

/* ── Кнопки ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; line-height: 20px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn .ti { font-size: 20px; }
.btn-primary { background: var(--brand-cta); color: #fff; }
.btn-primary:hover { background: var(--brand-cta-hover); }
.btn-primary:active { background: var(--brand-cta-press); }
.btn-secondary { background: var(--card); border-color: var(--border-2); color: var(--text); }
.btn-secondary:hover { background: var(--hover); }
.btn-blue { background: var(--action-soft); color: var(--action); }
.btn-blue:hover { background: #dde9ff; }
.btn-outline-blue { background: var(--card); border-color: var(--action-line); color: var(--action); }
.btn-outline-blue:hover { background: var(--action-soft); }
.btn-text { min-height: 44px; padding: 0 8px; color: var(--action); }
.btn-text:hover { text-decoration: underline; }
.btn-danger-text { min-height: 44px; padding: 0 8px; color: var(--error-text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #d32f2f; }
.btn-block { display: flex; width: 100%; }
.btn[disabled]:not(.is-loading) { background: #eef1f5; color: #8a94a6; border-color: transparent; cursor: default; }
.btn.is-loading { cursor: progress; opacity: .92; }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); position: relative; flex: none;
}
.iconbtn .ti { font-size: 24px; }
.iconbtn:hover { background: var(--hover); }
.iconbtn.round { border-radius: 50%; }
.iconbtn.bordered { border: 1px solid var(--border-2); background: var(--card); }
.badge {
  position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--error); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--card);
}

/* ── Поля ───────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; }
.field > label, .field .lbl { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-input);
  border: 1px solid var(--border-2); background: var(--card); color: var(--text); font-size: 16px; line-height: 22px;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(10 163 108 / .15); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }   /* своя рамка фокуса — зелёная, без второй синей */
.select { padding-right: 44px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.textarea { min-height: 96px; resize: vertical; }
.hint { font-size: 14px; line-height: 20px; color: var(--text-2); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--error); }
.err { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--error-text); }
.err .ti { font-size: 20px; flex: none; }

/* ── Чипы, статусы, роли ────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--card); font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--text);
}
.chip.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.chip .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--hover); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.chip.is-on .cnt { background: var(--brand-cta); color: #fff; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--hover); color: var(--text-2);
}
.pill .ti { font-size: 15px; }
.pill-green { background: var(--brand-soft); color: var(--brand-text); }
.pill-blue { background: var(--action-soft); color: var(--action); }
.pill-purple { background: var(--hotel-soft); color: var(--hotel); }
.pill-amber { background: var(--warning-soft); color: var(--warning-text); }
.pill-red { background: var(--error-soft); color: var(--error-text); }
.pill-gray { background: #eef1f5; color: #475467; }
.role { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; background: #eef1f5; color: #475467; white-space: nowrap; }
.role .ti { font-size: 17px; }
.role.driver { background: var(--action-soft); color: var(--action); }
.role.admin { background: var(--warning-soft); color: var(--warning-text); }
.roles { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Карточки, списки, плитки, аватары ──────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.list { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; width: 100%; text-align: left; color: var(--text); }
.list .row + .row { border-top: 1px solid var(--border); }
button.row:hover, a.row:hover { background: #fafbfd; }
.row .grow { flex: 1; min-width: 0; }
.row .t { display: block; font-weight: 600; font-size: 17px; line-height: 22px; color: var(--text); }
.row .s { display: block; font-size: 14px; line-height: 20px; color: var(--text-2); }
.row .chev { color: var(--text-3); font-size: 22px; flex: none; }
.row .s .st-on { color: var(--brand-text); font-weight: 500; }
.row .end { display: flex; align-items: center; gap: 10px; flex: none; }
.tile { width: 48px; height: 48px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--hover); color: var(--text); position: relative; }
.tile .ti { font-size: 26px; }
.tile.green { background: var(--brand-soft); color: var(--brand); }
.tile.blue { background: var(--action-soft); color: var(--action); }
.tile.purple { background: var(--hotel-soft); color: var(--hotel); }
.tile.amber { background: var(--warning-soft); color: var(--warning-text); }
.tile.red { background: var(--error-soft); color: var(--error); }
.tile.navy { background: #e9ecf2; color: var(--navy); }
.tile .dir { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px var(--border); }
.tile .dir .ti { font-size: 15px; }
.tile .dir.dep { color: var(--brand); } .tile .dir.arr { color: var(--action); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #eef1f5; color: #344054; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex: none; letter-spacing: .02em; }
/* ⚠️ не .lg — это корень экрана входа (min-height:100vh), аватар вытягивался на весь экран */
.avatar.xl { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

/* ── Пусто, ошибка, скелет ──────────────────────────────────────────────── */
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 20px; border: 1px dashed var(--border-2); border-radius: var(--r-card); background: var(--card); }
.empty > .ti { font-size: 40px; color: var(--text-2); margin-bottom: 6px; }
.empty .et { font-size: 18px; line-height: 26px; font-weight: 600; }
.empty .es { font-size: 15px; line-height: 22px; color: var(--text-2); max-width: 34ch; }
.errblock { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.errblock .grow { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.errblock .t { font-weight: 600; font-size: 17px; }
.errblock .s { color: var(--text-2); font-size: 15px; }
.skel { background: linear-gradient(90deg, #edf0f5 0%, #f6f8fb 50%, #edf0f5 100%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-line { height: 14px; }
.skel-card { display: flex; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); }
.skel-card + .skel-card { margin-top: 12px; }
.skel-card .skel-tile { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.skel-card .grow { flex: 1; display: grid; gap: 10px; align-content: center; }

/* ── Слои: шторка, окно, тост ───────────────────────────────────────────── */
#layers { position: relative; z-index: 1000; }
.layer { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.layer .ovl { position: absolute; inset: 0; background: rgb(15 23 42 / .42); opacity: 0; transition: opacity .22s; }
.layer.open .ovl { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-height: calc(100% - var(--safe-t) - 12px); background: var(--card);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow-sheet);
  display: flex; flex-direction: column; transform: translateY(104%); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.layer.open .sheet { transform: none; }
.sheet:focus, .dialog:focus { outline: none; }
.sheet.h60 { height: 60%; } .sheet.h85 { height: 85%; } .sheet.full { height: calc(100% - var(--safe-t) - 12px); }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: #cfd6e0; margin: 10px auto 0; flex: none; }
.sheet-hd { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px 12px; flex: none; }
.sheet-hd .ttl { flex: 1; min-width: 0; }
.sheet-hd h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; }
.sheet-hd p { margin: 2px 0 0; color: var(--text-2); font-size: 15px; line-height: 22px; }
.sheet-x { background: #eef1f5; border-radius: 50%; width: 40px; height: 40px; }
.sheet-x .ti { font-size: 22px; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 20px 20px; overscroll-behavior: contain; }
.sheet-ft { flex: none; padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; background: var(--card); }
.sheet-ft > .btn { flex: 1; }
.sheet-sec { margin: 18px 2px 8px; font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.layer.center { align-items: center; padding: 16px; }
.dialog { position: relative; width: 100%; max-width: 400px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-pop); padding: 24px; text-align: center; opacity: 0; transform: scale(.96); transition: opacity .18s, transform .18s; }
.layer.open .dialog { opacity: 1; transform: none; }
.dialog h2 { margin: 0 0 6px; font-size: 20px; line-height: 28px; }
.dialog p { margin: 0 0 20px; color: var(--text-2); }
.dialog .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog .acts .btn { padding: 0 12px; }

#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 1100; display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 440px; min-height: 52px; padding: 8px 8px 8px 16px;
  background: var(--brand-soft); color: var(--text); border-radius: 14px; box-shadow: var(--shadow-pop); font-size: 15px; line-height: 20px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast > .ti { font-size: 24px; color: var(--brand); flex: none; }
.toast .grow { flex: 1; }
.toast.warn { background: var(--warning-soft); } .toast.warn > .ti { color: var(--warning-text); }
.toast.error { background: var(--error-soft); } .toast.error > .ti { color: var(--error); }
.toast .iconbtn { width: 36px; height: 36px; }
.toast .iconbtn .ti { font-size: 20px; color: var(--text-2); }

/* ── Каркас ─────────────────────────────────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { height: 32px; width: auto; opacity: .9; }
.app { min-height: 100vh; }
.side, .rail { display: none; }
.main { min-width: 0; }

.top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 4px;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 10px 0 16px; background: rgb(246 248 251 / .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
}
.top-logo { display: flex; align-items: center; height: 44px; margin-right: auto; }
.top-logo img { height: 26px; width: auto; }
.top-ttl { display: none; }
.top-acts { display: flex; align-items: center; gap: 2px; }
.avatar-btn { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.avatar-btn .avatar { width: 44px; height: 44px; }
.tbtn { display: none; }

.netbar {
  display: flex; align-items: center; gap: 10px; margin: 4px 12px 0; min-height: 44px; padding: 8px 12px 8px 14px; width: calc(100% - 24px);
  border-radius: 12px; border: 1px solid var(--warning-line); background: var(--warning-soft); color: #7a4310; font-size: 15px; line-height: 20px; text-align: left;
}
.netbar > .ti:first-child { font-size: 22px; color: var(--warning-text); }
.netbar .grow { flex: 1; min-width: 0; }
.netbar .chev { font-size: 20px; opacity: .7; }
.netbar .cnt { min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; background: var(--warning-text); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.netbar.sync { background: var(--action-soft); border-color: var(--action-line); color: #1e40af; }
.netbar.sync > .ti:first-child { color: var(--action); }
.netbar.fail { background: var(--error-soft); border-color: var(--error-line); color: #9f1c1c; }
.netbar.fail > .ti:first-child { color: var(--error); }
.netbar.fail .cnt { background: var(--error); }

.view { padding: 12px var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + 28px); }
.scr { display: none; }
.scr.on { display: block; }
.scr-hd { display: flex; align-items: flex-start; gap: 12px; margin: 8px 0 18px; }
.scr-hd .grow { flex: 1; min-width: 0; }
.scr-hd .sub { margin: 2px 0 0; color: var(--text-2); }
.who .nm { font-size: 18px; line-height: 26px; font-weight: 600; margin-top: 2px; }
.who .roles { margin-top: 8px; }

/* нижнее меню (телефон) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; background: var(--card);
  border-top: 1px solid var(--border); padding-bottom: var(--safe-b); box-shadow: 0 -4px 20px rgb(32 55 88 / .05);
}
.tab { flex: 1; min-width: 0; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #475467; font-size: 12px; line-height: 16px; font-weight: 500; position: relative; }
.tab .ti { font-size: 26px; }
.tab.on { color: var(--brand-text); }
.tab.on .ti { color: var(--brand); }
.tab .badge { top: 6px; right: calc(50% - 26px); }

/* ── Экран входа ────────────────────────────────────────────────────────── */
.lg { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.lg-top { display: flex; align-items: center; gap: 4px; height: calc(64px + var(--safe-t)); padding: var(--safe-t) 10px 0 20px; background: var(--card); border-bottom: 1px solid var(--border); }
.lg-top .logo { margin-right: auto; display: flex; align-items: center; }
.lg-top .logo img { height: 28px; width: auto; }
.tlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px; border-radius: 12px; color: #344054; font-weight: 500; }
.tlink:hover { background: var(--hover); }
.tlink .ti { font-size: 24px; }
.lg-top .tlink span { display: none; }
.lg-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 20px 24px; }
.lg-board { display: grid; }
.lg-show { display: none; }
.lg-form { display: grid; gap: 16px; align-content: start; max-width: 520px; }
.lg-form .h1 { font-size: 36px; line-height: 42px; }
.lg-form .sub { margin: -8px 0 4px; color: var(--text-2); font-size: 17px; }
.code-wrap { position: relative; }
.code-inp { text-align: center; font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: .18em; min-height: 64px; padding: 14px 56px; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.code-paste { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.lg-form .btn-primary { min-height: 56px; font-size: 18px; }
.lg-ok { display: flex; align-items: center; gap: 12px; color: #344054; }
.lg-ok .ti { font-size: 28px; color: var(--brand); }
.infocard { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.infocard > .ti { font-size: 28px; color: var(--action); flex: none; }
.infocard b { display: block; font-size: 17px; margin-bottom: 2px; }
.infocard span { color: var(--text-2); }
.lg-ask { color: #344054; margin: 0; }
.lg-or { display: none; }
.lg-foot { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 18px 16px calc(18px + var(--safe-b)); font-size: 14px; }
.lg-foot a { color: var(--text-2); }
.lg-foot i { width: 1px; height: 18px; background: var(--border-2); }
.lg-sup { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #344054; min-height: 44px; }
.lg-sup .ti { font-size: 22px; }

/* ── Расписание ─────────────────────────────────────────────────────────── */
.sched-hd { display: block; }
.sched-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
/* на телефоне заголовок и четыре кнопки 44 px должны встать в одну строку (макет 01) */
@media (max-width: 430px) { .sched-row .h1 { font-size: 25px; letter-spacing: -.02em; } }
.sched-hd .who { margin-top: 2px; }
.sched-tools { display: flex; gap: 6px; flex: none; }
.seg { display: inline-flex; gap: 4px; }
.seg .sb { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #344054; }
.seg .sb .ti { font-size: 22px; }
.seg .sb .lb { display: none; }
.seg .sb.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.gear { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); }
.gear .ti { font-size: 22px; }

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
/* лента в режиме «Список»: пять дней на экране, листается пальцем */
.strip.scroll { grid-auto-columns: 20%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.strip.scroll::-webkit-scrollbar { display: none; }
.strip.scroll .day { scroll-snap-align: start; }
.strip-wrap { margin-bottom: 20px; }
.strip-wrap .navb { display: none; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 76px; padding: 8px 2px; color: var(--text); }
.day + .day { border-left: 1px solid var(--border); }
.day .dw { font-size: 13px; line-height: 16px; color: var(--text-2); }
.day .dn { font-size: 22px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.day .dm { display: none; font-size: 12px; line-height: 14px; color: var(--text-2); }
.day .dots { display: flex; gap: 3px; height: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); display: inline-block; flex: none; }
.dot.blue { background: var(--action); } .dot.purple { background: var(--hotel); }
.day.today .dn { color: var(--brand-text); font-weight: 700; }
.day.sel { background: var(--brand-cta); color: #fff; border-radius: 12px; }
.day.sel + .day { border-left-color: transparent; }
.day.sel .dw, .day.sel .dm, .day.sel .dn { color: #fff; }
.day.sel .dot { box-shadow: 0 0 0 1.5px #fff; }

.wk-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.wk-nav .ttl { flex: 1; text-align: center; font-weight: 700; font-size: 17px; line-height: 22px; }
.navb { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.navb .ti { font-size: 22px; }
.today-chip { height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; font-size: 15px; flex: none; }

.dgroup { margin: 0 0 24px; scroll-margin-top: calc(var(--top-h) + var(--safe-t) + 12px); }
.dgroup-hd { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.dgroup-hd h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; flex: 1; min-width: 0; }
.dgroup-hd .pill { height: 30px; padding: 0 12px; font-size: 14px; font-weight: 500; }
.evs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.noday { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); color: var(--text-2); }
.noday .ti { font-size: 24px; }

.ev { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); text-align: left; position: relative; overflow: hidden; color: var(--text); }
.ev:hover { border-color: var(--border-2); }
.ev.now { border-color: var(--brand-line); }
.ev.now::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brand); }
.ev.past { opacity: .7; }
.ev .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ev .tm { font-size: 16px; line-height: 22px; color: #344054; font-variant-numeric: tabular-nums; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.ev .tm .dur { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.ev .tm .dur .ti { font-size: 18px; }
.ev .nm { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.ev button.nm { display: block; width: 100%; text-align: left; padding: 0; }
.ev { cursor: pointer; }
.ev .ln { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; line-height: 21px; color: var(--text-2); overflow-wrap: anywhere; }
.ev .ln .ti { font-size: 18px; flex: none; margin-top: 1px; }
.ev .ln.own { color: var(--hotel); }
.ev .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.city { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: #eef1f5; color: #344054; font-size: 14px; font-weight: 500; }
.city .ti { font-size: 16px; }
.ev .chev { color: var(--text-3); font-size: 22px; flex: none; align-self: center; }
.ev .evbtn { margin-top: 8px; min-height: 44px; width: 100%; }
.ev .tl-dot, .ev .dtime { display: none; }
.past-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: 0 0 24px; border-radius: 12px; border: 1px dashed var(--border-2); color: #344054; font-weight: 500; }
.past-toggle .ti { font-size: 20px; }

.cal { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; margin-bottom: 14px; }
.cal-hd { display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 18px; }
.cal-hd .ttl { flex: 1; font-size: 22px; line-height: 28px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cal-dow { text-align: center; font-size: 13px; color: var(--text-2); padding: 8px 0; border-bottom: 1px solid var(--border); }
.cal-c { min-height: 62px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; color: var(--text); }
.cal-c:nth-child(7n) { border-right: 0; }
.cal-c .n { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.cal-c.out .n { color: var(--text-3); }
.cal-c.today .n { border: 2px solid var(--brand); border-radius: 50%; color: var(--brand-text); font-weight: 700; }
.cal-c .tdl { font-size: 11px; line-height: 12px; color: var(--brand-text); font-weight: 600; }
.cal-c.sel .n { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 11px; }
.cal-c .dots { display: flex; gap: 3px; height: 7px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: #475467; margin: 0 2px 22px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-today { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand); }
.lg-sel { width: 16px; height: 16px; border-radius: 50%; background: var(--navy); }

/* детали события и правая панель */
.evd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.evd, .facts, .ctc, .ctc-btns, .evd .acts { grid-template-columns: minmax(0, 1fr); }
.evd-hd { display: flex; gap: 14px; align-items: flex-start; }
.evd-hd .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.evd-hd .tm { font-size: 26px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.evd-hd .nm { font-size: 20px; line-height: 28px; font-weight: 700; overflow-wrap: anywhere; }
.evd-hd .dt { color: var(--text-2); font-size: 15px; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.fact { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 22px; color: #344054; overflow-wrap: anywhere; }
.fact > .ti { font-size: 20px; color: var(--text-2); flex: none; margin-top: 1px; }
.fact.own, .fact.own > .ti { color: var(--hotel); }
.note { padding: 12px 14px; border-radius: 12px; background: #f6f8fb; border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 22px; }
.evd .acts { display: grid; gap: 10px; }
.ctc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ctc-p { display: flex; align-items: center; gap: 12px; }
.ctc-p .grow { flex: 1; min-width: 0; }
.ctc-p .t { display: block; font-weight: 600; } .ctc-p .s { display: block; font-size: 14px; color: var(--text-2); }
.ctc-btns { display: grid; gap: 8px; }
.ctc-btns a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-2); color: var(--action); font-weight: 500; background: var(--card); }
.ctc-btns a .ti { font-size: 20px; }
.ctc-btns a.tel { color: var(--text); font-variant-numeric: tabular-nums; }
.ctc-btns a.tel .ti { color: var(--action); }
.sec-ttl { font-size: 18px; line-height: 26px; font-weight: 700; margin: 0 0 12px; }
.next-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; text-align: left; color: var(--text); }
.next-row + .next-row { border-top: 1px solid var(--border); }
.next-row .tile { width: 40px; height: 40px; border-radius: 50%; }
.next-row .tile .ti { font-size: 20px; }
.next-row .tm { width: 52px; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.next-row .grow { flex: 1; min-width: 0; }
.next-row .t { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-row .s { display: block; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-row .chev { color: var(--text-3); font-size: 20px; }
.ctx { display: none; }
.stub { display: grid; gap: 14px; justify-items: start; }

/* ── Выбор тура (кнопка-поле и шторка) ─────────────────────────────────── */
.btn-outline-green { background: var(--card); border-color: var(--brand); color: var(--brand-text); }
.btn-outline-green:hover { background: var(--brand-soft); }
.tour-pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-row .lbl { font-size: 14px; font-weight: 600; color: var(--text-2); }
.tp-row .btn-text { min-height: 32px; padding: 0 4px; font-size: 15px; font-weight: 500; }
.tp-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px 8px 16px; border: 1px solid var(--border-2); border-radius: var(--r-input); background: var(--card); text-align: left; }
.tp-btn[disabled] { cursor: default; opacity: 1; }
.tp-btn .grow { flex: 1; min-width: 0; display: grid; }
.tp-btn .t { font-weight: 600; font-size: 17px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-btn .s { font-size: 14px; color: var(--text-2); }
.tp-btn > .ti { font-size: 22px; color: var(--text-2); }
.row .pick-on { font-size: 24px; color: var(--brand); flex: none; }

/* ── Занятость ─────────────────────────────────────────────────────────── */
.bz-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.bz-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.bz-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; }
.bz-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--action-soft); border: 1px solid var(--action-line); color: #1e3a8a; font-size: 15px; line-height: 21px; }
.bz-tip .ti { font-size: 24px; color: var(--action); flex: none; }
.bz-cal { padding: 0; overflow: hidden; }
.bz-cal .cal-hd { padding: 12px 12px 12px 12px; }
.bz-cal .cal-hd .ttl { text-align: center; }
.bz-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.bz-dow { text-align: center; font-size: 13px; color: var(--text-2); padding: 8px 0; border-bottom: 1px solid var(--border); }
.bz-d { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; color: var(--text); background: var(--card); }
.bz-d:nth-child(7n) { border-right: 0; }
.bz-d .n { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; border-radius: 50%; }
.bz-d > .ti { font-size: 16px; margin-top: -6px; }
.bz-d.out .n { color: var(--text-3); }
.bz-d.past:not(.out) .n { color: var(--text-2); }
.bz-d.today .n { border: 2px solid var(--brand); color: var(--brand-text); font-weight: 700; }
.bz-d.busy { background: #fde8e8; }
.bz-d.busy .n { color: #9f1c1c; font-weight: 600; }
.bz-d.tour { background: #e3edff; color: var(--action); }
.bz-d.tour .n { color: #1e40af; font-weight: 600; }
.bz-d.hold { background: #ffedd5; color: #c2410c; }
.bz-d.hold .n { color: #9a3412; font-weight: 600; }
.bz-d.sel { background: #fbd5d5; box-shadow: inset 0 0 0 2px var(--error); }
.bz-d.picked { box-shadow: inset 0 0 0 2px var(--action); }
.bz-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 14px; color: #344054; }
.bz-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 18px; border-radius: 6px; display: inline-block; }
.sw.free { background: var(--brand-soft); } .sw.busy { background: #fbd5d5; } .sw.tour { background: #cfe0ff; } .sw.hold { background: #fed7aa; }
.bz-day { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bz-day-t { font-size: 18px; font-weight: 700; }
.bz-day-t span { color: var(--action); }
.bz-tour { display: flex; align-items: center; gap: 14px; }
.bz-tour .grow { display: grid; } .bz-tour .t { font-weight: 700; } .bz-tour .s { font-size: 14px; color: var(--text-2); }
.bz-evs { margin: 0; padding-left: 18px; color: #344054; font-size: 14px; display: grid; gap: 2px; }
.bz-sum { display: grid; gap: 2px; }
.bz-sum b { font-size: 17px; } .bz-sum .s { font-size: 14px; color: var(--text-2); }
.bz-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 21px; background: var(--warning-soft); color: #7a4310; }
.bz-note .ti { font-size: 22px; flex: none; color: var(--warning-text); }
.bz-note.error { background: var(--error-soft); color: #8f1d1d; } .bz-note.error .ti { color: var(--error); }
.bz-note.ok { background: var(--brand-soft); color: #0b5d3f; } .bz-note.ok .ti { color: var(--brand); }

/* ── Одометр ───────────────────────────────────────────────────────────── */
.km-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.km-earn { display: flex; align-items: center; gap: 16px; background: var(--brand-soft); border-color: var(--brand-line); }
.km-earn .tile { width: 56px; height: 56px; background: var(--card); }
.km-earn .tile .ti { font-size: 32px; }
.km-earn .grow { display: grid; gap: 2px; }
.km-earn .s { color: #3f5a4c; font-size: 15px; }
.km-earn .big { font-size: 34px; line-height: 40px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.km-h { margin: 6px 2px 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.km-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.km-seg { display: grid; gap: 8px; }
.km-seg.ok { border-color: var(--brand-line); }
.km-seg-hd { display: flex; align-items: flex-start; gap: 10px; }
.km-seg-hd .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.km-date, .km-plan { font-size: 14px; color: var(--text-2); }
.km-route { font-size: 18px; line-height: 24px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.km-route .ti { font-size: 18px; color: var(--text-2); }
.km-lbl { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.km-inp { display: flex; }
.km-inp .input { border-radius: var(--r-input) 0 0 var(--r-input); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.km-unit { display: inline-flex; align-items: center; padding: 0 18px; border: 1px solid var(--border-2); border-left: 0; border-radius: 0 var(--r-input) var(--r-input) 0; background: #f6f8fb; color: var(--text-2); font-weight: 500; }
.km-calc { color: var(--brand-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.km-off { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: #7a4310; font-size: 14px; }
.km-off .ti { font-size: 20px; color: var(--warning-text); }

/* «Ещё», неотправленное, настройки */
.menu-me { display: flex; align-items: center; gap: 14px; padding: 2px 0 6px; }
.menu-me .nm { font-size: 20px; line-height: 26px; font-weight: 700; }
.menu-me .roles { margin-top: 6px; }
.list.danger { background: var(--error-soft); border-color: var(--error-line); margin-top: 18px; }
.list.danger .t { color: var(--error-text); }
.list.danger .s { color: #a63a37; }
.list.danger .chev { color: #d58b89; }
.qitem { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.qitem + .qitem { margin-top: 12px; }
.qitem .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.qitem .q-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.qitem .q-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.qitem .k { font-size: 14px; color: var(--text-2); }
.qitem .t { font-size: 17px; line-height: 23px; font-weight: 700; overflow-wrap: anywhere; }
.qitem .s { font-size: 15px; color: var(--text-2); overflow-wrap: anywhere; }
.qitem .w { font-size: 14px; color: var(--text-2); }
.qitem .q-acts { display: grid; justify-items: end; align-content: start; gap: 8px; flex: none; }
.qitem .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.qinfo { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--warning-soft); border: 1px solid var(--warning-line); color: #7a4310; margin-bottom: 14px; }
.qinfo .ti { font-size: 24px; color: var(--warning-text); flex: none; }
.qinfo.ok { background: var(--brand-soft); border-color: var(--brand-line); color: #0b5d3f; }
.qinfo.ok .ti { color: var(--brand); }
.qstate { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--brand-text); font-weight: 500; width: 100%; }
.qstate.off { color: var(--warning-text); }
.qstate .ti { font-size: 22px; }
.setcard { display: flex; gap: 14px; align-items: flex-start; }
.setcard + .setcard { margin-top: 12px; }
.setcard .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.setcard .t { font-weight: 700; font-size: 17px; }
.setcard .s { font-size: 15px; line-height: 21px; color: var(--text-2); }
.setcard .btn { min-height: 40px; padding: 0 16px; font-size: 15px; justify-self: start; margin-top: 6px; }

@media (max-width: 1023.98px) { .d-only { display: none !important; } }

/* ── Планшет: компактная навигация сбоку ────────────────────────────────── */
@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .tabbar { display: none; }
  .rail {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px; position: sticky; top: 0; height: 100vh;
    padding: calc(12px + var(--safe-t)) 8px 12px; background: var(--card); border-right: 1px solid var(--border);
  }
  .rail .logo { display: flex; justify-content: center; padding: 6px 0 14px; }
  .rail .logo img { height: 36px; width: 36px; object-fit: contain; }
  .rail .ri { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 12px; font-size: 12px; line-height: 14px; font-weight: 500; color: #475467; text-align: center; }
  .rail .ri .ti { font-size: 24px; }
  .rail .ri:hover { background: var(--hover); }
  .rail .ri.on { background: var(--brand-soft); color: var(--brand-text); }
  .rail .ri.on .ti { color: var(--brand); }
  .rail .ri .badge { top: 4px; right: 12px; }
  .rail .me { margin-top: auto; display: flex; justify-content: center; }
  .view { padding-bottom: 40px; }
  #toasts { bottom: 24px; }
  .layer { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; border-radius: 20px; max-height: min(88vh, 900px); transform: translateY(24px); opacity: 0; transition: transform .22s, opacity .22s; }
  .layer.open .sheet { transform: none; opacity: 1; }
  .sheet.h60, .sheet.h85, .sheet.full { height: auto; }
  .sheet.wide { max-width: 720px; }
  .sheet-grab { display: none; }
  .sheet-hd { padding-top: 20px; }
  .sheet-ft { border-radius: 0 0 20px 20px; padding-bottom: 14px; }
  .netbar { margin: 4px 24px 0; width: calc(100% - 48px); }
  .seg .sb { width: auto; padding: 0 14px; }
  .seg .sb .lb { display: inline; font-size: 15px; font-weight: 500; }
  .day .dm { display: block; }
  .lg-top .tlink span { display: inline; }
  .lg-top { padding: var(--safe-t) 40px 0 48px; }
  .lg-main { padding-top: 48px; }
  .lg-form { margin: 0 auto; width: 100%; }
}

/* ── Компьютер: сайдбар, шапка 64 px, рабочая область в две колонки ─────── */
@media (min-width: 1024px) {
  .app { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .rail { display: none; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--card); border-right: 1px solid var(--border);
  }
  .side .brand { display: grid; gap: 6px; padding: 22px 24px 18px; justify-items: start; }
  .side .brand img { height: 30px; width: auto; }
  .side .brand span { font-size: 14px; color: var(--text-2); padding-left: 2px; }
  .side nav { display: grid; gap: 2px; padding: 4px 0; }
  .side .si { position: relative; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 24px; font-size: 16px; font-weight: 500; color: #344054; width: 100%; }
  .side .si .ti { font-size: 24px; color: #475467; }
  .side .si:hover { background: var(--hover); }
  .side .si.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
  .side .si.on .ti { color: var(--brand); }
  .side .si.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
  .side .si .badge { position: static; margin-left: 2px; box-shadow: none; }
  /* аватар слева на две строки, имя и ⋮ сверху, роли под именем во всю ширину */
  .side .me { margin-top: auto; display: grid; grid-template-columns: 40px minmax(0, 1fr) 32px; align-items: center; column-gap: 8px; row-gap: 6px; padding: 16px 6px 18px 18px; border-top: 1px solid var(--border); }
  .side .me > .avatar { grid-row: 1 / span 2; }
  .side .me .grow { display: contents; }
  .side .me .nm { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side .me .roles { grid-column: 2 / span 2; grid-row: 2; gap: 6px; flex-wrap: wrap; }
  .side .me .role { height: 22px; padding: 0 8px; font-size: 12px; }
  .side .me .role .ti { display: none; }
  .side .me > .iconbtn { grid-column: 3; grid-row: 1; width: 32px; height: 36px; }

  .top { height: var(--top-h); padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .top-logo { display: none; }
  .top-ttl { display: flex; align-items: center; gap: 14px; margin-right: auto; min-width: 0; }
  .top-ttl h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; white-space: nowrap; }
  .upd { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
  .upd::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
  .upd.off::before { background: var(--warning); }
  .top .iconbtn, .top .avatar-btn { display: none; }
  .tbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: #344054; position: relative; }
  .tbtn .ti { font-size: 22px; }
  .tbtn:hover { background: var(--hover); }
  .tbtn .badge { position: static; box-shadow: none; margin-left: -2px; }
  .top-acts { gap: 8px; }
  .btn { min-height: 40px; padding: 0 20px; }
  .lg-form .btn-primary { min-height: 48px; font-size: 17px; }

  .view { max-width: 1400px; padding: 24px 28px 48px; }
  .netbar { margin: 12px 28px 0; width: auto; }
  .m-only { display: none !important; }

  /* расписание: лента + контекст */
  .sched-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--ctx-w); gap: 24px; align-items: start; }
  .sched-main { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; min-width: 0; }
  .sched-main-hd { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
  .sched-main-hd .grow { flex: 1; min-width: 0; }
  .sched-main-hd h2 { margin: 0; font-size: 26px; line-height: 32px; }
  .sched-main-hd p { margin: 2px 0 0; color: var(--text-2); }
  .seg { background: #f6f8fb; border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
  .seg .sb { border: 1px solid transparent; background: none; height: 38px; border-radius: 9px; }
  .seg .sb.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
  .strip-wrap { display: flex; align-items: center; gap: 8px; }
  .strip-wrap .navb { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; }
  .strip-wrap .strip { flex: 1; border: 0; gap: 8px; background: none; border-radius: 0; }
  .strip-wrap .strip.scroll { grid-auto-columns: calc((100% - 48px) / 7); }
  .strip-wrap .day { border: 1px solid var(--border); border-radius: 12px; background: var(--card); min-height: 86px; }
  .strip-wrap .day + .day { border-left: 1px solid var(--border); }
  .strip-wrap .day:hover { border-color: var(--border-2); }
  .strip-wrap .day.sel { border-color: var(--brand-cta); background: var(--brand-cta); }
  .dgroup-hd h3 { font-size: 19px; }
  .evs.tl { position: relative; padding-left: 28px; gap: 14px; }
  .evs.tl::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 2px; background: #e7ebf1; }
  .evs.tl .ev { overflow: visible; }
  .evs.tl .ev .tl-dot { display: block; position: absolute; left: -28px; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: #98a2b3; border: 3px solid var(--card); box-shadow: 0 0 0 1px #d0d7e2; }
  .evs.tl .ev .tl-dot.green { background: var(--card); border: 3px solid var(--brand); box-shadow: none; }
  .evs.tl .ev .tl-dot.blue { background: var(--card); border: 3px solid var(--action); box-shadow: none; }
  .evs.tl .ev .tl-dot.purple { background: var(--hotel); }
  .ev.now::before { display: none; }
  .ev.now, .ev.selected { border: 2px solid var(--brand); padding: 15px; }
  .ev.selected:not(.now) { border-color: var(--action); }
  .ev .dtime { display: grid; align-content: start; width: 118px; flex: none; }
  .ev .dtime b { font-size: 17px; line-height: 24px; font-variant-numeric: tabular-nums; }
  .ev .dtime span { font-size: 14px; color: var(--text-2); }
  .ev .dtime .own { color: var(--hotel); font-weight: 500; }
  .ev .m-time { display: none; }
  .ev .tile { width: 52px; height: 52px; border-radius: 50%; }
  .ev .tile.green { background: var(--brand); color: #fff; }
  .ev .tile.blue { background: var(--action); color: #fff; }
  .ev .tile.purple { background: var(--hotel); color: #fff; }
  .ev .tile.navy { background: var(--navy); color: #fff; }
  .ev .tile .ti { font-size: 26px; }
  .ev .evbtn { width: auto; justify-self: start; margin-top: 6px; }
  .ev .chev { display: none; }
  /* ⚠️ minmax(0,1fr): иначе строки «Дальше» с nowrap-текстом распирали колонку за край экрана */
  .ctx { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: calc(var(--top-h) + 24px); }
  .ctx > * { min-width: 0; }
  .ctx .card { padding: 20px; }
  .ctx-link { display: inline-flex; align-items: center; gap: 8px; color: var(--action); font-weight: 500; min-height: 36px; }
  .ctx-link .ti { font-size: 20px; }
  .ctx-when { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
  .ctx-when h3 { margin: 0; font-size: 22px; }
  #toasts { justify-items: end; padding: 0 28px; }

  .lg-main { padding: 36px 40px 24px; display: grid; align-content: center; }
  .lg-board { grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); }
  .lg-show { display: grid; align-content: start; gap: 16px; padding: 52px 48px; background: linear-gradient(160deg, #eefaf4 0%, #f8fbfd 70%); border-right: 1px solid var(--border); }
  .lg-show h2 { margin: 0; font-size: 44px; line-height: 50px; font-weight: 700; letter-spacing: -.015em; }
  .lg-show .sub { margin: 0; color: #475467; font-size: 18px; line-height: 28px; max-width: 30em; }
  .lg-form { padding: 76px 64px 48px; max-width: none; margin: 0; }
  .lg-form .kicker, .lg-form .lg-ok { display: none; }
  .code-inp { text-align: left; font-size: 20px; letter-spacing: .06em; min-height: 56px; padding-left: 18px; }
  .lg-or { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 14px; }
  .lg-or::before, .lg-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .demo { display: grid; gap: 4px; padding: 20px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); margin-top: 8px; }
  .demo-hd { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
  .demo-hd .grow { flex: 1; } .demo-hd .grow > span { color: var(--text-2); } .demo-hd b { display: block; font-size: 18px; color: var(--text); }
  .demo-hd .roles { flex-direction: column; align-items: flex-end; gap: 6px; }
  .demo-hd .role { height: 28px; font-size: 13px; }
  .demo-mark { width: 60px; height: 60px; border-radius: 50%; background: #eef4ff; display: grid; place-items: center; flex: none; }
  .demo-mark img { width: 34px; height: 34px; }
  .demo-sub { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-weight: 600; }
  .demo-sub span { color: var(--action); font-weight: 500; font-size: 15px; }
  .demo-ev { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
  .demo-ev + .demo-ev { border-top: 1px solid var(--border); }
  .demo-ev .tile { width: 52px; height: 52px; border-radius: 50%; }
  .demo-ev .tile.green { background: var(--brand); color: #fff; } .demo-ev .tile.blue { background: var(--action); color: #fff; }
  .demo-ev b { width: 56px; font-size: 18px; font-variant-numeric: tabular-nums; }
  .demo-ev .grow { display: grid; } .demo-ev .grow span { color: var(--text-2); font-size: 14px; }
}

@media (min-width: 1280px) { :root { --ctx-w: 400px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── Компьютер: раскладки разделов ─────────────────────────────────────── */
@media (min-width: 1024px) {
  .bz-wrap { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 24px; }
  .bz-side { position: sticky; top: calc(var(--top-h) + 24px); }
  .bz-d { min-height: 72px; }
  .km-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
  .km-wrap > .tour-pick, .km-wrap > .km-earn, .km-wrap > .km-h, .km-wrap > .empty, .km-wrap > .errblock, .km-wrap > [role="status"] { grid-column: span 1; }
  .km-wrap > .km-h, .km-wrap > .km-list, .km-wrap > .empty { grid-column: 1 / -1; }
  .km-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .scr-hd.dsk-hide { display: none; }
}

/* ── Инфо ──────────────────────────────────────────────────────────────── */
.btn-green-soft { background: var(--brand-soft); color: var(--brand-text); }
.btn-green-soft:hover { background: #d9f3e7; }
.inf-tour { display: grid; gap: 6px; margin-bottom: 12px; }
.inf-tour .lbl { font-size: 14px; font-weight: 600; color: var(--text-2); }
.inf-chips-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 2px var(--gutter); }
.inf-chips-row::-webkit-scrollbar { display: none; }
.inf-city { height: 44px; padding: 0 16px; font-size: 16px; flex: none; }
.inf-city.is-on { background: var(--brand-cta); border-color: var(--brand-cta); color: #fff; }
.inf-city .mine { margin-left: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: rgb(255 255 255 / .9); color: var(--brand-text); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.inf-city:not(.is-on) .mine { background: var(--brand-soft); }
.inf-cities { display: none; }
.inf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.inf-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; align-content: start; }
.inf-city-ttl { margin: 0 2px; }
.inf-side { display: none; }
.inf-place, .inf-ctc, .inf-note { display: grid; gap: 12px; }
.inf-place-hd, .inf-note-hd, .inf-ctc-hd { display: flex; gap: 14px; align-items: flex-start; }
.inf-place-hd .grow, .inf-note-hd .grow, .inf-ctc-hd .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inf-place-hd .t, .inf-ctc-hd .t, .inf-note-hd .t { font-size: 18px; line-height: 24px; font-weight: 700; overflow-wrap: anywhere; }
.inf-place-hd .s, .inf-ctc-hd .s { color: var(--text-2); font-size: 15px; }
.inf-ctc-hd .nt { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); font-size: 14px; margin-top: 2px; }
.inf-ctc-hd .nt .ti { font-size: 18px; flex: none; }
.inf-addr { display: flex; align-items: center; gap: 10px; font-size: 16px; overflow-wrap: anywhere; }
.inf-addr > .ti { font-size: 22px; color: var(--text-2); flex: none; }
.inf-addr span { flex: 1; min-width: 0; }
.inf-addr .iconbtn { width: 40px; height: 40px; }
.inf-addr .iconbtn .ti, .inf-row .iconbtn .ti { font-size: 20px; color: var(--text-2); }
.inf-rows { display: grid; border-top: 1px solid var(--border); padding-top: 6px; }
.inf-row { display: grid; grid-template-columns: 24px 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; }
.inf-row > .ti { font-size: 20px; color: var(--text-2); }
.inf-row .k { color: var(--text-2); font-size: 15px; }
.inf-row .v { font-size: 15px; overflow-wrap: anywhere; }
.inf-row .iconbtn { width: 40px; height: 40px; }
.inf-ctc-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.inf-phone { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.inf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inf-chips .chip { height: 36px; }
.inf-note.you { background: #f3fbf7; border-color: var(--brand-line); }
.inf-note-hd .t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inf-note-hd .b { white-space: pre-wrap; overflow-wrap: anywhere; color: #344054; font-size: 15px; line-height: 22px; margin-top: 2px; }
.inf-file { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); }
.inf-file .ti { font-size: 22px; color: var(--text-2); }
.inf-file .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.inf-gen { padding: 0; overflow: hidden; }
.inf-gen-hd { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; font-size: 17px; font-weight: 700; text-align: left; }
.inf-gen-hd .ti { font-size: 22px; color: var(--text-2); }
.inf-gen-hd .grow { flex: 1; }
.inf-gen-b { display: grid; gap: 12px; padding: 0 12px 12px; }
.inf-main .inf-place { border: 0; padding: 0; }
@media (min-width: 1024px) {
  .inf-chips-row { display: none; }
  .inf-grid { grid-template-columns: 220px minmax(0, 1fr) var(--ctx-w); gap: 20px; align-items: start; }
  .inf-cities { display: grid; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 8px; position: sticky; top: calc(var(--top-h) + 24px); }
  .inf-cl { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 500; text-align: left; color: #344054; }
  .inf-cl .ti { font-size: 20px; color: var(--text-2); }
  .inf-cl span { flex: 1; }
  .inf-cl:hover { background: var(--hover); }
  .inf-cl.on { background: var(--brand-soft); color: var(--brand-text); }
  .inf-cl.on .ti { color: var(--brand); }
  .inf-side { display: grid; gap: 16px; position: sticky; top: calc(var(--top-h) + 24px); min-width: 0; }
  .inf-tour { max-width: 480px; }
}
/* на компьютере название раздела уже в верхней строке — в самом разделе остаётся подзаголовок */
@media (min-width: 1024px) { .scr-hd .h1 { display: none; } .scr-hd { margin-top: 0; } .scr-hd .sub { margin: 0; font-size: 15px; } }

/* ── Выбор даты ────────────────────────────────────────────────────────── */
.dp-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dp-hd .ttl { flex: 1; text-align: center; font-size: 18px; font-weight: 700; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dp-dow { text-align: center; font-size: 13px; color: var(--text-2); padding: 4px 0; }
.dp-d { display: inline-flex; align-items: center; justify-content: center; justify-self: center; width: 100%; max-width: 48px; height: 44px; border-radius: 12px; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); }
.dp-d:hover { background: var(--hover); }
.dp-d.tour { background: var(--brand-soft); }
.dp-d.today { box-shadow: inset 0 0 0 2px var(--brand); font-weight: 700; color: var(--brand-text); }
.dp-d.sel { background: var(--navy); color: #fff; box-shadow: none; }
.dp-note { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; }
.dp-sw { width: 16px; height: 16px; border-radius: 5px; background: var(--brand-soft); display: inline-block; }
.dp-btn > .ti:first-child { font-size: 22px; color: var(--text-2); }

/* ── Расходы ───────────────────────────────────────────────────────────── */
.xp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.xp-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; align-content: start; }
.xp-side { display: none; }
.xp-sum { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border-color: var(--brand-line); }
.xp-sum .xs { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.xp-sum .xs > span:last-child { display: grid; }
.xp-sum .tile { background: var(--card); width: 44px; height: 44px; }
.xp-sum .s { font-size: 13px; color: #3f5a4c; white-space: nowrap; }
@media (max-width: 420px) { .xp-sum { gap: 8px; padding: 14px 12px; } .xp-sum .xs { gap: 8px; } .xp-sum .tile { width: 36px; height: 36px; } .xp-sum .tile .ti { font-size: 20px; } .xp-sum b { font-size: 20px; } }
.xp-sum b { font-size: 22px; line-height: 28px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-sum .div { width: 1px; align-self: stretch; background: var(--brand-line); }
.xp-chips { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.xp-chips .chip { height: 44px; padding: 0 16px; font-size: 15px; }
.xp-chips .dot { width: 10px; height: 10px; }
.dot.amber { background: var(--warning); }
.xp-sbtn { margin-left: auto; flex: none; }
.xp-search { position: relative; }
.xp-search > .ti { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-2); }
.xp-search .input { padding-left: 44px; }
.xp-g { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.xp-g-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px 2px; }
.xp-g-hd h3 { margin: 0; font-size: 20px; font-weight: 700; }
.xp-g-hd span { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.xp-g-hd b { color: var(--text); font-variant-numeric: tabular-nums; }
.xp-row { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.xp-row:hover { border-color: var(--border-2); }
.xp-row.done { opacity: .75; }
.xp-row .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.xp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.xp-t { font-size: 17px; line-height: 22px; font-weight: 700; text-align: left; overflow-wrap: anywhere; color: var(--text); padding: 0; }
.xp-amt { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-meta { font-size: 14px; color: var(--text-2); }
.xp-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.xp-rc { display: inline-flex; align-items: center; gap: 6px; color: var(--action); font-weight: 500; font-size: 15px; min-height: 32px; margin-left: auto; }
.xp-rc .ti { font-size: 18px; }
.xp-row .chev { color: var(--text-3); font-size: 22px; align-self: center; }
.xp-prog { display: grid; gap: 4px; flex: 1; min-width: 160px; }
.xp-prog .bar { height: 8px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.xp-prog .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.xp-prog .s { font-size: 14px; color: var(--text-2); }
.xp-row.queued { border-style: dashed; cursor: default; }
.xp-cta { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); margin-top: 16px; z-index: 5; }
.xp-cta .btn { min-height: 52px; box-shadow: var(--shadow-pop); }
.xp-q { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
/* форма */
.xf { display: grid; gap: 16px; }
.xf-steps { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 16px; border-bottom: 2px solid var(--border); }
.xf-steps span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0; color: var(--text-2); font-weight: 500; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.xf-steps span i { width: 26px; height: 26px; border-radius: 50%; background: #98a2b3; color: #fff; font-style: normal; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.xf-steps span.on { color: var(--brand-text); border-bottom-color: var(--brand); }
.xf-steps span.on i, .xf-steps span.done i { background: var(--brand-cta); }
.xf-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.xf-cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--card); font-size: 14px; line-height: 17px; text-align: center; color: #344054; }
.xf-cat .ti { font-size: 26px; }
.xf-cat.on { border: 2px solid var(--brand); background: var(--brand-soft); color: var(--brand-text); padding: 7px 3px; }
.xf-sum { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; }
.xf-amt { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.xf-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* ⚠️ у <button> в основе text-align: inherit — плитки выбора центрируем явно */
.xf-seg button { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); font-weight: 500; }
.xf-seg button.on { border: 2px solid var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.xf-cities { display: flex; flex-wrap: wrap; gap: 8px; }
.xf-cities .chip { height: 40px; padding: 0 14px; }
.xf-cities + .input { margin-top: 8px; }
.xf-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; color: var(--text-2); font-size: 15px; }
.xf-note .ti { font-size: 22px; }
.xf-rcs { display: flex; flex-wrap: wrap; gap: 10px; }
.xf-rc { position: relative; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-2); background: #f6f8fb; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-2); font-size: 13px; }
.xf-rc img { width: 100%; height: 100%; object-fit: cover; }
.xf-rc a { display: contents; }
.xf-rc .pdf { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.xf-rc .pdf .ti { font-size: 28px; }
.xf-rc.add { border-style: dashed; cursor: pointer; color: var(--action); font-weight: 500; }
.xf-rc.add .ti { font-size: 28px; }
.xf-rc-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgb(15 23 42 / .6); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.xf-rc-x .ti { font-size: 16px; }
.xf-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.xf-status.wait, .xf-status.part { background: var(--warning-soft); border-color: var(--warning-line); }
.xf-status .tile { background: var(--card); }
.xf-status .grow { display: grid; flex: 1; min-width: 120px; }
.xf-status .s { font-size: 14px; color: var(--text-2); }
.xf-status b { font-size: 22px; font-variant-numeric: tabular-nums; }
.xf-st { font-size: 14px; color: #344054; }
.xf-sumline { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; margin-bottom: 14px; }
.xf-sumline span { color: var(--text-2); font-size: 14px; }
.xf-sheet .sheet-ft { flex-wrap: wrap; }
.xf-del { flex-basis: 100%; }
@media (min-width: 1024px) {
  .xp-grid { grid-template-columns: minmax(0, 1fr) var(--ctx-w); gap: 24px; align-items: start; }
  .xp-side { display: block; position: sticky; top: calc(var(--top-h) + 24px); max-height: calc(100vh - var(--top-h) - 48px); overflow-y: auto; border-radius: var(--r-card); }
  .xf-panel { display: grid; gap: 14px; }
  .xf-panel-ft { display: grid; gap: 8px; }
  .xf-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xp-sum .xs { justify-content: flex-start; }
  .xt { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
  .xt-head, .xt-row { display: grid; grid-template-columns: 58px 40px minmax(0, 1fr) 104px 196px 84px; gap: 12px; align-items: center; padding: 10px 16px; }
  .xt-head { font-size: 13px; color: var(--text-2); font-weight: 600; background: #f9fafb; border-bottom: 1px solid var(--border); padding-top: 12px; padding-bottom: 12px; }
  .xt-row { cursor: pointer; min-height: 64px; }
  .xt-row + .xt-row { border-top: 1px solid var(--border); }
  .xt-row:hover { background: #fafbfd; }
  .xt-row.done { opacity: .75; }
  .xt-row .c-date { font-variant-numeric: tabular-nums; color: #344054; }
  .xt-row .c-cat { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .xt-row .c-cat .tile { width: 36px; height: 36px; border-radius: 50%; }
  .xt-row .c-cat .tile .ti { font-size: 19px; }
  .xt-row .c-cat span:last-child, .xt-row .c-desc .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .xt-row .c-desc { display: grid; min-width: 0; }
  .xt-row .c-desc .xp-t { font-size: 15px; font-weight: 600; }
  .xt-row .c-desc .s, .xt-row .c-sum .s { font-size: 13px; color: var(--text-2); }
  .xt-row .c-sum { display: grid; font-variant-numeric: tabular-nums; }
  .xt-row .c-st .xp-prog { min-width: 0; }
  .xt-row .c-rc .xp-rc { margin: 0; white-space: nowrap; font-size: 14px; }
}

/* ── Чат ───────────────────────────────────────────────────────────────── */
.ch-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.ch-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; font-size: 17px; font-weight: 500; color: #475467; }
.ch-tabs button .ti { font-size: 24px; }
.ch-tabs button.on { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 -3px 0 var(--brand); }
.ch-tabs button.on .ti { color: var(--brand); }
.ch-tabs .badge-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--error); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.ch-tools { display: flex; gap: 10px; margin: 14px 0; }
.ch-search { position: relative; flex: 1; min-width: 0; display: block; }
.ch-search > .ti { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--text-2); pointer-events: none; }
.ch-search .input { padding-left: 46px; }
.ch-newbtn { flex: none; width: 48px; padding: 0; }
.ch-newbtn .ti { font-size: 24px; }
.ch-newbtn span { display: none; }
.ch-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.ch-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 14px 16px; text-align: left; color: var(--text); }
.ch-row + .ch-row, .ch-row + .ch-fin, .ch-fin + .ch-row { border-top: 1px solid var(--border); }
.ch-row:hover { background: #fafbfd; }
.ch-row .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ch-row .t { font-size: 17px; line-height: 23px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row .s { font-size: 15px; line-height: 21px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row.unread .t { font-weight: 700; }
.ch-row.unread .s { color: #344054; }
.ch-row .end { display: grid; justify-items: end; align-content: start; gap: 8px; align-self: flex-start; padding-top: 2px; flex: none; }
.ch-row .tm { font-size: 14px; line-height: 18px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ch-row .cnt { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--action); color: #fff; font-size: 13px; font-weight: 700; line-height: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.ch-row .cnt.muted { background: #98a2b3; }
.ch-row .mute { font-size: 22px; color: var(--text-2); }
.ch-row.sel { background: #f3f6fb; }
.role-mini { display: inline-block; margin-left: 8px; padding: 0 8px; height: 20px; line-height: 20px; border-radius: 10px; background: var(--warning-soft); color: var(--warning-text); font-size: 12px; font-weight: 600; vertical-align: 2px; }
.ch-fin { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; font-size: 16px; font-weight: 500; color: var(--text); text-align: left; }
.ch-fin .grow { flex: 1; }
.ch-fin .ti { font-size: 24px; color: #475467; }
.ch-fin:hover { background: #fafbfd; }

.ch-av { width: 52px; height: 52px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #eef1f5; color: #344054; }
.ch-av .ti { font-size: 26px; }
.ch-av.purple { background: var(--hotel); color: #fff; }
.ch-av.amber { background: #f59e0b; color: #fff; }
.ch-av.blue { background: var(--action); color: #fff; }
.ch-av.green { background: var(--brand); color: #fff; }
.ch-av.navy { background: var(--navy); color: #fff; }
.ch-av.ini { font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.ch-av.ini.gray { background: #eef1f5; color: #344054; }
.ch-av.ini.blue { background: var(--action-soft); color: #1e40af; }
.ch-av.ini.purple { background: var(--hotel-soft); color: #5b21b6; }
.ch-av.ini.green { background: var(--brand-soft); color: var(--brand-text); }
.ch-av.ini.amber { background: var(--warning-soft); color: var(--warning-text); }
.ch-av.sm, .ch-av.xs { width: 40px; height: 40px; font-size: 14px; }
.ch-av.sm .ti { font-size: 22px; }
.ch-dm { display: inline-flex; align-items: center; gap: 6px; color: var(--action); font-weight: 600; font-size: 15px; flex: none; }
.ch-dm .ti { font-size: 20px; }

/* переписка: на телефоне — поверх экрана между верхом и нижним меню, на компьютере — справа */
.ch-pane-conv { display: none; }
.ch-hd { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 6px 8px 2px; background: var(--card); border-bottom: 1px solid var(--border); flex: none; }
.ch-hd .grow { flex: 1; min-width: 0; display: grid; }
.ch-hd .t { font-size: 18px; line-height: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-hd .s { font-size: 14px; line-height: 20px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-hd .ch-av { width: 44px; height: 44px; }
.ch-hd .ch-av .ti { font-size: 22px; }
.ch-hd .iconbtn .ti { font-size: 26px; }
.ch-ppl { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 8px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--text); flex: none; font-variant-numeric: tabular-nums; }
.ch-ppl .ti { font-size: 24px; }
.ch-ppl:hover { background: var(--hover); }
@media (max-width: 767px) { .ch-ppl { width: 44px; justify-content: center; padding: 0; } .ch-ppl span { display: none; } }
.ch-off { display: flex; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--warning-line); background: var(--warning-soft); color: #7a4310; font-size: 14px; line-height: 20px; flex: none; }
.ch-off .ti { font-size: 22px; color: var(--warning-text); flex: none; }
.ch-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ch-msgs { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 12px 14px; display: flex; flex-direction: column; }
.ch-msgs > :first-child { margin-top: auto; }
.ch-day { display: flex; justify-content: center; margin: 16px 0 4px; position: relative; }
.ch-day span { position: relative; padding: 4px 14px; border-radius: var(--r-pill); background: #e9edf3; color: #475467; font-size: 14px; line-height: 20px; font-weight: 500; }
.ch-sys { margin: auto; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--text-2); font-size: 15px; line-height: 22px; padding: 24px 12px; }
.ch-sys > .ti { font-size: 32px; color: var(--text-3); }
.ch-more { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); color: var(--action); font-size: 14px; font-weight: 500; margin: 6px 0 4px; }
.ch-more .ti { font-size: 18px; }
.ch-more:hover { background: var(--action-soft); }

.ch-m { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; }
.ch-m.cont { margin-top: 4px; }
.ch-m.me { justify-content: flex-end; }
.ch-av-gap { width: 40px; flex: none; }
.ch-bwrap { display: grid; justify-items: start; min-width: 0; max-width: min(82%, 560px); }
.ch-m.me .ch-bwrap { justify-items: end; }
.ch-who { font-size: 14px; line-height: 20px; color: var(--text-2); margin: 0 0 4px 2px; }
.ch-who b { color: var(--text); font-weight: 600; }
.ch-b { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; font-size: 16px; line-height: 23px; color: var(--text); max-width: 100%; min-width: 0; -webkit-touch-callout: none; transition: transform .12s; }
.ch-m.me .ch-b { background: var(--brand-soft); border-color: #cdeedd; }
.ch-b.pic { padding: 4px; }
.ch-b.press { transform: scale(.98); }
.ch-b .tx { white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-b .tx a { color: var(--action); text-decoration: underline; }
.ch-b .pend { display: inline-flex; vertical-align: -3px; margin-left: 8px; color: var(--text-2); }
.ch-b .pend .ti { font-size: 18px; }
.ch-t { display: flex; align-items: center; gap: 6px; margin: 4px 2px 0; font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ch-t .rd { display: inline-flex; align-items: center; gap: 2px; color: var(--text-3); }
.ch-t .rd .ti { font-size: 17px; }
.ch-t .rd.on { color: var(--brand); font-weight: 600; }
.ch-t .q { color: var(--brand-text); font-weight: 500; }
.ch-t .fail { display: inline-flex; align-items: center; gap: 4px; color: var(--error-text); font-weight: 500; }
.ch-t .fail .ti { font-size: 16px; }
.ch-t .lnk { color: var(--action); font-weight: 600; text-decoration: underline; min-height: 32px; padding: 0 4px; }
.ch-m.failed .ch-b { border-color: var(--error-line); }
.ch-q { display: grid; gap: 1px; width: 100%; text-align: left; margin: 2px 0 8px; padding: 6px 10px; border-left: 3px solid var(--brand); border-radius: 8px; background: #f1f4f8; font-size: 14px; line-height: 20px; }
.ch-m.me .ch-q { background: rgb(255 255 255 / .7); }
.ch-q b { font-weight: 600; color: var(--text); }
.ch-q span { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-fl { display: flex; align-items: center; gap: 12px; margin: 2px 0 6px; padding: 8px 10px 8px 8px; border-radius: 12px; background: #f1f4f8; color: var(--text); min-width: min(240px, 100%); max-width: 100%; }
.ch-m.me .ch-fl { background: rgb(255 255 255 / .7); }
.ch-fl .fi { width: 40px; height: 40px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; flex: none; color: #475467; }
.ch-fl .fi .ti { font-size: 24px; }
.ch-fl .fi.pdf { color: #d92d20; background: #fef3f2; border-color: #fecdca; }
.ch-fl .fi.xls { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.ch-fl .fi.doc { color: var(--action); background: var(--action-soft); border-color: var(--action-line); }
.ch-fl .grow { flex: 1; min-width: 0; display: grid; font-size: 15px; line-height: 20px; }
.ch-fl .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-fl .z { color: var(--text-2); white-space: nowrap; font-size: 13px; line-height: 18px; }
.ch-fl .dl { font-size: 24px; color: var(--action); flex: none; }
.ch-b > .ch-fl:last-child { margin-bottom: 0; }
.ch-img { display: block; }
.ch-img img { max-width: min(280px, 100%); max-height: 320px; border-radius: 12px; object-fit: cover; background: #eef1f5; }
.ch-b:not(.pic) .ch-img { margin: 2px 0 8px; }
.ch-reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ch-reacts button { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--border); font-size: 15px; }
.ch-reacts button span { font-size: 13px; font-weight: 600; color: #475467; font-variant-numeric: tabular-nums; }
.ch-reacts button.mine { background: var(--action-soft); border-color: var(--action-line); }
.ch-reacts button.mine span { color: var(--action); }
.ch-m.flash .ch-b { box-shadow: 0 0 0 3px rgb(37 99 235 / .35); transition: box-shadow .2s; }

.ch-down { position: absolute; right: 14px; bottom: 12px; width: 48px; height: 48px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-pop); display: inline-flex; align-items: center; justify-content: center; color: var(--action); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.ch-down.show { opacity: 1; transform: none; pointer-events: auto; }
.ch-down .ti { font-size: 24px; }
.ch-down .cnt { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--error); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }

.ch-cmp { flex: none; background: var(--bg); padding: 6px 10px 8px; }
.ch-bar { display: flex; align-items: center; gap: 10px; margin: 0 2px 6px; padding: 6px 6px 6px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.ch-bar > .ti { font-size: 22px; color: var(--action); flex: none; }
.ch-bar .grow { flex: 1; min-width: 0; display: grid; font-size: 14px; line-height: 19px; }
.ch-bar b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-bar .grow span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-bar .iconbtn { width: 36px; height: 36px; }
.ch-bar .iconbtn .ti { font-size: 20px; }
.ch-in { display: flex; align-items: flex-end; gap: 6px; }
.ch-clip { color: #475467; cursor: pointer; }
.ch-clip .ti { font-size: 26px; }
.ch-inwrap { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--card); border: 1px solid var(--border-2); border-radius: 24px; padding: 0 2px 0 16px; min-height: 48px; transition: border-color .15s, box-shadow .15s; }
.ch-inwrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(10 163 108 / .15); }
.ch-inwrap textarea { flex: 1; min-width: 0; border: 0; background: none; resize: none; outline: none; padding: 12px 0; font-size: 16px; line-height: 22px; max-height: 140px; color: var(--text); }
.ch-inwrap textarea::placeholder { color: var(--text-2); }
.ch-inwrap textarea:focus-visible { outline: none; }
.ch-at { width: 42px; height: 46px; color: #475467; }
.ch-at .ti { font-size: 24px; }
.ch-send { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-cta); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ch-send:hover { background: var(--brand-cta-hover); }
.ch-send:active { background: var(--brand-cta-press); }
.ch-send .ti { font-size: 24px; margin-left: -2px; }

.ch-menu { position: fixed; inset: 0; z-index: 1050; }
.ch-menu .ov { position: absolute; inset: 0; background: rgb(15 23 42 / .12); }
.ch-menu .box { position: absolute; min-width: 248px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 6px; display: grid; animation: chpop .14s ease-out; }
@keyframes chpop { from { opacity: 0; transform: scale(.96); } }
.ch-menu .box > button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px; font-size: 16px; color: var(--text); text-align: left; }
.ch-menu .box > button .ti { font-size: 22px; color: #475467; }
.ch-menu .box > button:hover, .ch-menu .box > button:focus-visible { background: var(--hover); outline: none; }
.ch-menu .box > .danger, .ch-menu .box > .danger .ti { color: var(--error-text); }
.ch-emo { display: flex; justify-content: space-between; gap: 2px; padding: 2px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.ch-emo button { width: 38px; height: 44px; border-radius: 10px; font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.ch-emo button:hover, .ch-emo button:focus-visible { background: var(--hover); outline: none; }
.ch-placeholder { margin: auto; display: grid; justify-items: center; gap: 6px; color: var(--text-2); text-align: center; padding: 24px; }
.ch-placeholder .ti { font-size: 44px; color: var(--text-3); }
.ch-placeholder b { color: var(--text); font-size: 18px; font-weight: 600; }

@media (max-width: 1023px) {
  body.chat-open .ch-pane-conv {
    display: flex; flex-direction: column; position: fixed; z-index: 70; left: 0; right: 0; top: var(--cht, 0px);
    height: calc(var(--chh, 100vh) - var(--tabbar-h) - var(--safe-b)); background: var(--bg);
  }
  body.chat-open.kb-open .ch-pane-conv { height: var(--chh, 100vh); }
  body.chat-open.kb-open .tabbar { display: none; }
  html.chat-lock, html.chat-lock body { overflow: hidden; overscroll-behavior: none; }
  body.chat-open .top, body.chat-open .netbar { visibility: hidden; }
  body.chat-open #toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 76px); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.chat-open .ch-pane-conv { left: var(--rail-w); height: var(--chh, 100vh); }
  body.chat-open #toasts { bottom: 90px; }
}
@media (min-width: 1024px) {
  .ch-grid { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 20px; height: calc(100vh - var(--top-h) - 48px); height: calc(100dvh - var(--top-h) - 48px); min-height: 540px; }
  .ch-pane-list { display: flex; flex-direction: column; min-height: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px 16px 0; overflow: hidden; }
  .ch-pane-list > .ch-list { flex: 1; min-height: 0; overflow-y: auto; border: 0; border-radius: 0; margin: 0 -16px; border-top: 1px solid var(--border); }
  .ch-pane-list > .empty { border: 0; margin-top: 24px; }
  .ch-tabs button { height: 46px; font-size: 16px; }
  .ch-tools { margin: 14px 0 12px; }
  .ch-newbtn { width: auto; padding: 0 18px; background: var(--action); color: #fff; }
  .ch-newbtn:hover { background: #1d4ed8; }
  .ch-newbtn span { display: inline; }
  .ch-row { min-height: 80px; padding: 12px 16px; }
  .ch-row.sel { background: #f3f6fb; box-shadow: inset 4px 0 0 var(--brand); }
  .ch-pane-conv { display: flex; flex-direction: column; min-height: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
  .ch-hd { padding: 12px 16px 12px 6px; }
  .ch-hd .ch-av { width: 52px; height: 52px; }
  .ch-hd .t { font-size: 20px; line-height: 28px; }
  .ch-body { order: 2; }
  .ch-off { order: 3; margin: 0; border-radius: 0; border-width: 1px 0 0; }
  .ch-cmp { order: 4; background: var(--card); border-top: 1px solid var(--border); padding: 12px 16px; }
  .ch-msgs { padding: 8px 24px 16px; }
  .ch-day::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
  .ch-bwrap { max-width: min(72%, 640px); }
  .ch-down { right: 24px; bottom: 16px; }
  .ch-menu .ov { background: transparent; }
}

/* ── Поддержка ─────────────────────────────────────────────────────────── */
.tile.gray { background: #eef1f5; color: #475467; }
.sp2-sub { margin: 0 0 12px; color: var(--text-2); font-size: 15px; line-height: 22px; }
.sp2-new { margin-bottom: 14px; min-height: 52px; font-size: 17px; }
.sp2-new .ti { font-size: 24px; }
.sp2-search { display: block; flex: none; margin-bottom: 12px; }
.sp2-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sp2-chips button { height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); font-size: 16px; font-weight: 500; color: #475467; text-align: center; }
.sp2-chips button.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-text); font-weight: 600; }
.sp2-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.sp2-card { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 16px; text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); }
.sp2-card:hover { border-color: var(--border-2); }
.sp2-card.sel { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.sp2-tile { width: 52px; height: 52px; border-radius: 14px; }
.sp2-tile .ti { font-size: 26px; }
.sp2-card .grow { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sp2-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sp2-top .t { font-size: 17px; line-height: 23px; font-weight: 700; overflow-wrap: anywhere; }
.sp2-top .tm { flex: none; font-size: 14px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp2-mid { display: flex; align-items: center; gap: 10px; }
.sp2-mid .no { color: var(--text-2); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp2-mid .cnt { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--error); color: #fff; font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
.sp2-last { display: flex; gap: 8px; color: var(--text-2); font-size: 15px; line-height: 21px; }
.sp2-last .ti { font-size: 20px; flex: none; margin-top: 1px; }
.sp2-last span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sp2-card > .chev { align-self: center; color: var(--text-3); font-size: 22px; flex: none; }
.sp2-urgent { display: flex; gap: 14px; margin-top: 16px; padding: 16px; border-radius: var(--r-card); background: var(--action-soft); border: 1px solid var(--action-line); }
.sp2-urgent .ic .ti { font-size: 28px; color: var(--action); }
.sp2-urgent .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sp2-urgent b { font-size: 17px; line-height: 23px; }
.sp2-urgent span { color: #475467; font-size: 15px; line-height: 21px; }
.sp2-urgent .btn { margin-top: 10px; background: #dbe8fe; }
.sp2-urgent .btn:hover { background: #cfe0fd; }

.sp2-hd .pill { margin-right: 6px; flex: none; }
.sp2-msgs > :first-child { margin-top: 0; }
.sp2-head { display: flex; gap: 14px; align-items: flex-start; margin: 8px 0 6px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); }
.sp2-head .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sp2-head b { font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
.sp2-head .muted { font-size: 14px; line-height: 20px; }
.sp2-chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sp2-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: #eef1f5; color: #344054; font-size: 14px; font-weight: 500; max-width: 100%; }
.sp2-chip .ti { font-size: 16px; }
.sp2-sys { align-self: center; margin: 14px 0 4px; padding: 4px 12px; border-radius: var(--r-pill); background: #eef1f5; color: #475467; font-size: 13px; line-height: 18px; text-align: center; max-width: 92%; }
.ch-b.del { background: transparent; border-style: dashed; }
.sp2-del { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-style: italic; font-size: 15px; }
.sp2-del .ti { font-size: 17px; }
.sp2-close { min-height: 44px; margin: 0 2px 8px; width: calc(100% - 4px); font-size: 15px; }
.sp2-close .ti { font-size: 20px; color: var(--brand); }
.sp2-closed { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 8px 10px; color: var(--text-2); font-size: 14px; line-height: 20px; text-align: center; }
.sp2-closed .ti { font-size: 18px; flex: none; }
.sp2-form { display: grid; gap: 18px; }
.sp2-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.sp2-shots:empty { display: none; }
.sp2-shot { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #eef1f5; }
.sp2-shot img { width: 100%; height: 100%; object-fit: cover; }
.sp2-shot button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgb(15 23 42 / .6); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.sp2-shot button .ti { font-size: 16px; }
.sp2-pickrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp2-pickrow .btn { cursor: pointer; }
.sp2-ctx { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f1f4f8; color: #475467; font-size: 14px; line-height: 20px; }
.sp2-ctx .ti { font-size: 20px; flex: none; color: var(--text-2); }
@media (min-width: 1024px) {
  .sp2-grid .ch-pane-list { padding: 16px; }
  .sp2-grid .sp2-cards { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -16px; padding: 2px 16px 4px; }
  .sp2-grid .sp2-urgent { flex: none; margin-top: 12px; padding: 12px 14px; gap: 12px; }
  .sp2-grid .sp2-urgent b { font-size: 16px; line-height: 22px; }
  .sp2-grid .sp2-urgent .btn { margin-top: 6px; min-height: 40px; }
  .sp2-new { min-height: 48px; font-size: 16px; }
}

/* ── Формы событий администратора ──────────────────────────────────────── */
.fab { position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 55; width: 60px; height: 60px; border-radius: 50%; background: var(--brand-cta); color: #fff; box-shadow: 0 10px 24px rgb(6 133 85 / .35); display: inline-flex; align-items: center; justify-content: center; }
.fab:hover { background: var(--brand-cta-hover); }
.fab .ti { font-size: 30px; }
@media (min-width: 768px) { .fab { bottom: 24px; right: 24px; } }
.ef { display: grid; gap: 16px; padding-bottom: 8px; }
.ef .field { min-width: 0; }
.ef .req { color: var(--error); margin-left: 2px; }
.ef-steps { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 4px; font-size: 16px; color: var(--text-2); }
.ef-steps > span { display: inline-flex; align-items: center; gap: 8px; }
.ef-steps b { width: 32px; height: 32px; border-radius: 50%; background: #e4e7ec; color: #475467; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ef-steps b .ti { font-size: 18px; }
.ef-steps .on, .ef-steps .done { color: var(--brand-text); font-weight: 500; }
.ef-steps .on b, .ef-steps .done b { background: var(--brand); color: #fff; }
.ef-steps > i { width: 56px; height: 2px; background: #e4e7ec; border-radius: 1px; }
.ef-steps > i.done { background: var(--brand); }
.ef-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ef-type button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); font-size: 17px; font-weight: 500; color: #344054; }
.ef-type button .ti { font-size: 24px; }
.ef-type button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.ef-type button.acc.on { background: var(--hotel-soft); border-color: #c4b1f5; color: var(--hotel); }
.ef-info { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f1f4f8; color: #475467; font-size: 15px; line-height: 21px; }
.ef-info .ti { font-size: 22px; flex: none; }
.ef-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 479px) { .ef-row2 .tp-btn > .ti:last-child { display: none; } .ef-row2 .tp-btn .t { font-size: 16px; } }
.ef .tp-btn.dp-btn { min-height: 52px; padding: 6px 12px; gap: 10px; }
.ef .tp-btn.empty .t { color: var(--text-2); font-weight: 400; }
.ef .tp-btn[disabled] { background: #f8fafc; }
.ef-was { font-size: 13px; line-height: 18px; color: var(--text-2); padding-left: 4px; }
.ef-presets { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.ef-presets::-webkit-scrollbar { display: none; }
.ef-presets button { flex: none; height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--border); background: #f1f4f8; font-size: 15px; font-weight: 500; color: #344054; font-variant-numeric: tabular-nums; }
.ef-presets button.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-text); }
.ef-icin { position: relative; }
.ef-icin > .ti { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--text-2); pointer-events: none; }
.ef-icin .input { padding-left: 46px; }
.ef-cnt { color: var(--action); font-weight: 600; }
.ef-mem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 8px 12px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--card); text-align: left; }
.ef-mem .grow { flex: 1; min-width: 0; font-size: 15px; }
.ef-mem .chev { color: var(--text-2); font-size: 22px; flex: none; }
.ef-mem .avs { display: flex; }
.ef-mem .av { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; box-shadow: 0 0 0 2px var(--card); }
.ef-mem .av + .av { margin-left: -8px; }
.ef-mem .av.green { background: var(--brand-soft); color: var(--brand-text); }
.ef-mem .av.red { background: #fde8e8; color: #b42318; }
.ef-mem .av.blue { background: var(--action-soft); color: #1e40af; }
.ef-mem .av.amber { background: var(--warning-soft); color: var(--warning-text); }
.ef-mem .av.purple { background: var(--hotel-soft); color: #5b21b6; }
.ef-mem .av.more { background: #eef1f5; color: #475467; }
.ef-acc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ef-acc button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--card); font-size: 14px; color: #344054; }
.ef-acc button .ti { font-size: 26px; }
.ef-acc button.on { background: var(--hotel-soft); border-color: #c4b1f5; color: var(--hotel); font-weight: 600; }
.ef-created { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-card); background: #f7f5fd; }
.ef-created .h { font-size: 16px; }
.ef-cr { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.ef-cr .grow { display: grid; min-width: 0; }
.ef-cr .grow span { color: var(--text-2); font-size: 15px; }
.ef-diff { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.ef-diff > .ti { font-size: 24px; color: var(--brand); flex: none; }
.ef-diff .grow { display: grid; gap: 2px; font-size: 15px; line-height: 21px; }
.ef-diff b { color: var(--brand-text); }
.ef-del { flex-basis: 100% !important; justify-content: center; }
.ef-ok { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 24px 8px 8px; }
.ef-ok > .ti { font-size: 64px; color: var(--brand); }
.ef-ok b { font-size: 20px; line-height: 28px; }
.ef-ok span { font-size: 16px; line-height: 23px; color: #344054; }
.ef-ok .muted { font-size: 15px; }
.ef-mtools { display: flex; justify-content: space-between; margin: 0 -8px 6px; }
.ef-mrow .grow .t { font-size: 16px; font-weight: 500; }
.ef-check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-2); display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.ef-check.on { background: var(--brand-cta); border-color: var(--brand-cta); }
.ef-check .ti { font-size: 18px; }
.tpk-now { text-align: center; font-size: 40px; line-height: 48px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.tpk-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tpk-grid button { display: inline-flex; align-items: center; justify-content: center; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-size: 16px; font-variant-numeric: tabular-nums; }
.tpk-grid button:hover { background: var(--hover); }
.tpk-grid button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (max-width: 359px) { .ef-row2 { grid-template-columns: minmax(0, 1fr); } .ef-acc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sched-main-hd .btn-primary { min-height: 40px; } }

/* ── Узкие телефоны (30.09.2026) ───────────────────────────────────────────
   Стоит в конце, чтобы перебить основные правила разделов. Проверка — mobile-audit.js на 320–430. */
@media (max-width: 389px) {
  .xp-chips { gap: 6px; }
  .xp-chips .chip { height: 40px; padding: 0 12px; font-size: 14px; }
  .xp-sbtn { width: 40px; height: 40px; }
  .xp-sum { gap: 8px; padding: 14px 12px; }
  .xp-sum .tile { display: none; }
  .xp-sum b { font-size: 20px; line-height: 26px; }
}
@media (max-width: 345px) {
  .xp-chips .chip { padding: 0 10px; }
  .xp-chips .dot { display: none; }
  .tab { font-size: 10.5px; letter-spacing: -.01em; }
  .tab span { white-space: nowrap; }
  .tab .ti { font-size: 24px; }
  .ef-type button { gap: 6px; font-size: 15px; }
  .ef-type button .ti { font-size: 20px; }
  .sp2-card { gap: 12px; padding: 14px 12px; }
  .sp2-tile { width: 44px; height: 44px; }
  .sp2-chips { gap: 8px; }
  .sp2-chips button { font-size: 15px; }
}
