/* ArchiFlow — каркас экрана «По частоте» (shell-v13.js, pages-v13.js; Claude, 18.11.2026).
   Слева — аватар и один значок «Проекты»; панель «Проекты» выезжает поверх содержимого; справа у проекта — полоса
   значков разделов (.afr — её рисует pages-v13.js). На телефоне: вверху «Помощник / Проект», внизу — разделы.
   Подключается последним в web/dist/index.html: переопределяет раскладку собранного интерфейса, не меняя его. */

:root { --afs-rail: 64px; --afs-panel: 284px; --afr-w: 48px; --afr-h: 58px; --afs-red: #d4685d; --afs-redbg: #b4483f; }

/* ---------- сетка: полоса 64 · чат · разделитель · проект ---------- */
html.afs-desk .app:not(.phone) { grid-template-columns: var(--afs-rail) minmax(0, 1fr) 8px var(--afs-pw, 420px) !important; }

/* ---------- левая полоса: аватар и «Проекты» ---------- */
.app > .rail { padding: 14px 0 10px; border-right: 1px solid var(--line); position: relative; z-index: 51; }
.app > .rail .ritem, .app > .rail .railfoot, .app > .rail .rspacer { display: none !important; }
.app > .rail .avatar { width: 36px; height: 36px; font-size: 15px; margin-bottom: 16px; }
.afs-rb { position: relative; width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.afs-rb:hover { color: var(--text); background: #f2f0ec0d; }
.afs-rb.on { color: var(--gold); }
.afs-rb.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--gold); }
.afs-rb:focus-visible, .afs-ib:focus-visible, .afs-open:focus-visible, .afs-fb:focus-visible { outline: 1px solid var(--gold-line); outline-offset: 1px; }

/* ---------- панель «Проекты» ---------- */
.afs-veil { position: fixed; inset: 0; z-index: 49; display: none; background: transparent; }
html.afs-on .afs-veil { display: block; }
.afs-panel {
  position: fixed; left: var(--afs-rail); top: 0; bottom: 0; width: var(--afs-panel); z-index: 50; box-sizing: border-box;
  display: flex; flex-direction: column; background: #232325; border-right: 1px solid var(--gold-line);
  box-shadow: 12px 0 36px rgba(0,0,0,.5); color: var(--text); font-size: 13px;
  transform: translateX(-104%); visibility: hidden; pointer-events: none; transition: transform .22s ease, visibility 0s linear .22s;
}
html.afs-on .afs-panel { transform: none; visibility: visible; pointer-events: auto; transition: transform .22s ease; }
@media (prefers-reduced-motion: reduce) { .afs-panel { transition: none !important; } }
.afs-top { flex: none; padding: 14px 12px 4px; }
.afs-top[hidden], .afs-back[hidden], .afs-foot[hidden], .afs-toast[hidden], .afs-chats[hidden] { display: none !important; }
.afs-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 36px; margin: 0 0 10px; border: 1px solid var(--gold-line); border-radius: 18px; color: var(--gold); font-size: 13px; }
.afs-new:hover { background: var(--gold-soft); }
.afs-newform { display: flex; gap: 6px; margin: 0 0 10px; }
.afs-newform input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--gold-line); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.afs-newform button { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--gold); color: #1c1c1e; font-weight: 600; font-size: 12.5px; }
.afs-search { display: flex; align-items: center; gap: 8px; height: 34px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--bg); }
.afs-search:focus-within { border-color: var(--gold-line); }
.afs-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 13px; }
.afs-search input::placeholder { color: var(--dim); }
.afs-search input::-webkit-search-cancel-button { display: none; }
.afs-back { flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 12px 8px; }
.afs-back button { display: flex; align-items: center; gap: 6px; color: var(--gold); font-size: 13px; padding: 4px 8px 4px 4px; border-radius: 8px; }
.afs-back button:hover { background: #f2f0ec0d; }
.afs-back b { font-size: 15px; font-weight: 600; }
.afs-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 10px; scrollbar-width: thin; scrollbar-color: #3a3a3e transparent; }
.afs-group h4, .afs-sub { margin: 0; padding: 12px 8px 6px; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.afs-group h4 span, .afs-sub span { opacity: .7; margin-left: 4px; }
.afs-row { position: relative; display: flex; align-items: center; gap: 2px; padding: 0 4px 0 0; border-radius: 8px; margin-bottom: 2px; }
.afs-row.on { background: #2b2a26; box-shadow: inset 2px 0 0 var(--gold); }
.afs-row.dropto { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }
.afs-row.drag { opacity: .4; }
.afs-row.dbefore::before, .afs-row.dafter::after { content: ""; position: absolute; left: 6px; right: 6px; height: 2px; border-radius: 2px; background: var(--gold); }
.afs-row.dbefore::before { top: -2px; } .afs-row.dafter::after { bottom: -2px; }
.afs-open { flex: 1; min-width: 0; display: block; text-align: left; padding: 7px 4px 7px 0; color: var(--text); }
.afs-open b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afs-open small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afs-grip { width: 18px; height: 30px; flex: none; color: var(--muted); opacity: 0; cursor: grab; touch-action: none; display: grid; place-items: center; }
.afs-grip.none { cursor: default; }
.afs-ib { width: 26px; height: 26px; flex: none; border-radius: 6px; display: grid; place-items: center; color: var(--muted); opacity: 0; }
.afs-ib.pinned { color: var(--gold); }
.afs-ib:hover { background: #f2f0ec12; color: var(--text); }
.afs-row:focus-within .afs-grip, .afs-row:focus-within .afs-ib, .afs-row.menu-on .afs-ib { opacity: 1; }
@media (hover: hover) { .afs-row:hover { background: #2a2a2d; } .afs-row.on:hover { background: #2f2d28; } .afs-row:hover .afs-grip:not(.none), .afs-row:hover .afs-ib { opacity: 1; } }
@media (hover: none) { .afs-grip:not(.none), .afs-ib { opacity: 1; } }
.afs-rn { flex: 1; min-width: 0; margin: 4px 6px 4px 18px; height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--gold-line); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; outline: 0; }
.afs-emp, .afs-err { color: var(--muted); font-size: 12px; padding: 6px 10px 8px; margin: 0; }
.afs-err { color: var(--conf); }
.afs-xrow { padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; background: var(--bg); }
.afs-xrow b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afs-xrow small { color: var(--muted); font-size: 11px; }
.afs-xa { display: flex; gap: 14px; margin-top: 6px; }
.afs-xa button { font-size: 12px; color: var(--gold); }
.afs-xa .dz, .afs-menu .dz { color: var(--afs-red); }
.afts-mode .afs-xa { display: none; }
.afs-panel > .afts-bar { border-top: 0; border-bottom: 1px solid var(--line); padding: 6px 12px; }

/* «Чаты» в панели: сворачиваемый раздел, список рисует dialogs-v13.js */
.afs-chats { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 2px; }
.afs-panel[data-view="archived"] .afs-chats, .afs-panel[data-view="trash"] .afs-chats { border-top: 0; margin-top: 10px; }
.afs-chhead { display: flex; align-items: center; gap: 2px; padding-right: 4px; }
.afs-chtog { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 10px 8px 8px; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-align: left; }
.afs-chtog svg { transition: transform .15s; transform: rotate(90deg); }
.afs-chtog[aria-expanded="false"] svg { transform: none; }
.afs-chtog i { font-style: normal; opacity: .7; }
.afs-chtog:hover { color: var(--text); }
.afs-chnew { opacity: 1; }
.afs-chats.shut .afs-chbody { display: none; }
.afs-chbody .afd { position: static; display: flex; flex-direction: column; width: auto; background: transparent; border: 0; font-size: 13px; }
.afs-chbody .afd-list { flex: none; overflow: visible; padding: 0; }
.afs-chbody .afd-group h4 { padding: 6px 8px 3px; font-size: 10.5px; }
.afs-chbody .afd-group + .afd-group { margin-top: 4px; }
.afs-chbody .afd-t { font-size: 13px; }
.afs-chbody .afd-open { padding: 6px 4px 6px 18px; }
.afs-chbody .afd-empty { padding: 4px 10px 8px; font-size: 12px; }
.afs-chbody .afd-foot, .afs-chbody .afd-vhead { display: none !important; }
.afs-chbody .afd-drop { margin: 6px 0; }
.afs-chbody .afd-toast { position: static; margin: 6px 0; }
.afs-chbody .afts-bar { border-top: 0; padding: 6px 2px; }

.afs-toast { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 9px 12px; background: #2a2a2d; border: 1px solid var(--gold-line); border-radius: 10px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.afs-toast span { flex: 1; min-width: 0; }
.afs-toast button { color: var(--gold); font-weight: 500; flex: none; }
.afs-foot { flex: none; display: flex; flex-direction: column; padding: 8px; border-top: 1px solid var(--line); }
.afs-fb { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13px; text-align: left; }
.afs-fb:hover, .afs-fb.on { background: #2a2a2d; color: var(--text); }
.afs-fb em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.afs-menu { position: fixed; z-index: 76; min-width: 176px; background: #2a2a2d; border: 1px solid var(--gold-line); border-radius: 10px; padding: 4px; box-shadow: 0 10px 28px rgba(0,0,0,.55); }
.afs-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text); }
.afs-menu button:hover, .afs-menu button:focus-visible { background: #f2f0ec0f; outline: 0; }

/* ---------- проект не открыт: спокойное «Выберите проект» вместо старого списка ---------- */
.projectpane.afs-homepane > :not(.afs-home):not(.modal) { display: none !important; }
.afs-home { margin: auto; padding: 24px 12px 60px; text-align: center; max-width: 340px; }
.afs-home-ic { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 14px; background: var(--card); color: var(--muted); display: grid; place-items: center; }
.afs-home h2 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.afs-home p { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.afs-home-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.afs-home-b { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line2); color: var(--text); font-size: 13px; }
.afs-home-b:hover { border-color: var(--gold-line); }
.afs-home-b.gold { border-color: var(--gold-line); color: var(--gold); }

/* ---------- «Настройки»: приложение · аккаунт · площадка ---------- */
.afs-settabs { flex: none; display: flex; gap: 2px; align-self: flex-start; margin: 0 0 14px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.afs-settabs button { padding: 5px 14px; border-radius: 7px; color: var(--muted); font-size: 12.5px; }
.afs-settabs button.on { background: #323236; color: var(--text); box-shadow: inset 0 0 0 1px var(--gold-line); }
.projectpane.afs-set-acc > [data-screen="account"] > .afplat, .projectpane.afs-set-acc > [data-screen="account"] > .afplat-hidden { display: none !important; }
.projectpane.afs-set-plat > [data-screen="account"] > :not(.afplat):not(.acchead) { display: none !important; }

/* ---------- телефон ---------- */
html.afs-phone .app.phone { grid-template-columns: minmax(0, 1fr) !important; }
html.afs-phone .app.phone > .rail { display: none !important; }
html.afs-phone .afs-panel { left: 0; width: min(322px, 88vw); padding-top: env(safe-area-inset-top); }
html.afs-phone .afs-veil { background: rgba(10,10,11,.55); }
html.afs-phone .afs-foot { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
html.afs-phone .afs-row { min-height: 44px; }
html.afs-phone .afs-fb { height: 42px; }

/* ================= раздел проекта: шапка, вкладки, полоса значков (pages-v13.js) ================= */
html.af-rail.afs-desk .app:not(.phone) > .projectpane { width: calc(100% - var(--afr-w)); }
.projectpane .stagehint { display: none !important; } /* подписи этапа в шапке нет (решение владелицы) */
.afset-back { display: none !important; }

.afg { padding-top: 0; }
.afg-head { top: 0; padding: 14px 0 10px; }
.afg-hrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.afg-pn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 8px; margin-left: -8px; border-radius: 8px; color: var(--text); text-align: left; }
.afg-pn .afg-name { padding: 0; font-size: 20px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afg-pn svg { flex: none; transform: rotate(90deg); color: var(--muted); transition: transform .15s, color .15s; }
html.afs-on .afg-pn svg { transform: rotate(-90deg); color: var(--gold); }
button.afg-pn:hover { background: #f2f0ec0d; }
button.afg-pn:focus-visible, .afr-b:focus-visible, .afr-row:focus-visible, .afg-hset:focus-visible { outline: 1px solid var(--gold-line); outline-offset: 1px; }
.afg-chip { flex: none; font-size: 11.5px; font-weight: 500; color: var(--gold); border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: 12px; padding: 2px 10px; white-space: nowrap; }
.afg-hset { display: none; flex: none; margin-left: auto; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); align-items: center; justify-content: center; }
.afg-sub { display: flex; gap: 4px; margin: 10px 0 0; overflow-x: auto; scrollbar-width: none; }
.afg-sub::-webkit-scrollbar { display: none; }
.afg-sub button { flex: none; padding: 5px 12px; border-radius: 14px; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.afg-sub button:hover { color: var(--text); background: transparent; }
.afg-sub button.on { color: var(--text); background: #2a2a2d; border-color: var(--gold-line); outline: 0; }
.afg-body { padding-top: 4px; }

/* полоса значков справа */
.afr-rail {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--afr-w); z-index: 41; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0 10px;
  background: var(--center); border-left: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
}
.afr-rail::-webkit-scrollbar { display: none; }
.afr-b { position: relative; width: 36px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); }
.afr-b.on { color: var(--gold); }
.afr-rail .afr-b.on, .afr-rail .afr-more.open, .afr-rail .afr-more.exp { background: #2a2a2d; }
.afr-rail .afr-more.open, .afr-rail .afr-more.exp { color: var(--gold); }
.afr-rail .afr-b.on::after { content: ""; position: absolute; right: -6px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--gold); }
@media (hover: hover) { .afr-rail .afr-b:hover { color: var(--text); background: #2a2a2d; } .afr-rail .afr-b.on:hover { color: var(--gold); } }
.afr-div { width: 22px; height: 1px; background: var(--line); margin: 6px 0; flex: none; }
.afr-ic { position: relative; display: block; line-height: 0; }
.afr-bdg { position: absolute; top: -8px; right: -9px; box-sizing: border-box; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #323236; border: 1px solid var(--line2); color: var(--text); font-size: 9.5px; font-weight: 600; line-height: 14px; font-style: normal; text-align: center; white-space: nowrap; pointer-events: none; }
.afr-bdg.red { background: var(--afs-redbg); border-color: var(--afs-redbg); color: #fff; }
.afr-dot { position: absolute; top: -4px; right: -5px; width: 8px; height: 8px; box-sizing: content-box; border-radius: 50%; background: var(--afs-red); border: 2px solid var(--center); }
.afr [data-afbadge]::after, .afr-dd [data-afbadge]::after, .afr-sheet [data-afbadge]::after { display: none !important; }

/* «Ещё»: список поверх содержимого (компьютер) и лист снизу (телефон) */
.afr-dd { position: fixed; z-index: 47; width: 236px; box-sizing: border-box; background: #232325; border: 1px solid var(--gold-line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.55); padding: 6px; }
.afr-rows { display: flex; flex-direction: column; gap: 1px; }
.afr-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13px; text-align: left; }
.afr-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afr-row.on { background: #2e2e31; color: var(--text); }
.afr-row.on svg { color: var(--gold); }
@media (hover: hover) { .afr-row:hover { background: #2e2e31; color: var(--text); } }
.afr-n { flex: none; font-style: normal; font-size: 11px; color: var(--gold); }
.afr-n.red { background: var(--afs-redbg); color: #fff; border-radius: 8px; padding: 0 6px; font-size: 10.5px; line-height: 16px; }

/* Календарь проекта */
.afcal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 4px; }
.afcal-sw { display: inline-flex; gap: 2px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.afcal-sw button { padding: 5px 14px; border-radius: 7px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.afcal-sw button.on { background: #323236; color: var(--text); box-shadow: inset 0 0 0 1px var(--gold-line); }
.afcal-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; padding: 12px; background: var(--card); border-radius: 12px; }
.afcal-form input { height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line2); background: transparent; color: var(--text); font: inherit; font-size: 13px; color-scheme: dark; outline: none; }
.afcal-form input:focus { border-color: var(--gold-line); }
.afcal-form input[name="title"] { flex: 1 1 200px; min-width: 0; }
.afcal-row { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }
.afg-day h3 + .afcal-row { border-top: 0; }
.afcal-d { flex: none; min-width: 44px; text-align: center; font-size: 11.5px; color: var(--muted); background: #232325; border-radius: 8px; padding: 2px 6px; }
.afcal-row.today .afcal-d { color: var(--gold); }
.afcal-tm { flex: none; width: 38px; font-size: 12px; color: var(--muted); }
.afcal-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afcal-t small { color: var(--dim); font-size: 11px; }
.afcal-row.past .afcal-t { color: var(--muted); }
.afcal-x { flex: none; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); opacity: 0; font-size: 16px; }
.afcal-row:hover .afcal-x, .afcal-x:focus-visible { opacity: 1; }
@media (hover: none) { .afcal-x { opacity: 1; } }
.afcal-x:hover { color: var(--conf); background: #f2f0ec0d; }
[data-screen="calendar"] > .afcal-top { margin: 0 0 12px; }

/* ================= телефон: «Помощник / Проект» сверху, разделы внизу ================= */
.app.phone .phonetabs { display: flex !important; align-items: center; gap: 8px; padding: 8px 12px 6px !important; box-sizing: border-box; height: 50px; }
.afs-pb { flex: none; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.app.phone .phonetabs > .afs-pb { border-radius: 9px; padding: 0; height: 36px; border-color: var(--line); color: var(--text); }
.afs-pbsp { flex: none; width: 36px; }
.app.phone .phonetabs > button:not(.afs-pb) { flex: none; height: 32px; padding: 0 18px; border-radius: 16px; font-size: 12.5px; }
.app.phone .phonetabs > button:not(.afs-pb):first-of-type { margin-left: auto; }
.app.phone .phonetabs > .afs-pb + button { margin-left: auto; }
.app.phone .phonetabs > .afs-pbsp { margin-left: auto; }
.app.phone .phonetabs > button[hidden] { display: none !important; }
html.afs-phone .afg { padding-left: 14px; padding-right: 14px; }
html.afs-phone .afg-head { padding-top: 6px; }
html.afs-phone .afg-pn .afg-name { font-size: 19px; }
html.afs-phone .afg-hset { display: flex; }
html.afs-phone .afg-chip { display: none; }
html.afs-phone .afg-sub { margin-right: -14px; padding-right: 14px; }
/* ряды кнопок-фильтров на телефоне листаются вбок, а не обрезаются */
html.afs-phone .afg-tabs, html.afs-phone .afbuy-filters, html.afs-phone .afi-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
html.afs-phone .afg-tabs::-webkit-scrollbar { display: none; }
html.afs-phone .afg-tabs > * { flex: none; }

.afr-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; box-sizing: border-box;
  height: calc(var(--afr-h) + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px);
  display: flex; align-items: stretch; background: var(--center); border-top: 1px solid var(--line);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.afr-bar::-webkit-scrollbar { display: none; }
.afr-bar .afr-b { flex: 1 1 0; min-width: 0; width: auto; height: auto; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 12px 2px 6px; border-radius: 0; font-size: 10.5px; color: var(--muted); }
.afr-bar.exp .afr-b { flex: 0 0 auto; min-width: 74px; padding-left: 6px; padding-right: 6px; }
.afr-bar .afr-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.afr-bar .afr-b.on { color: var(--text); }
.afr-bar .afr-b.on svg { color: var(--gold); }
.afr-bar .afr-b.on::before { content: ""; position: absolute; top: 0; left: 50%; width: 24px; margin-left: -12px; height: 2px; border-radius: 2px; background: var(--gold); }
.afr-bar .afr-more.exp svg { color: var(--gold); }
/* счётчик целиком внутри полосы: «99+» не обрезается ни сверху, ни сбоку */
.afr-bar .afr-bdg { top: -7px; right: auto; left: 12px; }
.afr-scrim { position: fixed; inset: 0; z-index: 47; background: rgba(10,10,11,.55); }
.afr-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 48; box-sizing: border-box; background: #232325; border-top: 1px solid var(--gold-line); border-radius: 20px 20px 0 0; padding: 8px 14px calc(22px + env(safe-area-inset-bottom, 0px)); }
.afr-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line2); margin: 0 auto 12px; }
.afr-sheet .afr-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.afr-sheet .afr-row { height: 46px; padding: 0 12px; gap: 10px; font-size: 13.5px; background: #2c2c2f; }
.afr-sheet .afr-row.on { background: #35332d; }
/* общие правила старых вкладок (.afg-pnav button) на полосу значков не действуют */
.afr.afg-pnav .afr-b, .afr-dd.afg-pnav .afr-row, .afr-sheet.afg-pnav .afr-row { outline: 0; }
.afr-bar.afg-pnav .afr-b, .afr-bar.afg-pnav .afr-b.on, .afr-bar.afg-pnav .afr-b:hover { background: transparent; }
.afr-rail.afg-pnav .afr-b { padding: 0; font-size: inherit; }
.afr-bar .afr-l { font-size: 10px; letter-spacing: -.01em; }
.afr-bar:not(.exp) .afr-b { padding-left: 0; padding-right: 0; }
/* старое правило .afg-pnav (перенос строк, отступ сверху) на полосы и вкладки раздела не действует */
.afr.afg-pnav { flex-wrap: nowrap; margin: 0; }
.afr-bar.afg-pnav { gap: 0; }
.afr-dd.afg-pnav, .afr-sheet.afg-pnav { display: block; margin: 0; }
.afg-sub.afg-pnav { flex-wrap: nowrap; }

/* ================= правка владелицы: панель «Проекты» — боковая колонка, как в приложении Claude =================
   Компьютер: открыта — колонка 260px слева, сдвигает содержимое (чат и проект делят остальное; проекту — не больше,
   чем останется после чата ~380px); свёрнута — только узкая полоса. Телефон — по-прежнему лист поверх экрана. */
:root { --afs-panel: 260px; }
html.afs-desk .afs-veil { display: none !important; }
html.afs-desk .afs-panel { background: var(--rail); border-right: 1px solid var(--line); box-shadow: none; transition: none; }
html.afs-on.afs-desk .app:not(.phone) { grid-template-columns: calc(var(--afs-rail) + var(--afs-panel)) minmax(0, 1fr) 8px min(var(--afs-pw, 420px), max(360px, calc(100vw - var(--afs-rail) - var(--afs-panel) - 8px - 380px))) !important; }
html.afs-on.afs-desk .app > .rail { width: var(--afs-rail); box-sizing: border-box; justify-self: start; border-right-color: transparent; }
.afs-rb.on::before { display: none; }
.afs-rb.on { color: var(--text); background: #f2f0ec0d; }

.afs-top { padding: 12px 8px 2px; }
.afs-new { justify-content: flex-start; gap: 10px; height: 34px; margin: 0; padding: 0 10px; border: 0; border-radius: 8px; color: var(--text); font-size: 13.5px; }
.afs-new svg { color: var(--gold); }
.afs-new:hover { background: #f2f0ec0d; }
.afs-newform { margin: 0 2px 4px; }
.afs-newform input, .afs-newform button { height: 34px; border-radius: 9px; }
.afs-panel > .afs-search { flex: none; margin: 0 12px 6px; }
.afs-panel > .afs-search[hidden] { display: none; }
.afs-back { padding: 12px 10px 8px; }
.afs-scroll { padding: 2px 8px 10px; }
.afs-group { margin-top: 6px; }
.afs-gh { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px 6px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; text-align: left; border-radius: 6px; }
.afs-gh svg { opacity: 0; transform: rotate(90deg); transition: transform .15s, opacity .12s; }
.afs-gh[aria-expanded="false"] svg { transform: none; opacity: .8; }
.afs-gh:hover { color: var(--text); }
.afs-gh:hover svg, .afs-gh:focus-visible svg { opacity: .8; }
@media (hover: none) { .afs-gh svg { opacity: .8; } }
.afs-row { min-height: 32px; margin-bottom: 1px; }
.afs-row.on { background: #f2f0ec14; box-shadow: none; }
@media (hover: hover) { .afs-row:hover { background: #f2f0ec0b; } .afs-row.on:hover { background: #f2f0ec17; } }
.afs-grip { width: 10px; height: 28px; margin-left: 0; }
.afs-grip svg { width: 10px; }
.afs-open { padding: 6px 4px 6px 0; }
.afs-open b { font-weight: 400; font-size: 13.5px; color: #e6e3dc; }
.afs-row.on .afs-open b { color: var(--text); }
.afs-ib { display: none; }
.afs-row:hover .afs-ib, .afs-row:focus-within .afs-ib, .afs-row.menu-on .afs-ib, .afs-ib.afs-chnew { display: grid; opacity: 1; }
@media (hover: none) { .afs-ib { display: grid; } }
.afs-ib.pinned { display: none !important; } /* закреплённые и так в своей группе; «Открепить» — в «⋯» */
.afs-all { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13px; text-align: left; }
.afs-all span { flex: 1; }
.afs-all em { font-style: normal; font-size: 11.5px; opacity: .8; }
.afs-all:hover { background: #f2f0ec0b; color: var(--text); }
.afs-chats { margin-top: 6px; border-top: 0; padding-top: 0; }
.afs-chhead { padding-right: 2px; }
.afs-chtog { padding: 8px 10px 6px; font-size: 11.5px; letter-spacing: .02em; }
.afs-chtog svg { transform: rotate(90deg); }
.afs-chbody .afd-open { padding: 6px 4px 6px 10px; }
.afs-chbody .afd-t { font-size: 13.5px; }
.afs-chbody .afd-row.on { background: #f2f0ec14; }
.afs-foot { padding: 6px 8px 8px; }
.afs-fb { height: 34px; }
