/* «Форма» – стили приложения, вариант 1 «Кольца».
   Токены и компоненты перенесены из макетов design/components.css и design/v1.css. */

:root {
  --brand: #304B8E;        /* синий из логотипа */
  --brand-700: #24396E;
  --brand-ink: #FFFFFF;
  --ink: #22262E;          /* графит */
  --ink-2: #5A616E;
  --ink-3: #8C929E;
  --line: #E3E7EE;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F7;    /* светло-серая подложка */
  --tint: #E9EEF9;         /* светло-голубая подложка */
  --tint-2: #F3F6FC;
  --ring: #D5DEF0;         /* тонкие кольца */
  --r: 14px;
  --r-sm: 10px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --warn: #9A5B00; --warn-bg: #FFF4E0;
  --ok: #2E7552; --ok-bg: #E5F3EC;
  --danger: #A3302A; --danger-bg: #FBE9E7;
  --t-vm: #304B8E; --t-oy: #2D7476; --t-ms: #6A4E9C; --t-ab: #9A6326;
  --tb-h: 62px;            /* нижнее меню без safe-area */
  --side-w: 248px;
  color-scheme: light;
}

/* ── база ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.4 var(--font);
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { flex: none; display: block; }
.flip { transform: rotate(180deg); }
.logo { border-radius: 50%; display: block; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rings { display: block; stroke: var(--ring); stroke-width: 1.2; pointer-events: none; }

/* ── кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; white-space: nowrap; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn-p { background: var(--brand); color: var(--brand-ink); }
.btn-p:hover { background: var(--brand-700); }
.btn-o { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-o:hover { background: var(--surface-2); }
.btn-o.danger { color: var(--danger); }
.btn-t { color: var(--brand); font-weight: 500; font-size: 14px; }
.btn-t:hover { text-decoration: underline; }
.icb { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); position: relative; flex: none; }
.icb:hover { background: var(--surface-2); }
.icb.sm { width: 30px; height: 30px; }
.icb em, .tb-ic em { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: #fff; font: 600 11px/17px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.icb em.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 7px; right: 8px; }

/* ── шапка раздела ── */
.hdr { background: var(--surface); padding: 4px 16px 14px; }
.hdr-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.h-title { font-size: 24px; font-weight: 600; margin: 0; flex: 1; letter-spacing: -.01em; }
.h-title.sm { font-size: 17px; }
.h-stack { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.h-kicker { font-size: 12.5px; color: var(--ink-2); }
.hdr-chat { display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); }
.pad { padding: 14px 16px 24px; }
.v1-top { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.v1-top > *:not(.v1-rings) { position: relative; }
.v1-rings { position: absolute; right: -86px; top: -110px; }
.hello { font-size: 17px; font-weight: 600; }
.hdr .seg { margin-top: 8px; }

/* ── переключатели ── */
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 30, 50, .08), 0 0 0 1px var(--line); }
.seg.small button { height: 30px; font-size: 13px; padding: 0 12px; }
.av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px/1 var(--font); font-style: normal; color: #fff; background: var(--brand); flex: none; }
.av-varya { background: #6E86C4; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); white-space: nowrap; flex: none; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── секции ── */
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.sec h2 { font-size: 17px; font-weight: 600; margin: 0; }
.sec a { font-size: 14px; color: var(--brand); font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--brand); }
.row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.small { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 500; color: var(--brand); background: var(--tint); border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.status { font-size: 12px; font-weight: 500; color: var(--warn); background: var(--warn-bg); padding: 2px 8px; border-radius: 7px; }
.meter { height: 4px; background: #DCE3F1; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.count { font-size: 13px; color: var(--ink-2); }

/* ── карточка занятия ── */
.lc { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.lc-time { width: 52px; flex: none; border-right: 1px solid var(--line); padding-right: 12px; }
.lc-time b { display: block; font-size: 20px; font-weight: 600; color: var(--brand); line-height: 1.1; letter-spacing: -.01em; }
.lc-time span { font-size: 13px; color: var(--ink-2); }
.lc-body { flex: 1; min-width: 0; }
.lc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lc-top b { font-size: 16px; font-weight: 600; }
.kid { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.kid .av { width: 20px; height: 20px; font-size: 10px; }
.lc-meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.lc-act { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.lc.acro { border-style: dashed; border-color: #B7C4E2; background: var(--tint-2); }
.next-day { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; color: var(--ink-2); padding: 0 4px; }
.next-day .ic { margin-top: 1px; color: var(--brand); }
.next-day b { color: var(--ink); font-weight: 600; }

/* ── важное: объявление и оплата ── */
.imp-card { background: var(--tint); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; }
.imp-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid #C9D5EE; box-shadow: 0 0 0 12px var(--tint), 0 0 0 13px #C9D5EE; }
.imp-card > * { position: relative; z-index: 1; }
.imp-card b { display: block; font-size: 16px; margin: 4px 0 2px; }
.imp-card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.pay-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.pay-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; flex: none; }
.pay-body { flex: 1; min-width: 0; }
.pay-body .kicker { color: var(--warn); }
.pay-body b { display: block; font-size: 15px; margin: 2px 0 6px; }
.pay-body ul { list-style: none; margin: 0; padding: 0; }
.pay-body li { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; border-top: 1px solid var(--line); }
.pay-body strong { font-weight: 600; }
.pay-body small { font-weight: 400; color: var(--ink-2); font-size: 12px; }

/* ── новости и разделы на главной ── */
.news-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.news-row::-webkit-scrollbar { display: none; }
.news { flex: none; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.news .photo { height: 130px; border-radius: 0; }
.news-b { padding: 10px 12px 12px; }
.news-b .meta { font-size: 12px; color: var(--ink-3); }
.news-b b { display: block; font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.links a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: var(--ink-2); text-align: center; }
.links a:hover { border-color: #C9D5EE; }
.links .ic { color: var(--brand); }
.links em { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 10px; font-weight: 600; color: #fff; background: var(--brand); border-radius: 8px; padding: 0 5px; }

/* ── неделя в расписании ── */
.week { display: flex; gap: 4px; margin-top: 12px; }
.week button { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0 7px; border-radius: 10px; font-size: 12px; color: var(--ink-2); }
.week b { font-size: 17px; color: var(--ink); font-weight: 600; }
.week i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); margin-top: 3px; }
.week i.no { background: transparent; }
.week button.on { background: var(--brand); color: rgba(255, 255, 255, .8); }
.week button.on b { color: #fff; }
.week button.on i { background: #fff; }
.kid-legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.kid-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kid-legend .av { width: 20px; height: 20px; font-size: 10px; }
.day-h { font-size: 14px; font-weight: 600; margin: 18px 0 8px; color: var(--ink); }

/* ── отметки журнала ── */
.mk { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: 15px; background: var(--tint); color: var(--brand); }
.mk-B { background: var(--warn-bg); color: var(--warn); }
.mk-SO { background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
.mk-N { background: var(--danger-bg); color: var(--danger); }
.mk-other { background: transparent; color: var(--brand); border: 1px dashed currentColor; font-size: 12px; font-weight: 500; }
.mk-empty { background: transparent; border: 1px dashed var(--line); }
.mk-4, .mk-3 { background: var(--tint-2); }

/* ── журнал родителя ── */
.j-month { display: flex; align-items: center; justify-content: space-between; }
.j-month b { font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.stats b { display: block; font-size: 22px; font-weight: 600; line-height: 1.1; }
.stats b small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.stats span { font-size: 12px; color: var(--ink-2); }
.jlist { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.jr { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: flex-start; }
.jr:first-child { border-top: 0; }
.jr-date { width: 34px; flex: none; text-align: center; }
.jr-date b { display: block; font-size: 18px; font-weight: 600; line-height: 1.1; }
.jr-date span { font-size: 12px; color: var(--ink-3); }
.jr-main { flex: 1; min-width: 0; padding-top: 1px; }
.jr-type { font-weight: 500; }
.jr-sub { font-size: 13px; color: var(--ink-2); }
.jr-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--brand); margin-top: 2px; }
.jr-note { margin-top: 8px; font-size: 13px; background: var(--tint-2); border-radius: 8px; padding: 8px 10px; color: var(--ink); }
.jr-note b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); font-weight: 600; margin-bottom: 2px; }
.jr.future .jr-type { color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mk { min-width: 26px; height: 24px; font-size: 12px; padding: 0 5px; border-radius: 7px; }

/* ── журнал педагога ── */
.t-meta { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); margin-top: 6px; flex-wrap: wrap; }
.t-meta span { display: inline-flex; align-items: center; gap: 4px; }
.t-prog { margin-left: auto; color: var(--brand) !important; font-weight: 500; }
.tlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tr { padding: 10px 14px; border-top: 1px solid var(--line); }
.tr:first-child { border-top: 0; }
.tr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tr-name { font-weight: 500; }
.guest { display: block; font-style: normal; font-size: 12px; color: var(--brand); font-weight: 400; }
.tr-note { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.tr.open { background: var(--tint-2); }
.picker { display: flex; gap: 5px; margin-top: 10px; align-items: center; }
.picker button { flex: 1; height: 40px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.picker button.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.picker button.abs { font-size: 13px; color: var(--ink-2); flex: 1.1; }
.picker i { width: 1px; height: 26px; background: var(--line); flex: none; }
.tr-add { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--brand); }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 12px 2px 0; }

/* ── чат ── */
.pinbar { display: flex; gap: 10px; align-items: flex-start; padding: 9px 16px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--brand); }
.pinbar b { display: block; font-weight: 600; font-size: 12px; }
.pinbar span { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.msgs { padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.day-sep { text-align: center; font-size: 12px; color: var(--ink-3); margin: 4px 0; }
.day-sep span { background: var(--surface-2); padding: 3px 10px; border-radius: 10px; }
.msg { max-width: 84%; }
.msg.mine { align-self: flex-end; }
.who { font-size: 12.5px; font-weight: 600; color: var(--brand); margin: 0 0 3px 10px; }
.who em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 6px; padding: 8px 12px 6px; font-size: 14.5px; overflow-wrap: anywhere; }
.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 6px 16px; }
.bubble time, .msg > time { display: block; text-align: right; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.mine .bubble time { color: rgba(255, 255, 255, .7); }
.quote { border-left: 2px solid var(--brand); padding: 1px 0 1px 8px; margin-bottom: 4px; font-size: 13px; color: var(--ink-2); }
.card-msg { max-width: 92%; }
.pc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pc-ph { height: 112px; }
.pc-body { padding: 10px 12px 12px; }
.pc-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--brand); font-weight: 500; }
.pc-body b { display: block; font-size: 15.5px; margin: 2px 0 2px; }
.pc-body p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.pc-act { display: flex; gap: 8px; margin-top: 10px; }
.pc-act .btn { flex: 1; }
.composer { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.composer .inp { flex: 1; height: 40px; border-radius: 20px; background: var(--surface-2); color: var(--ink); padding: 0 14px; display: flex; align-items: center; font-size: 14.5px; border: 0; font-family: inherit; }
.composer .send { background: var(--brand); color: #fff; }

/* ── плейсхолдеры фото ── */
.photo { position: relative; border-radius: var(--r-sm); overflow: hidden; background: #8FA3CF; }
.photo span { position: absolute; left: 8px; bottom: 7px; display: inline-flex; gap: 4px; align-items: center; font-size: 11px; color: rgba(255, 255, 255, .85); background: rgba(10, 20, 50, .25); padding: 2px 7px 2px 5px; border-radius: 8px; z-index: 1; }
.ph-stage { background:
  radial-gradient(60% 90% at 30% 0%, rgba(255, 240, 210, .75), transparent 60%),
  radial-gradient(50% 80% at 78% 10%, rgba(190, 210, 255, .7), transparent 60%),
  linear-gradient(180deg, #2B3D72 0%, #3E5596 55%, #1F2D57 100%); }
.ph-stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background:
  radial-gradient(14px 34px at 22% 100%, #182448 98%, transparent), radial-gradient(12px 30px at 38% 100%, #182448 98%, transparent),
  radial-gradient(14px 36px at 54% 100%, #182448 98%, transparent), radial-gradient(12px 30px at 70% 100%, #182448 98%, transparent),
  radial-gradient(14px 33px at 85% 100%, #182448 98%, transparent); }
.ph-studio { background:
  linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, .25) 18% 19%, transparent 19% 48%, rgba(255, 255, 255, .25) 48% 49%, transparent 49% 78%, rgba(255, 255, 255, .25) 78% 79%, transparent 79%),
  linear-gradient(180deg, #C9D6EE 0 62%, #A9B8D6 62% 64%, #D9C7A8 64% 100%); }

/* ── админка: панель инструментов, сетка расписания, правая колонка ── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.wk { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.wk b { font-weight: 500; min-width: 150px; text-align: center; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; width: 230px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-3); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 8px; min-height: 46px; flex-wrap: wrap; }
.flt { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; color: var(--ink); }
.legend-t { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legend-t span { display: inline-flex; align-items: center; gap: 6px; }
.legend-t i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); }
.legend-t .lg-acro i { background: transparent; border: 1.5px dashed var(--ink-3); }
.t-vm { --tc: var(--t-vm); } .t-oy { --tc: var(--t-oy); } .t-ms { --tc: var(--t-ms); } .t-ab { --tc: var(--t-ab); }

.grid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; margin-bottom: 18px; }
.g-heads { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.g-corner { width: 52px; flex: none; }
.g-dh { flex: 1; border-left: 1px solid var(--line); padding: 7px 0 0; text-align: center; }
.g-dh b { font-weight: 600; font-size: 13px; }
.g-dh span { display: flex; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.g-dh span i { flex: 1; font-style: normal; padding-bottom: 5px; }
.g-dh.today b { color: var(--brand); }
.g-dh.today { box-shadow: inset 0 -2px 0 var(--brand); }
.g-body { position: relative; flex: none; margin-top: 6px; }
.g-times { position: absolute; left: 0; top: 0; width: 52px; height: 100%; }
.g-times .g-hour span { position: absolute; top: -7px; right: 8px; font-size: 11px; color: var(--ink-3); }
.g-lines { position: absolute; left: 52px; right: 0; top: 0; height: 100%; }
.g-lines .g-hour { border-top: 1px solid var(--line); }
.g-lines .g-hour span { display: none; }
.g-hour { position: absolute; left: 0; right: 0; }
.g-days { position: absolute; left: 52px; right: 0; top: 0; bottom: 0; display: flex; }
.g-day { flex: 1; display: flex; border-left: 1px solid var(--line); }
.g-day.today { background: rgba(48, 75, 142, .035); }
.g-hall { flex: 1; position: relative; }
.g-hall + .g-hall { border-left: 1px dashed var(--line); }
.blk { position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 2px 5px; overflow: hidden; font-size: 11px; line-height: 1.2;
  background: color-mix(in srgb, var(--tc) 11%, white); border-left: 3px solid var(--tc); color: var(--ink); }
.blk b { display: block; font-weight: 600; font-size: 11.5px; }
.b-meta { display: block; color: var(--tc); font-weight: 600; font-size: 10.5px; margin-top: 1px; }
.b-time { color: var(--ink-2); font-weight: 500; }
.blk.acrodop { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tc) 7%, white) 0 6px, white 6px 12px); border: 1.5px dashed var(--tc); border-left-width: 3px; border-left-style: solid; }
.blk.sel { box-shadow: 0 0 0 2px var(--brand), 0 8px 18px -8px rgba(48, 75, 142, .6); z-index: 2; }
.g-now { position: absolute; left: 52px; right: 0; height: 0; border-top: 1.5px solid #D0473B; }
.g-now::before { content: ""; position: absolute; left: -5px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #D0473B; }

.rail { width: 300px; flex: none; display: flex; flex-direction: column; gap: 14px; }
.r-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.r-kicker { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.r-title { display: block; font-size: 17px; font-weight: 600; }
.r-meta { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.r-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px; color: var(--brand); background: var(--tint); padding: 4px 9px; border-radius: 7px; }
.r-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.todo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.todo:first-of-type { border-top: 0; padding-top: 0; }
.todo b { display: block; font-size: 13px; font-weight: 500; }
.todo span { font-size: 12px; color: var(--ink-3); }
.todo strong { font-size: 16px; font-weight: 600; white-space: nowrap; }
.todo.warn strong { color: var(--warn); }
.todo.info strong { color: var(--brand); }
.imp-stats { display: flex; gap: 6px; margin-top: 10px; }
.imp-stats span { flex: 1; background: var(--surface-2); border-radius: 8px; padding: 7px 8px; font-size: 11px; color: var(--ink-2); line-height: 1.25; }
.imp-stats b { display: block; font-size: 17px; color: var(--ink); }

/* ── заглушка раздела ── */
.stub { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: flex-start; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 18px; }
.stub::after { content: ""; position: absolute; right: -46px; bottom: -46px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid #DCE3F1; box-shadow: 0 0 0 12px var(--surface), 0 0 0 13px #DCE3F1; pointer-events: none; }
.stub > * { position: relative; z-index: 1; }
.stub-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.stub b { display: block; font-size: 16px; font-weight: 600; }
.stub p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 52ch; }

/* ── каркас: шапка телефона ── */
.app { min-height: 100vh; min-height: 100dvh; }
.app-main { min-width: 0; }
.m-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0 16px; background: var(--surface); transition: box-shadow .15s; }
.m-top.scrolled { box-shadow: 0 1px 0 var(--line); }
.m-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }

/* ── боковое меню (на телефоне – выезжающая панель) ── */
.side { width: var(--side-w); flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; position: relative; overflow: hidden; }
.side::after { content: ""; position: absolute; left: -120px; bottom: -120px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid #DCE3F1; box-shadow: 0 0 0 18px var(--surface), 0 0 0 19px #DCE3F1, 0 0 0 36px var(--surface), 0 0 0 37px #DCE3F1; pointer-events: none; }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; position: relative; z-index: 1; }
.side-logo > div { flex: 1; min-width: 0; }
.side-logo b { display: block; font-size: 16px; }
.side-logo span { font-size: 12px; color: var(--ink-2); }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; position: relative; z-index: 1; }
.side nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; flex: none; }
.side nav a:hover { background: var(--surface-2); color: var(--ink); }
.side nav a span { flex: 1; }
.side nav a em { font-style: normal; font-size: 11px; font-weight: 600; background: var(--brand); color: #fff; border-radius: 9px; padding: 1px 7px; }
.side nav a.on { background: var(--tint); color: var(--brand); }
.side-cap { display: block; margin: 16px 10px 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; margin-top: 10px; border-top: 1px solid var(--line); position: relative; z-index: 1; background: var(--surface); }
.side-user .av { width: 34px; height: 34px; font-size: 12px; }
.side-user b { display: block; font-size: 13px; font-weight: 600; }
.side-user span { font-size: 12px; color: var(--ink-2); }
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(20, 26, 38, .38); }

/* ── нижнее меню ── */
.tb { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tb-i { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.tb-i.on { color: var(--brand); }
.tb-ic { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; }
.tb-ic em { top: -2px; right: 4px; }

/* ── подсказка «Добавить на главный экран» ── */
.install { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(var(--tb-h) + env(safe-area-inset-bottom) + 10px); display: flex; gap: 12px; align-items: flex-start; padding: 14px 8px 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 36px -14px rgba(20, 30, 60, .35); }
.install-b { flex: 1; min-width: 0; }
.install-b b { display: block; font-size: 15px; font-weight: 600; }
.install-b p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.install-b p .ic { display: inline-block; vertical-align: -3px; color: var(--brand); }
.install-b .btn { margin-top: 10px; }

/* ── главная ── */
.home-today, .home-imp, .home-news, .home-links { min-width: 0; }

/* ── телефон и планшет ── */
@media (max-width: 1023.98px) {
  .desk-only { display: none !important; }
  body { padding-bottom: calc(var(--tb-h) + env(safe-area-inset-bottom)); }
  body.menu-open { overflow: hidden; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); border-right: 0; transform: translateX(-102%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .side.open { transform: none; visibility: visible; transition: transform .22s ease; box-shadow: 0 0 40px rgba(20, 30, 50, .25); }
  .side nav a { min-height: 44px; }
}

/* ── компьютер ── */
@media (min-width: 1024px) {
  .mob-only, .m-top, .tb, .scrim { display: none !important; }
  .app { display: flex; align-items: flex-start; }
  .side { position: sticky; top: 0; height: 100vh; height: 100dvh; }
  .app-main { flex: 1; }
  .hdr { padding: 20px 32px 18px; }
  .h-title { font-size: 26px; }
  .hdr .seg { max-width: 440px; margin-top: 12px; }
  .pad { padding: 24px 32px 48px; }
  .chips { margin: 12px 0 0; padding: 0; }
  .install { left: auto; right: 24px; bottom: 24px; width: 380px; }

  .home { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "today imp" "news links"; gap: 0 32px; max-width: 1180px; align-items: start; }
  .home-today { grid-area: today; }
  .home-imp { grid-area: imp; }
  .home-news { grid-area: news; }
  .home-links { grid-area: links; }
  .home .sec { margin-top: 6px; }
  .home-news .sec, .home-links .sec { margin-top: 28px; }
  .home .news-row { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); overflow: visible; }
  .home .news { width: auto; }
}

/* ── переключатель ролей (у совмещающих роли) ── */
.rs { position: relative; z-index: 1; margin-top: auto; padding: 12px 8px 0; background: var(--surface); }
.rs-cap { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.rs-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-list form { display: contents; }
.rs-i { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface); font: 500 12.5px/1 var(--font); color: var(--ink-2); cursor: pointer; }
.rs-i:hover { background: var(--surface-2); color: var(--ink); }
.rs-i.on { background: var(--tint); border-color: var(--ring); color: var(--brand); cursor: default; }
.rs + .side-user { margin-top: 12px; }
.rs-full { margin: 0; padding: 0; background: none; }
.rs-full .rs-hint { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
.rs-full .rs-i { height: 34px; padding: 0 14px; font-size: 13.5px; }
.rs-toast { position: fixed; z-index: 60; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 22px; background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: 0 12px 28px -12px rgba(20, 30, 60, .45); }
