  /* ================= темы ================= */
  /* «Чёрная» — по умолчанию */
  :root {
    color-scheme: dark;
    --bg: #000;
    --panel: #060606;
    --card: #0b0b0b;
    --card-hi: #111;
    --raise: #161616;
    --raise-line: #262626;
    --field: #000;
    --deep: #050505;
    --thumb: #101010;
    --line: #1c1c1c;
    --line-hi: #2e2e2e;
    --text: #fff;
    --text-2: #e6e6e6;
    --muted: #8a8a8a;
    --dim: #555;
    --faint: #3a3a3a;
    --accent: #fff;
    --accent-hover: #e6e6e6;
    --on-accent: #000;
    --accent-fill: var(--accent);   /* заливка кнопок и значков: цвет или градиент */
    --accent-2: #fff;
    --soft: #161616;
    --hover: #0f0f0f;
    --hover-2: #1a1a1a;
    --glass: rgba(0,0,0,.82);
    --overlay: rgba(0,0,0,.74);
    --overlay-strong: rgba(0,0,0,.86);
    --menu: #0d0d0d;
    --menu-line: #262626;
    --box: #0a0a0a;
    --box-line: #232323;
    --toast: #121212;
    --toast-line: #2a2a2a;
    --toast-text: #fff;
    --ring: rgba(255,255,255,.07);
    --shadow: rgba(0,0,0,.9);
    --brand-a: #fff;
    --brand-b: #7a7a7a;
    --page-glow: none;
    --page-size: auto;
    --grid-line: rgba(255,255,255,.05);
    --cover: radial-gradient(circle at 18% 30%, #2b2b2b 0, transparent 45%),
             radial-gradient(circle at 85% 80%, #202020 0, transparent 45%),
             linear-gradient(135deg, #141414, #050505);
  }

  /* Vibe Purple — чёрный, фиолетовый, белый */
  [data-theme="purple"] {
    --accent: #AC58E9;
    --accent-hover: #9A45D9;
    --on-accent: #fff;
    --accent-2: #C38BF2;
    --soft: rgba(172,88,233,.16);
    --ring: rgba(172,88,233,.25);
    --brand-b: #AC58E9;
    --page-glow: radial-gradient(ellipse 60% 50% at 100% 0%, rgba(172,88,233,.18), transparent 70%);
    --cover: radial-gradient(circle at 20% 30%, rgba(172,88,233,.6) 0, transparent 50%),
             radial-gradient(circle at 85% 80%, rgba(172,88,233,.3) 0, transparent 45%),
             linear-gradient(135deg, #140a1c, #050505);
  }

  /* Violet Lime — чёрный, фиолетовый, лайм, белый */
  [data-theme="lime"] {
    --accent: #C6FF33;
    --accent-hover: #B4F01C;
    --on-accent: #0b0b0b;
    --accent-2: #9A62FF;
    --soft: rgba(125,57,235,.22);
    --ring: rgba(198,255,51,.2);
    --brand-a: #C6FF33;
    --brand-b: #7D39EB;
    --page-glow: radial-gradient(ellipse 60% 50% at 100% 0%, rgba(125,57,235,.24), transparent 70%),
                 radial-gradient(ellipse 50% 40% at 0% 100%, rgba(198,255,51,.07), transparent 70%);
    --cover: radial-gradient(circle at 20% 35%, rgba(125,57,235,.75) 0, transparent 50%),
             radial-gradient(circle at 85% 75%, rgba(198,255,51,.4) 0, transparent 40%),
             linear-gradient(135deg, #0e0a18, #050505);
  }

  /* Magenta — графит и пурпурное зернистое свечение */
  [data-theme="magenta"] {
    --bg: #0d090d;
    --panel: #0b070b;
    --card: #141014;
    --card-hi: #1b141b;
    --raise: #221822;
    --raise-line: #3a2638;
    --field: #0a070a;
    --deep: #080508;
    --thumb: #181118;
    --line: #2a1d29;
    --line-hi: #44293f;
    --muted: #a58ca2;
    --dim: #6c5169;
    --faint: #4a3548;
    --accent: #E447D5;
    --accent-hover: #D034C1;
    --on-accent: #fff;
    --accent-2: #F27AE6;
    --soft: rgba(228,71,213,.16);
    --hover: #171017;
    --hover-2: #241824;
    --glass: rgba(13,9,13,.8);
    --menu: #151015;
    --menu-line: #3a2638;
    --box: #120d12;
    --box-line: #3a2638;
    --toast: #1a121a;
    --toast-line: #3a2638;
    --ring: rgba(228,71,213,.25);
    --brand-b: #E447D5;
    --page-glow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
                 radial-gradient(ellipse 60% 50% at 0% 100%, rgba(228,71,213,.38), transparent 70%),
                 radial-gradient(ellipse 50% 45% at 100% 0%, rgba(228,71,213,.3), transparent 70%);
    --page-size: 180px 180px, auto, auto;
    --cover: radial-gradient(circle at 12% 95%, #E447D5 0, transparent 50%),
             radial-gradient(circle at 92% 5%, #E447D5 0, transparent 45%),
             #1a1a1a;
  }

  /* Vermilion — графит, серый, оранжевый */
  [data-theme="vermilion"] {
    --bg: #1D1D1D;
    --panel: #181818;
    --card: #242424;
    --card-hi: #2a2a2a;
    --raise: #303030;
    --raise-line: #3d3d3d;
    --field: #171717;
    --deep: #151515;
    --thumb: #2a2a2a;
    --line: #303030;
    --line-hi: #464646;
    --muted: #a6a6a6;
    --dim: #808080;
    --faint: #5a5a5a;
    --accent: #FC4C13;
    --accent-hover: #E8410B;
    --on-accent: #1D1D1D;
    --accent-2: #FC4C13;
    --soft: rgba(252,76,19,.14);
    --hover: #262626;
    --hover-2: #333;
    --glass: rgba(29,29,29,.84);
    --overlay: rgba(10,10,10,.7);
    --menu: #262626;
    --menu-line: #3d3d3d;
    --box: #222;
    --box-line: #3a3a3a;
    --toast: #2a2a2a;
    --toast-line: #444;
    --ring: rgba(252,76,19,.22);
    --brand-b: #FC4C13;
    --cover: radial-gradient(circle at 18% 35%, rgba(252,76,19,.7) 0, transparent 50%),
             linear-gradient(120deg, #262626, #1a1a1a 60%, #3a3a3a);
  }

  /* Ivory — молочный фон и бордовые акценты */
  [data-theme="ivory"] {
    color-scheme: light;
    --bg: #FFECC3;
    --panel: #FBE4B4;
    --card: #FFF3D9;
    --card-hi: #FFF7E6;
    --raise: #F7DFAE;
    --raise-line: #E9C98C;
    --field: #FFF8EA;
    --deep: #F9E3B6;
    --thumb: #F6DDAA;
    --line: #EDD29D;
    --line-hi: #D8B574;
    --text: #350503;
    --text-2: #4A120D;
    --muted: #7D4B3B;
    --dim: #A97F5F;
    --faint: #C9A47A;
    --accent: #350503;
    --accent-hover: #521210;
    --on-accent: #FFECC3;
    --accent-2: #350503;
    --soft: rgba(53,5,3,.08);
    --hover: rgba(53,5,3,.05);
    --hover-2: rgba(53,5,3,.09);
    --glass: rgba(255,236,195,.86);
    --overlay: rgba(53,5,3,.3);
    --overlay-strong: rgba(53,5,3,.55);
    --menu: #FFF6E3;
    --menu-line: #E4C68D;
    --box: #FFF3D9;
    --box-line: #E4C68D;
    --toast: #350503;
    --toast-line: #350503;
    --toast-text: #FFECC3;
    --ring: rgba(53,5,3,.12);
    --shadow: rgba(53,5,3,.18);
    --brand-a: #350503;
    --brand-b: #7A2A22;
    --grid-line: rgba(53,5,3,.06);
    --cover: radial-gradient(130% 95% at 70% -55%, #350503 0 55%, transparent 55.4%), #FFE3AC;
  }

  /* ===== светлые темы ===== */

  /* Белая — белый фон, чёрные кнопки и текст */
  [data-theme="snow"] {
    color-scheme: light;
    --bg: #FFFFFF;
    --panel: #FAFAFB;
    --card: #FFFFFF;
    --card-hi: #F7F7F9;
    --raise: #F1F1F4;
    --raise-line: #E3E3E8;
    --field: #FFFFFF;
    --deep: #F5F5F7;
    --thumb: #F1F1F4;
    --line: #E7E7EC;
    --line-hi: #CFCFD8;
    --text: #0B0B0C;
    --text-2: #2A2A30;
    --muted: #6B6B76;
    --dim: #93939E;
    --faint: #BEBEC8;
    --accent: #0B0B0C;
    --accent-hover: #2A2A30;
    --on-accent: #FFFFFF;
    --accent-2: #0B0B0C;
    --soft: rgba(11,11,12,.06);
    --hover: rgba(11,11,12,.04);
    --hover-2: rgba(11,11,12,.07);
    --glass: rgba(255,255,255,.88);
    --overlay: rgba(16,16,20,.3);
    --overlay-strong: rgba(16,16,20,.55);
    --menu: #FFFFFF;
    --menu-line: #E7E7EC;
    --box: #FFFFFF;
    --box-line: #E7E7EC;
    --toast: #0B0B0C;
    --toast-line: #0B0B0C;
    --toast-text: #FFFFFF;
    --ring: rgba(11,11,12,.12);
    --shadow: rgba(16,16,20,.16);
    --brand-a: #0B0B0C;
    --brand-b: #6B6B76;
    --grid-line: rgba(11,11,12,.05);
    --cover: radial-gradient(120% 90% at 75% -40%, #0B0B0C 0 52%, transparent 52.4%), #F1F1F4;
  }

  /* Бумага — тёплый светлый фон, чернильный текст */
  [data-theme="paper"] {
    color-scheme: light;
    --bg: #F6F4EF;
    --panel: #F1EEE7;
    --card: #FFFDF9;
    --card-hi: #FBF8F1;
    --raise: #EFEBE1;
    --raise-line: #E0DACC;
    --field: #FFFDF9;
    --deep: #F2EFE8;
    --thumb: #EDE9DF;
    --line: #E4DED2;
    --line-hi: #CCC4B2;
    --text: #1C1A17;
    --text-2: #33302A;
    --muted: #6F6960;
    --dim: #9A9287;
    --faint: #C2BAAC;
    --accent: #1C1A17;
    --accent-hover: #33302A;
    --on-accent: #FFFDF9;
    --accent-2: #8A6A3B;
    --soft: rgba(28,26,23,.07);
    --hover: rgba(28,26,23,.045);
    --hover-2: rgba(28,26,23,.08);
    --glass: rgba(246,244,239,.88);
    --overlay: rgba(28,26,23,.3);
    --overlay-strong: rgba(28,26,23,.55);
    --menu: #FFFDF9;
    --menu-line: #E4DED2;
    --box: #FFFDF9;
    --box-line: #E4DED2;
    --toast: #1C1A17;
    --toast-line: #1C1A17;
    --toast-text: #FFFDF9;
    --ring: rgba(28,26,23,.12);
    --shadow: rgba(28,26,23,.14);
    --brand-a: #1C1A17;
    --brand-b: #8A6A3B;
    --grid-line: rgba(28,26,23,.05);
    --cover: radial-gradient(120% 90% at 78% -45%, #1C1A17 0 52%, transparent 52.4%), #EBE5D8;
  }

  /* Небо — светлый фон и синий акцент */
  [data-theme="sky"] {
    color-scheme: light;
    --bg: #F5F8FD;
    --panel: #EFF4FB;
    --card: #FFFFFF;
    --card-hi: #F7FAFF;
    --raise: #EAF1FB;
    --raise-line: #D8E4F5;
    --field: #FFFFFF;
    --deep: #F1F5FC;
    --thumb: #E8EFFA;
    --line: #DFE7F3;
    --line-hi: #C2D2EA;
    --text: #0E1726;
    --text-2: #24334A;
    --muted: #5E7391;
    --dim: #8CA0BE;
    --faint: #B6C6DC;
    --accent: #1F5FE0;
    --accent-hover: #1A50C0;
    --accent-fill: linear-gradient(135deg, #1F5FE0, #3D86FF);
    --on-accent: #FFFFFF;
    --accent-2: #1F5FE0;
    --soft: rgba(31,95,224,.1);
    --hover: rgba(14,23,38,.04);
    --hover-2: rgba(14,23,38,.07);
    --glass: rgba(245,248,253,.88);
    --overlay: rgba(14,23,38,.32);
    --overlay-strong: rgba(14,23,38,.55);
    --menu: #FFFFFF;
    --menu-line: #DFE7F3;
    --box: #FFFFFF;
    --box-line: #DFE7F3;
    --toast: #0E1726;
    --toast-line: #0E1726;
    --toast-text: #FFFFFF;
    --ring: rgba(31,95,224,.18);
    --shadow: rgba(14,23,38,.14);
    --brand-a: #0E1726;
    --brand-b: #1F5FE0;
    --grid-line: rgba(31,95,224,.07);
    --cover: radial-gradient(circle at 20% 20%, rgba(61,134,255,.45) 0, transparent 45%),
             radial-gradient(circle at 85% 80%, rgba(31,95,224,.35) 0, transparent 50%), #E6EEFB;
  }

  /* Мята — светлый фон и зелёный акцент */
  [data-theme="mint"] {
    color-scheme: light;
    --bg: #F3F8F5;
    --panel: #EDF4EF;
    --card: #FFFFFF;
    --card-hi: #F6FBF8;
    --raise: #E9F2EC;
    --raise-line: #D6E6DC;
    --field: #FFFFFF;
    --deep: #EFF6F1;
    --thumb: #E7F1EA;
    --line: #DEEAE2;
    --line-hi: #BFD6C8;
    --text: #0C1F18;
    --text-2: #23382F;
    --muted: #5C7268;
    --dim: #8AA398;
    --faint: #B4C9BE;
    --accent: #0E7A55;
    --accent-hover: #0B6647;
    --on-accent: #FFFFFF;
    --accent-2: #0E7A55;
    --soft: rgba(14,122,85,.1);
    --hover: rgba(12,31,24,.04);
    --hover-2: rgba(12,31,24,.07);
    --glass: rgba(243,248,245,.88);
    --overlay: rgba(12,31,24,.32);
    --overlay-strong: rgba(12,31,24,.55);
    --menu: #FFFFFF;
    --menu-line: #DEEAE2;
    --box: #FFFFFF;
    --box-line: #DEEAE2;
    --toast: #0C1F18;
    --toast-line: #0C1F18;
    --toast-text: #FFFFFF;
    --ring: rgba(14,122,85,.18);
    --shadow: rgba(12,31,24,.14);
    --brand-a: #0C1F18;
    --brand-b: #0E7A55;
    --grid-line: rgba(14,122,85,.07);
    --cover: radial-gradient(circle at 22% 25%, rgba(14,122,85,.4) 0, transparent 45%),
             radial-gradient(circle at 80% 78%, rgba(120,193,164,.5) 0, transparent 50%), #E4EFE8;
  }

  /* Сирень — светлый фон и фиолетовый акцент */
  [data-theme="lilac"] {
    color-scheme: light;
    --bg: #F7F5FD;
    --panel: #F2EFFB;
    --card: #FFFFFF;
    --card-hi: #FAF8FF;
    --raise: #EEEAFA;
    --raise-line: #DFD8F3;
    --field: #FFFFFF;
    --deep: #F3F0FC;
    --thumb: #ECE7F9;
    --line: #E4DEF5;
    --line-hi: #C9BEEB;
    --text: #1A1430;
    --text-2: #2E2748;
    --muted: #6A6284;
    --dim: #9A93B2;
    --faint: #C3BDD6;
    --accent: #6A4BD8;
    --accent-hover: #5A3DC2;
    --accent-fill: linear-gradient(135deg, #6A4BD8, #9B7BFF);
    --on-accent: #FFFFFF;
    --accent-2: #6A4BD8;
    --soft: rgba(106,75,216,.1);
    --hover: rgba(26,20,48,.04);
    --hover-2: rgba(26,20,48,.07);
    --glass: rgba(247,245,253,.88);
    --overlay: rgba(26,20,48,.32);
    --overlay-strong: rgba(26,20,48,.55);
    --menu: #FFFFFF;
    --menu-line: #E4DEF5;
    --box: #FFFFFF;
    --box-line: #E4DEF5;
    --toast: #1A1430;
    --toast-line: #1A1430;
    --toast-text: #FFFFFF;
    --ring: rgba(106,75,216,.18);
    --shadow: rgba(26,20,48,.14);
    --brand-a: #1A1430;
    --brand-b: #6A4BD8;
    --grid-line: rgba(106,75,216,.07);
    --cover: radial-gradient(circle at 20% 25%, rgba(155,123,255,.5) 0, transparent 45%),
             radial-gradient(circle at 82% 80%, rgba(106,75,216,.4) 0, transparent 50%), #EDE7FA;
  }

  /* Azul — чёрный фон, синие и голубые акценты */
  [data-theme="azul"] {
    --accent: #2669EC;
    --accent-hover: #3B82F6;
    --accent-fill: linear-gradient(135deg, #1D4ED8, #2F86FF);
    --on-accent: #fff;
    --accent-2: #4FC3FF;
    --soft: rgba(47,123,255,.16);
    --ring: rgba(79,195,255,.25);
    --brand-a: #7FD8FF;
    --brand-b: #2563EB;
    --page-glow: radial-gradient(ellipse 60% 50% at 100% 0%, rgba(37,99,235,.24), transparent 70%),
                 radial-gradient(ellipse 45% 40% at 0% 100%, rgba(79,195,255,.1), transparent 70%);
    --cover: radial-gradient(circle at 22% 35%, rgba(79,195,255,.65) 0, transparent 45%),
             radial-gradient(circle at 80% 75%, rgba(37,99,235,.7) 0, transparent 50%),
             linear-gradient(135deg, #07142e, #000);
  }

  /* плавная смена темы */
  .theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
    transition: background-color .35s ease, border-color .35s ease, color .35s ease !important;
  }

  /* ================= основа ================= */
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { min-height: 100%; }
  body {
    background-color: var(--bg);
    background-image: var(--page-glow);
    background-size: var(--page-size);
    background-attachment: fixed;
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
  }
  body.lock { overflow: hidden; }
  button { font: inherit; color: inherit; }
  [hidden] { display: none !important; }

  .ico {
    width: 18px; height: 18px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .ico.fill { fill: currentColor; }

  /* ---------- каркас ---------- */
  .app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

  .side {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    padding: 22px 14px 14px;
    background: var(--panel);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .brand {
    font-family: "Unbounded", "Inter", sans-serif;
    font-weight: 900; font-size: 28px; line-height: 1; letter-spacing: -.03em;
    padding: 4px 10px 24px;
    background: linear-gradient(180deg, var(--brand-a) 35%, var(--brand-b) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    user-select: none;
  }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 11px; font-size: 14px; font-weight: 600;
    padding: 11px 16px; cursor: pointer; white-space: nowrap;
    transition: transform .15s, background .2s, border-color .2s, opacity .2s;
  }
  .btn:active:not(:disabled) { transform: scale(.98); }
  .btn:disabled { opacity: .6; cursor: progress; }
  .btn-primary { background: var(--accent-fill); color: var(--on-accent); border: 1px solid var(--accent); }
  .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-hi); }
  .btn-ghost:hover { border-color: var(--text); }
  .btn-wide { width: 100%; }
  .btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
  .btn-danger { background: transparent; color: var(--text); border: 1px solid var(--text); }
  .btn-danger:hover { background: var(--text); color: var(--bg); }
  .link-btn { background: none; border: 0; padding: 0; color: var(--text); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

  .nav { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; }
  .nav-label {
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--dim); padding: 18px 12px 8px;
  }
  .nav button {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 10px 12px;
    background: none; border: 0; border-radius: 10px;
    color: var(--muted); font-size: 14px; font-weight: 500; text-align: left;
    cursor: pointer; transition: background .15s, color .15s;
  }
  .nav button:hover { color: var(--text); background: var(--hover); }
  .nav button.active { color: var(--text); background: var(--soft); }
  .nav button.active .ico { color: var(--accent-2); }
  .nav .count { margin-left: auto; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
  .nav button.active .count { color: var(--text); }

  .side-bottom { margin-top: auto; padding-top: 20px; }
  .user {
    display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 8px; border-radius: 12px;
    cursor: pointer; transition: background .15s; outline: none;
  }
  .user:hover, .user:focus-visible, .user.active { background: var(--soft); }
  .avatar {
    width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden;
    background: var(--accent-fill); color: var(--on-accent);
    display: grid; place-items: center; font-weight: 700; font-size: 14px;
  }
  .avatar img { width: 100%; height: 100%; object-fit: cover; }
  .user-info { flex: 1; min-width: 0; }
  .user-info b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-info span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .icon-btn {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    background: none; border: 0; border-radius: 9px;
    color: var(--muted); cursor: pointer;
    transition: background .15s, color .15s;
  }
  .icon-btn:hover { background: var(--hover-2); color: var(--text); }
  .icon-btn.on { color: var(--accent-2); }

  /* ---------- верхняя панель ---------- */
  .main { min-width: 0; display: flex; flex-direction: column; }
  .top {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; gap: 12px;
    padding: 14px 32px;
    background: var(--glass);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .menu-btn { display: none; }
  .search {
    flex: 1; max-width: 560px; height: 42px;
    display: flex; align-items: center; gap: 10px;
    padding: 0 12px;
    background: var(--card); border: 1px solid var(--line); border-radius: 11px;
    color: var(--dim); transition: border-color .2s;
  }
  .search:focus-within { border-color: var(--accent); color: var(--text); }
  .search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; }
  .search input::placeholder { color: var(--dim); }
  kbd {
    font-family: inherit; font-size: 11px; color: var(--dim);
    border: 1px solid var(--line-hi); border-radius: 6px; padding: 2px 6px;
  }
  .top-upload { margin-left: auto; }

  .content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 32px; }
  /* ---------- список ---------- */
  .section-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .section-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
  .section-head h2 small { font-size: 14px; font-weight: 400; color: var(--dim); margin-left: 6px; }
  .tools { display: flex; align-items: center; gap: 8px; }
  .select-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 10px 0 12px;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    color: var(--text); font-size: 13px; cursor: pointer; white-space: nowrap;
    transition: border-color .2s;
  }
  .select-btn:hover { border-color: var(--line-hi); }
  .select-btn.open { border-color: var(--accent); }
  .select-btn .ico { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
  .select-btn.open .ico { transform: rotate(180deg); color: var(--text); }
  .seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
  .seg button {
    width: 32px; height: 30px; display: grid; place-items: center;
    background: none; border: 0; border-radius: 7px; color: var(--muted); cursor: pointer;
    transition: background .2s, color .2s;
  }
  .seg button.on { background: var(--accent-fill); color: var(--on-accent); }
  .seg .ico { width: 16px; height: 16px; }

  .fresh { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  /* пусто */
  .empty {
    text-align: center; padding: 64px 20px;
    border: 1px dashed var(--line-hi); border-radius: 18px;
  }
  .empty .ei {
    width: 64px; height: 64px; margin: 0 auto 18px;
    display: grid; place-items: center;
    border: 1px solid var(--line-hi); border-radius: 50%;
  }
  .empty .ei .ico { width: 26px; height: 26px; }
  .empty h3 { font-size: 17px; font-weight: 600; }
  .empty p { color: var(--muted); margin: 8px auto 20px; max-width: 360px; line-height: 1.55; }

  /* ---------- перетаскивание ---------- */
  .drop {
    position: fixed; inset: 0; z-index: 60;
    display: grid; place-items: center; padding: 24px;
    background: var(--overlay-strong);
    backdrop-filter: blur(6px);
    animation: fadeIn .2s ease;
  }
  .drop-box {
    width: min(620px, 100%); padding: 64px 24px; text-align: center;
    border: 2px dashed var(--accent); border-radius: 26px;
    color: #fff; pointer-events: none;
  }
  .drop-box .ico { width: 44px; height: 44px; margin-bottom: 18px; color: var(--accent); animation: bob 1.4s ease-in-out infinite; }
  .drop-box b { display: block; font-size: 22px; font-weight: 600; }
  .drop-box span { display: block; color: rgba(255,255,255,.7); margin-top: 8px; }
  @keyframes bob { 50% { transform: translateY(-6px); } }
  @keyframes fadeIn { from { opacity: 0; } }

  /* ---------- меню ---------- */
  .menu {
    position: fixed; z-index: 70; min-width: 210px;
    padding: 6px;
    background: var(--menu); border: 1px solid var(--menu-line); border-radius: 12px;
    box-shadow: 0 20px 50px -10px var(--shadow);
    animation: menuIn .14s ease;
  }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
  .menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 10px; border: 0; border-radius: 8px;
    background: none; color: var(--text); font-size: 14px; text-align: left; cursor: pointer;
  }
  .menu button:hover { background: var(--hover-2); }
  .menu button .ico { color: var(--muted); }
  .menu button:hover .ico { color: var(--text); }
  .menu button.on { font-weight: 600; }
  .menu button .ico.tick { margin-left: auto; color: var(--accent-2); }
  .menu hr { border: 0; height: 1px; background: var(--menu-line); margin: 6px 4px; }

  /* ---------- окна ---------- */
  .modal {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center; padding: 24px;
    background: var(--overlay);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    animation: fadeIn .2s ease;
  }
  .box {
    width: 100%; max-height: calc(100vh - 48px);
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--box); border: 1px solid var(--box-line); border-radius: 20px;
    box-shadow: 0 40px 100px -20px var(--shadow);
    animation: boxIn .28s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes boxIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }

  .box-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line);
  }
  .box-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .box-title .lthumb { flex: none; }
  .box-title b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .box-title span { font-size: 12px; color: var(--muted); }
  .box-actions { display: flex; align-items: center; gap: 2px; flex: none; }
  .box-actions .sep { width: 1px; height: 20px; background: var(--line-hi); margin: 0 6px; }
  /* диалог */
  .dialog { max-width: 420px; padding: 24px; }
  .dialog h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
  .dialog input {
    width: 100%; padding: 13px 14px;
    background: var(--field); border: 1px solid var(--line-hi); border-radius: 11px;
    color: var(--text); font: inherit; font-size: 15px; outline: none;
  }
  .dialog input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
  .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
  .dlg-text { margin: -6px 0 16px; font-size: 14px; line-height: 1.55; color: var(--muted); }
  .dlg-text + .dialog-actions { margin-top: 0; }
  /* ---------- профиль ---------- */
  .profile { max-width: 880px; margin: 0 auto; }
  .pf-back { margin-bottom: 18px; }
  .cover {
    position: relative; height: 220px; overflow: hidden;
    border: 1px solid var(--line); border-radius: 20px;
    background: var(--cover);
  }
  .cover::before {
    content: ""; position: absolute; inset: 0;
    background-image:
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
  }
  .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
  .cover-btn {
    position: absolute; right: 14px; bottom: 14px; z-index: 2;
    background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .cover-btn:hover { background: rgba(0,0,0,.8); border-color: #fff; }

  .pf-head { position: relative; z-index: 3; display: flex; align-items: flex-end; gap: 20px; margin-top: -52px; padding: 0 24px; }
  .pf-avatar {
    position: relative; flex: none; width: 116px; height: 116px; overflow: hidden;
    display: grid; place-items: center;
    border: 5px solid var(--bg); border-radius: 50%;
    background: var(--accent-fill); color: var(--on-accent); font-size: 42px; font-weight: 700;
    cursor: pointer;
  }
  .pf-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .pf-avatar .cam {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .2s;
  }
  .pf-avatar .cam .ico { width: 26px; height: 26px; }
  .pf-avatar:hover .cam, .pf-avatar:focus-visible .cam { opacity: 1; }
  .pf-title { min-width: 0; padding-bottom: 8px; }
  .pf-title h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pf-title p { margin-top: 4px; color: var(--muted); font-size: 14px; }

  .pf-grid { display: grid; gap: 16px; margin-top: 32px; }
  .pcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
  .pcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
  .pcard-head h2 { font-size: 16px; font-weight: 600; }
  .pcard-head p { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 520px; }
  .pcard.danger { border-style: dashed; border-color: var(--line-hi); }
  .pcard.danger .pcard-head { margin: 0; align-items: center; }

  .fld { margin-bottom: 14px; }
  .fld label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
  .inp { position: relative; display: flex; align-items: center; }
  .inp input {
    width: 100%; padding: 12px 14px;
    background: var(--field); border: 1px solid var(--line); border-radius: 11px;
    color: var(--text); font: inherit; font-size: 15px; outline: none;
    transition: border-color .2s, box-shadow .2s;
  }
  .inp input::placeholder { color: var(--dim); }
  .inp input:hover { border-color: var(--line-hi); }
  .inp input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
  .inp .cc {
    position: absolute; left: 0; top: 0; bottom: 0;
    display: flex; align-items: center; padding: 0 12px 0 14px;
    border-right: 1px solid var(--line); font-size: 15px; font-weight: 500; pointer-events: none;
  }
  .inp.phone input { padding-left: 60px; letter-spacing: .02em; }
  .inp.at .cc { padding: 0 12px 0 15px; font-size: 16px; color: var(--accent-2); }
  .inp.at input { padding-left: 48px; }
  .uname-hint { display: flex; align-items: center; gap: 6px; min-height: 18px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
  .uname-hint[data-state="ok"], .uname-hint[data-state="bad"] { color: var(--text); }
  .uname-hint[data-state="ok"] .ico { color: var(--accent-2); }
  .uname-hint .ico { width: 14px; height: 14px; stroke-width: 2.4; }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .pf-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 6px; }
  .pf-msg { margin-right: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .pf-note { margin-bottom: 14px; font-size: 14px; color: var(--muted); }
  .pf-note b { color: var(--text); font-weight: 500; white-space: nowrap; }

  .badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 999px;
    background: var(--accent-fill); color: var(--on-accent); font-size: 11px; font-weight: 600; white-space: nowrap;
  }
  .badge .ico { width: 12px; height: 12px; stroke-width: 2.8; }
  /* темы — кружки с цветами палитры */
  .themes { display: flex; flex-wrap: wrap; gap: 20px 10px; }
  .theme-opt {
    width: 96px; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 0; background: none; border: 0; outline: none;
    color: var(--text); text-align: center; cursor: pointer;
  }
  .theme-dot {
    position: relative; width: 60px; height: 60px; margin-bottom: 8px; border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(128,128,128,.35);
    transition: transform .2s, box-shadow .2s;
  }
  .theme-opt:hover .theme-dot { transform: scale(1.07); }
  .theme-opt:focus-visible .theme-dot,
  .theme-opt.on .theme-dot { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent-2); }
  .theme-dot .ico {
    position: absolute; right: -5px; bottom: -5px; width: 24px; height: 24px; padding: 5px;
    border: 2px solid var(--card); border-radius: 50%;
    background: var(--accent-fill); color: var(--on-accent); stroke-width: 3.2;
    opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s;
  }
  .theme-opt.on .theme-dot .ico { opacity: 1; transform: none; }
  .theme-name { font-size: 13px; font-weight: 600; line-height: 1.25; }
  .theme-sub { font-size: 11px; line-height: 1.3; color: var(--muted); }

  /* устройства */
  .sessions { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
  .sess { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; background: var(--field); border-top: 1px solid var(--line); }
  .sess:first-child { border-top: 0; }
  .sess.out { animation: sessOut .28s ease forwards; }
  @keyframes sessOut { to { opacity: 0; transform: translateX(14px); } }
  .sess-ico {
    flex: none; width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 12px; background: var(--raise); border: 1px solid var(--raise-line);
  }
  .sess-ico .ico { width: 22px; height: 22px; }
  .sess.current .sess-ico { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent); }
  .sess-info { flex: 1; min-width: 0; }
  .sess-info b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
  .sess-info span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sess-info .seen { font-size: 12px; color: var(--dim); }
  /* «Это устройство» — текст цвета основного текста (белый в тёмных темах), рамка цвета темы */
  .sess-info .badge { background: var(--soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-2); }
  .online { color: var(--text); font-style: normal; }
  .online::before {
    content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px;
    border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--soft);
  }
  /* уведомления */
  .toasts {
    position: fixed; right: 24px; bottom: 24px; z-index: 80;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  }
  .toast {
    display: flex; align-items: center; gap: 12px;
    min-width: 260px; max-width: 380px;
    padding: 12px 12px 12px 14px;
    background: var(--toast); color: var(--toast-text);
    border: 1px solid var(--toast-line); border-radius: 12px;
    box-shadow: 0 20px 40px -10px var(--shadow);
    animation: toastIn .3s cubic-bezier(.2,.8,.2,1);
  }
  .toast.out { animation: toastOut .25s ease forwards; }
  .toast .ico { width: 18px; height: 18px; }
  .toast span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toast button { background: var(--toast-text); color: var(--toast); border: 0; border-radius: 7px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
  @keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
  @keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

  .spin {
    display: inline-block; width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--line-hi); border-top-color: var(--text);
    animation: spin .7s linear infinite;
  }
  .spin.sm { width: 14px; height: 14px; }
  .spin.xs { width: 12px; height: 12px; }
  .btn-primary .spin { border-color: rgba(128,128,128,.35); border-top-color: var(--on-accent); }
  @keyframes spin { to { transform: rotate(360deg); } }
  .scrim { display: none; }

  /* ════════════════════════ BILDLY 2.0 — платформа ════════════════════════ */

  a { color: inherit; }
  .muted { color: var(--muted); }
  .dim { color: var(--dim); }
  .grow { flex: 1; min-width: 0; }
  .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :focus-visible { outline: 2px solid var(--accent-2, var(--accent)); outline-offset: 2px; }
  ::selection { background: var(--accent); color: var(--on-accent); }
  textarea, input, select { font: inherit; color: inherit; }

  /* ---------- боковая панель ---------- */
  .nav .pill {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
    display: grid; place-items: center;
    border-radius: 999px; background: var(--accent-fill); color: var(--on-accent);
    font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  }
  .nav .pill:empty { display: none; }
  .topic-nav { display: flex; flex-direction: column; gap: 1px; }
  .topic-nav button { padding: 8px 12px; font-size: 13.5px; }
  .topic-nav .emo { width: 18px; text-align: center; font-size: 15px; line-height: 1; flex: none; }
  .topic-nav .more-topics { color: var(--dim); }
  .side .nav-label { display: flex; align-items: center; justify-content: space-between; }
  .side .nav-label button {
    width: 22px; height: 22px; padding: 0; display: grid; place-items: center; border-radius: 6px;
    color: var(--dim);
  }
  .side .nav-label button .ico { width: 14px; height: 14px; }

  /* ---------- аватары ---------- */
  .av { position: relative; flex: none; display: inline-grid; }
  .av .avatar { width: var(--s, 36px); height: var(--s, 36px); font-size: calc(var(--s, 36px) * .4); }
  .av.on::after {
    content: ""; position: absolute; right: 0; bottom: 0;
    width: calc(var(--s, 36px) * .28); height: calc(var(--s, 36px) * .28); min-width: 9px; min-height: 9px;
    border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 2px var(--card);
  }
  .av-link { cursor: pointer; text-decoration: none; }
  .name-link { font-weight: 600; text-decoration: none; cursor: pointer; }
  .name-link:hover { text-decoration: underline; text-underline-offset: 3px; }

  /* ---------- раскладка страниц ---------- */
  .layout { display: grid; grid-template-columns: minmax(0, 640px) 300px; justify-content: center; gap: 28px; align-items: start; }
  .layout.wide { grid-template-columns: minmax(0, 880px); }
  .col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
  .rail { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }

  .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
  .page-head h1 .emo { font-size: 26px; }
  .page-head p { color: var(--muted); margin-top: 4px; font-size: 14px; }

  .panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
  .panel-pad { padding: 18px; }
  .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
  .panel-title a, .panel-title button { font-size: 12px; font-weight: 500; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none; }
  .panel-title a:hover, .panel-title button:hover { color: var(--text); }

  /* вкладки */
  .tabs { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button {
    display: inline-flex; align-items: center; gap: 7px; flex: none;
    padding: 8px 14px; border: 0; border-radius: 9px; background: none;
    color: var(--muted); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .tabs button:hover { color: var(--text); }
  .tabs button.on { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--raise-line); }
  .tabs .ico { width: 15px; height: 15px; }
  .tabs .n { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
  .tabs button.on .n { color: var(--text); }

  .feed-bar { display: flex; align-items: center; gap: 8px; }
  .feed-bar .tabs { flex: 1; min-width: 0; }
  .feed-bar .select-btn { height: 42px; border-radius: 12px; }
  .date-note {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px;
    border: 1px dashed var(--line-hi); border-radius: 12px; font-size: 13px; color: var(--muted);
  }
  .date-note b { color: var(--text); font-weight: 600; }
  .date-note .btn { margin-left: auto; }

  /* ---------- создание публикации ---------- */
  .composer { padding: 16px 16px 12px; transition: border-color .2s; }
  .composer:focus-within { border-color: var(--line-hi); }
  .composer.drag { border-color: var(--accent); border-style: dashed; }
  .composer-row { display: flex; gap: 12px; }
  .composer textarea {
    flex: 1; min-width: 0; min-height: 46px; max-height: 360px; padding: 11px 0 6px;
    background: none; border: 0; outline: none; resize: none;
    color: var(--text); font-size: 15.5px; line-height: 1.55;
  }
  .composer textarea::placeholder { color: var(--dim); }
  .composer-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
  .composer-tools .spacer { flex: 1; }
  .composer-tools .count { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; margin-right: 4px; }
  .composer-tools .count.over { color: #ff5a5a; }
  .chip-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px;
    background: var(--raise); border: 1px solid var(--raise-line); border-radius: 999px;
    color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: border-color .15s, background .15s;
  }
  .chip-btn:hover { border-color: var(--line-hi); }
  .chip-btn .ico { width: 15px; height: 15px; color: var(--muted); }
  .chip-btn .emo { font-size: 14px; line-height: 1; }
  .chip-btn.icon-only { width: 34px; padding: 0; justify-content: center; }

  .attach-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .att {
    position: relative; width: 92px; height: 92px; overflow: hidden; flex: none;
    display: grid; place-items: center; border-radius: 12px; background: var(--raise); border: 1px solid var(--raise-line);
  }
  .att img, .att video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .att .att-name { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 10.5px; color: var(--muted); text-align: center; }
  .att .att-x {
    position: absolute; top: 5px; right: 5px; z-index: 2; width: 24px; height: 24px; padding: 0;
    display: grid; place-items: center; border: 0; border-radius: 50%;
    background: rgba(0,0,0,.72); color: #fff; cursor: pointer;
  }
  .att .att-x .ico { width: 13px; height: 13px; stroke-width: 2.4; }
  .att .att-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent-fill); transition: width .2s; z-index: 2; }
  .att.err { border-color: #ff5a5a; }

  /* ---------- разделитель дат ---------- */
  .day-sep {
    position: sticky; top: 80px; z-index: 5;
    display: flex; justify-content: center; margin: 6px 0 -4px; pointer-events: none;
  }
  .day-sep span {
    padding: 6px 14px; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    font-size: 12.5px; font-weight: 600; color: var(--text); text-transform: capitalize; pointer-events: auto;
  }
  .day-sep small { color: var(--dim); font-weight: 500; margin-left: 6px; text-transform: none; }

  /* ---------- публикация ---------- */
  .post { overflow: hidden; }
  .post.fresh { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
  .post.hl { border-color: var(--accent); }
  .post-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 12px 0 16px; }
  .post-who { flex: 1; min-width: 0; }
  .post-who .line1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  .post-who .line1 .name-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
  .post-who .line1 .uname { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .post-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
  .post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
  .post-meta .ico { width: 13px; height: 13px; }
  .post-meta time { cursor: pointer; }
  .post-meta time:hover { color: var(--text); }
  .topic-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px;
    border-radius: 999px; background: var(--soft); color: var(--text); font-size: 12px; font-weight: 500;
    border: 0; cursor: pointer; text-decoration: none;
  }
  .topic-chip:hover { box-shadow: inset 0 0 0 1px var(--line-hi); }
  .vis { display: inline-flex; align-items: center; gap: 4px; }
  .vis.private { color: var(--text); }

  .post-text {
    padding: 10px 16px 2px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  }
  .post-text a { color: var(--accent-2, var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
  .post-text.clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
  .read-more { margin: 4px 16px 0; background: none; border: 0; padding: 0; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
  .read-more:hover { color: var(--text); }
  .edited { font-size: 12px; color: var(--dim); }

  .media { display: grid; gap: 3px; margin: 12px 0 0; background: var(--line); }
  .media.n1 { grid-template-columns: 1fr; }
  .media.n2 { grid-template-columns: 1fr 1fr; }
  .media.n3 { grid-template-columns: 1fr 1fr; }
  .media.n3 .m:first-child { grid-row: span 2; }
  .media.n4 { grid-template-columns: 1fr 1fr; }
  .media .m { position: relative; overflow: hidden; background: var(--thumb); cursor: zoom-in; border: 0; padding: 0; display: block; }
  .media.n1 .m { max-height: 560px; }
  .media.n1 .m img { width: 100%; max-height: 560px; object-fit: cover; display: block; }
  .media:not(.n1) .m { aspect-ratio: 1; }
  .media.n3 .m:first-child { aspect-ratio: auto; }
  .media:not(.n1) .m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .media .m img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
  .media .m:hover img { transform: scale(1.03); }
  .media .more-n { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; font-weight: 600; }
  .post video, .bubble video { display: block; width: 100%; max-height: 520px; background: #000; }
  .post .video-wrap { margin-top: 12px; }
  .post audio { width: 100%; }
  .audio-wrap { margin: 12px 16px 0; }

  .files { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 0; }
  .file-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    background: var(--field); border: 1px solid var(--line); border-radius: 12px;
    text-decoration: none; transition: border-color .15s;
  }
  .file-row:hover { border-color: var(--line-hi); }
  .file-row .fi { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--raise); border: 1px solid var(--raise-line); }
  .file-row .fi span { font-size: 10px; font-weight: 700; letter-spacing: .03em; }
  .file-row b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .file-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
  .file-row > .ico { color: var(--muted); }

  .post-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 12px 10px 10px; }
  .reacts { display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 16px 0; }
  .reacts:empty { display: none; }
  .react {
    display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px 0 8px;
    border-radius: 999px; background: var(--raise); border: 1px solid var(--raise-line);
    font-size: 13px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
    transition: transform .12s, border-color .15s, background .15s;
  }
  .react .emo { font-size: 15px; line-height: 1; }
  .react:hover { border-color: var(--line-hi); }
  .react:active { transform: scale(.94); }
  .react.mine { background: var(--soft); border-color: var(--accent-2, var(--accent)); }
  .react.pop { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
  @keyframes pop { 40% { transform: scale(1.18); } }

  .act {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
    background: none; border: 0; border-radius: 10px; color: var(--muted);
    font-size: 13.5px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums;
    transition: background .15s, color .15s;
  }
  .act:hover { background: var(--hover); color: var(--text); }
  .act.on { color: var(--text); }
  .act.on .ico { color: var(--accent-2, var(--accent)); }
  .act .emo { font-size: 17px; line-height: 1; }
  .act.right { margin-left: auto; }

  .react-picker {
    position: fixed; z-index: 75; display: flex; gap: 2px; padding: 6px;
    background: var(--menu); border: 1px solid var(--menu-line); border-radius: 999px;
    box-shadow: 0 20px 50px -10px var(--shadow); animation: menuIn .14s ease;
  }
  .react-picker button {
    width: 40px; height: 40px; display: grid; place-items: center;
    background: none; border: 0; border-radius: 50%; font-size: 23px; cursor: pointer;
    transition: transform .15s, background .15s;
  }
  .react-picker button:hover { transform: scale(1.22) translateY(-3px); background: var(--hover); }
  .react-picker button.on { background: var(--soft); }

  /* ---------- комментарии ---------- */
  .comments { border-top: 1px solid var(--line); padding: 14px 16px 16px; background: var(--card-hi); }
  .cmt-list { display: flex; flex-direction: column; gap: 12px; }
  .cmt-list:not(:empty) { margin-bottom: 14px; }
  .cmt { display: flex; gap: 10px; }
  .cmt.fresh { animation: rise .35s cubic-bezier(.2,.8,.2,1) both; }
  .cmt-body { min-width: 0; flex: 1; }
  .cmt-bubble { display: inline-block; max-width: 100%; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--raise); }
  .cmt-bubble .name-link { font-size: 13px; display: block; }
  .cmt-bubble .to { font-size: 12px; color: var(--muted); }
  .cmt-bubble p { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
  .cmt-meta { display: flex; align-items: center; gap: 12px; margin: 5px 0 0 4px; font-size: 12px; color: var(--dim); }
  .cmt-meta button { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
  .cmt-meta button:hover { color: var(--text); }
  .cmt-meta button.on { color: var(--text); }
  .cmt-meta button.on .ico { fill: currentColor; color: #ff4d6d; }
  .cmt-meta .ico { width: 13px; height: 13px; }
  .cmt-form { display: flex; align-items: flex-end; gap: 10px; }
  .cmt-input {
    flex: 1; min-width: 0; display: flex; flex-direction: column;
    background: var(--field); border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s;
  }
  .cmt-input:focus-within { border-color: var(--accent); }
  .cmt-input .replying { display: flex; align-items: center; gap: 6px; padding: 8px 8px 0 14px; font-size: 12px; color: var(--muted); }
  .cmt-input .replying b { color: var(--text); font-weight: 600; }
  .cmt-input .replying button { margin-left: auto; width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; }
  .cmt-input .replying .ico { width: 12px; height: 12px; }
  .cmt-input textarea { width: 100%; min-height: 38px; max-height: 160px; padding: 9px 14px; background: none; border: 0; outline: none; resize: none; font-size: 14px; line-height: 1.45; }
  .send-btn {
    width: 38px; height: 38px; flex: none; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); cursor: pointer;
    transition: opacity .2s, transform .15s;
  }
  .send-btn:disabled { opacity: .25; cursor: default; }
  .send-btn:active:not(:disabled) { transform: scale(.92); }
  .send-btn .ico { width: 17px; height: 17px; stroke-width: 2.2; }

  /* ---------- «новые публикации» ---------- */
  .new-pill {
    position: fixed; top: 84px; left: calc(50% + 132px); transform: translateX(-50%); z-index: 20;
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px;
    border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent);
    font-weight: 600; font-size: 13.5px; cursor: pointer; box-shadow: 0 14px 30px -10px var(--shadow);
    animation: rise .35s cubic-bezier(.2,.8,.2,1);
  }
  .new-pill .ico { width: 15px; height: 15px; stroke-width: 2.4; }

  /* ---------- люди ---------- */
  .people { display: flex; flex-direction: column; }
  .person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .person:first-child { border-top: 0; }
  .person .who { flex: 1; min-width: 0; }
  .person .who .name-link { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
  .person .who small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .person .acts { display: flex; gap: 6px; flex: none; }
  .rail .person { padding: 10px 0; }
  .rail .person .btn-sm { padding: 7px 10px; }
  .person-bio { font-size: 13px; color: var(--muted); margin-top: 4px; }
  .grid-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
  .pcard-person { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px 16px; }
  .pcard-person .name-link { margin-top: 12px; font-size: 15px; }
  .pcard-person small { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
  .pcard-person .acts { display: flex; gap: 6px; margin-top: 14px; width: 100%; }
  .pcard-person .acts .btn { flex: 1; }

  .topic-list { display: flex; flex-direction: column; gap: 2px; }
  .topic-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px;
    background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; width: 100%;
  }
  .topic-row:hover { background: var(--hover); }
  .topic-row .emo { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--raise); font-size: 15px; flex: none; }
  .topic-row b { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topic-row small { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
  .topic-row small em { font-style: normal; color: var(--text); }

  .topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
  .topic-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px;
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; text-align: left;
    transition: border-color .2s, transform .2s;
  }
  .topic-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
  .topic-tile .emo { font-size: 26px; line-height: 1; }
  .topic-tile b { font-size: 14.5px; font-weight: 600; }
  .topic-tile small { font-size: 12.5px; color: var(--muted); }

  /* ---------- сообщения ---------- */
  .messenger {
    display: grid; grid-template-columns: 330px minmax(0, 1fr);
    height: calc(100vh - 71px - 64px); min-height: 460px; overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  }
  .chats { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
  .chats-head { padding: 16px 16px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .chats-head h2 { font-size: 18px; font-weight: 600; }
  .chats-search { flex: none; max-width: none; margin: 0 12px 8px; height: 38px; }
  .chat-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 8px; }
  .chat-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px;
    background: none; color: var(--text); text-align: left; cursor: pointer; transition: background .15s;
  }
  .chat-item:hover { background: var(--hover); }
  .chat-item.on { background: var(--soft); }
  .chat-item .ci { flex: 1; min-width: 0; }
  .chat-item .ci-top, .chat-item .ci-bot { display: flex; align-items: center; gap: 8px; }
  .chat-item .ci-top b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-item .ci-top time { font-size: 11.5px; color: var(--dim); flex: none; }
  .chat-item .ci-bot span { flex: 1; min-width: 0; margin-top: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-item .ci-bot .pill {
    min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; flex: none;
    border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: 11px; font-weight: 700;
  }
  .chat-item .ci-bot .ico { width: 15px; height: 15px; color: var(--accent-2, var(--accent)); flex: none; }
  .chat-item .typing-t { color: var(--accent-2, var(--accent)) !important; }

  .thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .thread-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
  .thread-empty .ei { width: 72px; height: 72px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-hi); }
  .thread-empty .ei .ico { width: 30px; height: 30px; color: var(--text); }
  .thread-empty b { display: block; color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
  .thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .thread-head .who { flex: 1; min-width: 0; }
  .thread-head .who .name-link { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .thread-head .who small { font-size: 12.5px; color: var(--muted); }
  .thread-head .back { display: none; }
  .msgs { flex: 1; overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 3px; }
  .msgs .day-sep { position: sticky; top: 0; margin: 10px 0 8px; }
  .msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(560px, 82%); }
  .msg.me { align-self: flex-end; align-items: flex-end; }
  .msg.gap { margin-top: 10px; }
  .bubble {
    position: relative; max-width: 100%; overflow: hidden;
    padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px;
    background: var(--raise); color: var(--text); font-size: 14.5px; line-height: 1.45; word-break: break-word;
  }
  .msg.me .bubble { background: var(--accent-fill); color: var(--on-accent); border-radius: 18px 18px 6px 18px; }
  .msg.me .bubble a { color: inherit; }
  .bubble p { white-space: pre-wrap; }
  .bubble .bt { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 6px 0 -2px 10px; font-size: 11px; opacity: .6; }
  .bubble .bt .ico { width: 15px; height: 15px; stroke-width: 2; }
  .bubble.deleted { font-style: italic; opacity: .6; }
  .bubble .b-media { margin: -8px -12px 6px; display: grid; gap: 2px; }
  .bubble .b-media img { display: block; width: 100%; max-height: 360px; object-fit: cover; cursor: zoom-in; }
  .bubble .file-row { margin: 2px 0 6px; background: rgba(0,0,0,.14); border-color: transparent; color: inherit; }
  .msg.me .bubble .file-row small { color: inherit; opacity: .7; }
  .shared-post {
    display: block; margin: 2px 0 6px; padding: 10px 12px; border-radius: 12px; text-align: left; width: 100%;
    background: rgba(0,0,0,.14); border: 0; border-left: 3px solid currentColor; color: inherit; cursor: pointer;
  }
  .shared-post b { display: block; font-size: 13px; }
  .shared-post span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; opacity: .8; margin-top: 2px; }
  .typing-row { height: 22px; padding: 0 20px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
  .dots { display: inline-flex; gap: 3px; }
  .dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
  .dots i:nth-child(2) { animation-delay: .2s; }
  .dots i:nth-child(3) { animation-delay: .4s; }
  @keyframes blink { 50% { opacity: .2; } }
  .thread-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
  .thread-form .cmt-input textarea { font-size: 14.5px; }
  .thread-form .attach-list { margin: 8px 10px 2px; }
  .thread-form .att { width: 64px; height: 64px; }
  .thread-note { padding: 14px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

  /* ---------- уведомления ---------- */
  .notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s; }
  .notif:first-child { border-top: 0; }
  .notif:hover { background: var(--hover); }
  .notif.unread { background: var(--soft); }
  .notif .n-ico {
    position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font-size: 12px; box-shadow: 0 0 0 2px var(--card);
  }
  .notif .n-ico .ico { width: 12px; height: 12px; stroke-width: 2.4; }
  .notif .n-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
  .notif .n-body q { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; quotes: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .notif .n-body time { display: block; margin-top: 4px; font-size: 12px; color: var(--dim); }
  .notif .acts { display: flex; gap: 6px; flex: none; align-self: center; }

  /* ---------- профиль ---------- */
  .profile-page { max-width: 880px; margin: 0 auto; }
  .pf-head .pf-avatar { cursor: default; }
  .pf-head.me .pf-avatar { cursor: pointer; }
  .pf-head .pf-title { flex: 1; }
  .pf-buttons { display: flex; gap: 8px; padding-bottom: 10px; flex-wrap: wrap; }
  .pf-bio { margin: 18px 24px 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; max-width: 640px; }
  .pf-stats { display: flex; gap: 22px; margin: 14px 24px 0; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
  .pf-stats b { color: var(--text); font-weight: 600; margin-right: 4px; }
  .pf-stats button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
  .pf-stats button:hover { color: var(--text); }
  .profile-page .layout { margin-top: 28px; grid-template-columns: minmax(0, 640px) 220px; }

  /* ---------- настройки ---------- */
  .settings { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
  .inp textarea {
    width: 100%; min-height: 84px; padding: 12px 14px; resize: vertical;
    background: var(--field); border: 1px solid var(--line); border-radius: 11px;
    color: var(--text); font-size: 15px; line-height: 1.5; outline: none; transition: border-color .2s, box-shadow .2s;
  }
  .inp textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
  .choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
  .choice button {
    display: flex; align-items: flex-start; gap: 10px; padding: 14px; text-align: left;
    background: var(--field); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer;
    transition: border-color .15s;
  }
  .choice button:hover { border-color: var(--line-hi); }
  .choice button.on { border-color: var(--accent-2, var(--accent)); box-shadow: 0 0 0 3px var(--ring); }
  .choice button .ico { margin-top: 1px; }
  .choice b { display: block; font-size: 14px; font-weight: 600; }
  .choice small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
  .set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .set-row + .set-row { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
  .set-row h3 { font-size: 14px; font-weight: 600; }
  .set-row p { font-size: 13px; color: var(--muted); margin-top: 3px; }

  /* ---------- просмотр фото ---------- */
  .lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0,0,0,.94); animation: fadeIn .2s ease; }
  .lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; user-select: none; }
  .lightbox .lb-btn {
    position: absolute; width: 46px; height: 46px; display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  }
  .lightbox .lb-btn:hover { background: rgba(255,255,255,.18); }
  .lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
  .lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%) scaleX(-1); }
  .lightbox .lb-close { right: 20px; top: 20px; }
  .lightbox .lb-dl { right: 76px; top: 20px; }
  .lightbox .lb-count { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 13px; }

  /* ---------- загрузка ---------- */
  .skel { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
  .skel i { display: block; height: 12px; border-radius: 6px; background: var(--raise); margin-top: 10px; }
  .skel i:first-child { width: 40%; margin-top: 0; }
  .skel i:nth-child(2) { width: 90%; }
  .skel i:nth-child(3) { width: 70%; }
  .skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(128,128,128,.08), transparent); animation: shimmer 1.3s infinite; }
  @keyframes shimmer { to { transform: translateX(100%); } }
  .loader { display: grid; place-items: center; padding: 28px; }
  .end-note { text-align: center; padding: 18px; font-size: 13px; color: var(--dim); }

  /* поиск в шапке */
  .top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .top-actions .icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; }
  .top-actions .icon-btn .dotn {
    position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
    display: grid; place-items: center; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent);
    font-size: 10px; font-weight: 700; box-shadow: 0 0 0 2px var(--bg);
  }
  .top-actions .icon-btn .dotn:empty { display: none; }

  /* нижняя панель на телефоне */
  .tabbar { display: none; }

  .modal .composer-box { max-width: 620px; }
  .composer-box .composer { border: 0; border-radius: 0; background: none; }
  .share-list { max-height: 50vh; overflow-y: auto; padding: 6px 8px 10px; }
  .share-list .person { border: 0; border-radius: 12px; padding: 10px; cursor: pointer; }
  .share-list .person:hover { background: var(--hover); }

  /* ---------- адаптив ---------- */
  @media (max-width: 1180px) {
    .layout { grid-template-columns: minmax(0, 640px); }
    .rail { display: none; }
    .profile-page .layout { grid-template-columns: minmax(0, 640px); }
    .new-pill { left: calc(50% + 132px); }
  }
  @media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .side {
      position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: 280px;
      transform: translateX(-100%); transition: transform .3s cubic-bezier(.65,0,.35,1);
    }
    .side.open { transform: none; }
    .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity .3s; }
    .scrim.show { opacity: 1; pointer-events: auto; }
    .menu-btn { display: grid; }
    .top { padding: 12px 14px; }
    .top kbd { display: none; }
    .top .top-create span { display: none; }
    .top .top-create { padding: 11px; }
    .top-actions .hide-m { display: none; }
    .content { padding: 18px 14px 96px; }
    .day-sep { top: 76px; }
    .new-pill { left: 50%; top: 78px; }
    .tabbar {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
      display: grid; grid-template-columns: repeat(5, 1fr);
      padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
      background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      border-top: 1px solid var(--line);
    }
    .tabbar button {
      position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0;
      background: none; border: 0; color: var(--muted); font-size: 10.5px; font-weight: 500; cursor: pointer;
    }
    .tabbar button.on { color: var(--text); }
    .tabbar button .ico { width: 22px; height: 22px; }
    .tabbar .create .ico { width: 40px; height: 32px; padding: 6px 11px; border-radius: 11px; background: var(--accent-fill); color: var(--on-accent); stroke-width: 2.2; }
    .tabbar .dotn {
      position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px;
      display: grid; place-items: center; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: 10px; font-weight: 700;
    }
    .tabbar .dotn:empty { display: none; }
    .toasts { bottom: 84px; }
    .messenger { height: calc(100vh - 67px - 114px); grid-template-columns: 1fr; border-radius: 16px; }
    .messenger .chats { border-right: 0; }
    .messenger.open .chats { display: none; }
    .messenger:not(.open) .thread { display: none; }
    .thread-head .back { display: grid; }
    .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); border-radius: 0; }
    .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; }
    .lightbox .lb-next { transform: scaleX(-1); }
  }
  @media (max-width: 560px) {
    .page-head h1 { font-size: 22px; }
    .post-head { padding: 14px 8px 0 14px; }
    .post-text { padding: 10px 14px 2px; font-size: 14.5px; }
    .files { padding: 12px 14px 0; }
    .reacts { padding: 12px 14px 0; }
    .post-foot { padding: 8px 6px 8px; gap: 0; }
    .act { padding: 0 9px; }
    .act .lbl { display: none; }
    .comments { padding: 12px; }
    .composer-tools .chip-btn .lbl { display: none; }
    .feed-bar .select-btn span { display: none; }
    .person { flex-wrap: wrap; }
    .person .acts { width: 100%; padding-left: 60px; }
    .rail .person .acts { width: auto; padding: 0; }
    .notif .acts { width: 100%; }
    .notif { flex-wrap: wrap; }
    .pf-bio, .pf-stats { margin-left: 14px; margin-right: 14px; }
    .pf-buttons { width: 100%; }
    .pf-buttons .btn { flex: 1; }
    .modal { padding: 0; place-items: end stretch; }
    .box { max-height: 92vh; border-radius: 20px 20px 0 0; }
    .toasts { left: 16px; right: 16px; align-items: stretch; }
    .toast { max-width: none; }
  }

  /* ---------- дополнения ---------- */
  .brand { cursor: pointer; display: block; text-decoration: none; }
  .menu { max-height: min(460px, calc(100vh - 16px)); overflow-y: auto; }
  .menu button .grow { display: block; }
  .menu button small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--muted); }
  .menu button .emo { width: 18px; flex: none; text-align: center; font-size: 15px; line-height: 1; }
  .menu-head { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
  .bubble p { display: flow-root; }
  .emoji-pick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
  .emoji-pick button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font-size: 19px; cursor: pointer; }
  .emoji-pick button.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
  .box-top .title { font-size: 15px; font-weight: 600; }
  #cm-body { overflow-y: auto; }
  .pick-box { max-width: 440px; padding: 0; }
  .pick-search { padding: 12px 14px 4px; }
  .pick-search .search { max-width: none; }
  .pick-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
  .pick-foot:empty { display: none; }
  .user .icon-btn { width: 30px; height: 30px; }
  .user .icon-btn .ico { width: 16px; height: 16px; }
  .notif .n-av { position: relative; flex: none; }
  .notif .n-av .avatar { width: 44px; height: 44px; font-size: 17px; }
  .back-row { display: flex; }
  .dialog input[type="date"] { color-scheme: dark; }
  [data-theme="ivory"] .dialog input[type="date"] { color-scheme: light; }
  .ext-mini { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); }
  .content > .empty { max-width: 640px; margin: 40px auto; }

  /* профиль и настройки на телефоне */
  @media (max-width: 560px) {
    .cover { height: 150px; border-radius: 16px; }
    .cover-btn span { display: none; }
    .pf-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: -46px; padding: 0 14px; }
    .pf-avatar { width: 92px; height: 92px; font-size: 34px; border-width: 4px; }
    .pf-title { padding-bottom: 0; }
    .pf-title h1 { font-size: 22px; white-space: normal; }
    .pf-buttons { padding-bottom: 0; }
    .pcard { padding: 18px; }
    .pcard-head { flex-direction: column; }
    .pcard.danger .pcard-head { align-items: flex-start; }
    .row2 { grid-template-columns: 1fr; }
    .set-row { flex-direction: column; align-items: flex-start; }
    .themes { gap: 18px 4px; }
    .theme-opt { width: calc(25% - 3px); }
    .sess { flex-wrap: wrap; }
    .sess .btn { margin-left: 60px; }
  }

  /* ---------- файлы ---------- */
  .fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .fcard { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; outline: none; transition: border-color .2s, transform .2s; }
  .fcard:hover, .fcard:focus-visible { border-color: var(--line-hi); transform: translateY(-2px); }
  .fthumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; background: var(--thumb); border-bottom: 1px solid var(--line); }
  .fthumb img, .fthumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
  .fthumb .play { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; }
  .fthumb .kind-ico { width: 34px; height: 34px; color: var(--muted); }
  .fthumb .ext-badge { padding: 4px 9px; border-radius: 6px; background: var(--accent-fill); color: var(--on-accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
  .fthumb .src { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(6px); }
  .fthumb .src .ico { width: 12px; height: 12px; }
  .fmeta { position: relative; padding: 10px 40px 12px 12px; }
  .fmeta b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fmeta small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fmeta .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
  .tg-hint { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--line-hi); border-radius: 14px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
  .tg-hint b { color: var(--text); font-weight: 600; }
  .tg-hint .ti, .tg-row .ico:first-child { flex: none; }
  .tg-hint .ti { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: #229ED9; color: #fff; }
  .tg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 14px 14px 16px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
  .tg-row > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .lightbox video { max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); border-radius: 6px; background: #000; }
  .lb-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; color: #fff; text-align: center; }
  .lb-audio audio { width: min(420px, 80vw); }
  @media (max-width: 900px) { .lightbox video { max-width: 100vw; max-height: calc(100vh - 140px); border-radius: 0; } }
  @media (max-width: 560px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

  /* ---------- внутри Telegram: отступы под его кнопки и вырез экрана ---------- */
  :root { --safe-top: 0px; --safe-bottom: 0px; --safe-left: 0px; --safe-right: 0px; }
  /* масштабирование пальцами и двойным касанием выключено — приложение не «плывёт» */
  html.tg, html.tg body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  html.tg .media .m { cursor: pointer; }
  html.tg .top { padding-top: calc(12px + var(--safe-top)); padding-left: calc(14px + var(--safe-left)); padding-right: calc(14px + var(--safe-right)); }
  html.tg .top kbd { display: none; }
  html.tg .side { padding-top: calc(22px + var(--safe-top)); padding-bottom: calc(14px + var(--safe-bottom)); }
  html.tg .day-sep { top: calc(78px + var(--safe-top)); }
  html.tg .msgs .day-sep { top: 0; }
  html.tg .rail { top: calc(92px + var(--safe-top)); }
  html.tg .new-pill { top: calc(82px + var(--safe-top)); }
  html.tg .content { padding-bottom: calc(32px + var(--safe-bottom)); }
  html.tg .messenger { height: calc(100vh - 67px - 64px - var(--safe-top) - var(--safe-bottom)); }
  html.tg .modal { padding-top: calc(24px + var(--safe-top)); padding-bottom: calc(24px + var(--safe-bottom)); }
  html.tg .toasts { bottom: calc(24px + var(--safe-bottom)); }
  html.tg .lightbox .lb-close, html.tg .lightbox .lb-dl { top: calc(20px + var(--safe-top)); }
  html.tg .lightbox .lb-count { bottom: calc(22px + var(--safe-bottom)); }
  @media (max-width: 900px) {
    html.tg .content { padding-bottom: calc(96px + var(--safe-bottom)); }
    html.tg .tabbar { padding-bottom: calc(6px + var(--safe-bottom)); }
    html.tg .toasts { bottom: calc(84px + var(--safe-bottom)); }
    html.tg .messenger { height: calc(100vh - 67px - 114px - var(--safe-top) - var(--safe-bottom)); }
    html.tg .lightbox .lb-prev, html.tg .lightbox .lb-next { bottom: calc(14px + var(--safe-bottom)); }
  }
  @media (max-width: 560px) {
    html.tg .modal { padding: var(--safe-top) 0 0; }
    html.tg .composer-box, html.tg .pick-box { padding-bottom: var(--safe-bottom); }
    html.tg .dialog { padding-bottom: calc(24px + var(--safe-bottom)); }
  }

  /* просмотры на публикации */
  .act.views { cursor: default; gap: 6px; padding-right: 6px; }
  .act.views:hover { background: none; color: var(--muted); }
  .act.views b { font-weight: 600; font-variant-numeric: tabular-nums; }

  /* группы тем в настройках */
  #themes { display: flex; flex-direction: column; gap: 20px; }
  .themes-group { display: flex; flex-direction: column; gap: 12px; }
  .themes-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

  /* ---------- просмотр фото: сплошной фон, зум и свайпы ---------- */
  .lightbox { background: #000; }
  .lb-stage {
    width: 100vw; height: 100dvh; display: grid; place-items: center; overflow: hidden;
    touch-action: none; user-select: none; -webkit-user-select: none;
  }
  .lb-stage img, .lb-stage video {
    max-width: 100vw; max-height: 100dvh; object-fit: contain;
    will-change: transform; -webkit-user-drag: none;
  }
  .lightbox.zoomed .lb-stage { cursor: grab; }
  .lightbox.zoomed .lb-stage:active { cursor: grabbing; }
  .lb-top {
    position: absolute; top: calc(12px + var(--safe-top)); right: 12px; z-index: 3;
    display: flex; gap: 8px;
  }
  .lightbox .lb-btn {
    position: absolute; width: 46px; height: 46px; display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
  }
  .lb-top .lb-btn { position: static; }
  .lightbox .lb-count { position: absolute; left: 50%; bottom: calc(22px + var(--safe-bottom)); transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: 13px; }
  .lightbox.zoomed .lb-prev, .lightbox.zoomed .lb-next { opacity: 0; pointer-events: none; }
  @media (max-width: 900px) {
    .lightbox .lb-prev, .lightbox .lb-next { display: none; }   /* на телефоне листаем свайпом */
  }

  /* ---------- боковое меню на телефоне прокручивается до конца ---------- */
  .side { height: 100dvh; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  @media (max-width: 900px) {
    .side { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
    html.tg .side { padding-bottom: calc(20px + var(--safe-bottom)); }
  }

  /* ---------- чат на телефоне: только переписка и кнопка «Назад» ---------- */
  @media (max-width: 900px) {
    body.chat-full .top, body.chat-full .tabbar { display: none; }
    body.chat-full .content { padding: 0; max-width: none; }
    body.chat-full .messenger {
      position: fixed; inset: 0; z-index: 46;
      height: 100dvh; min-height: 0; border: 0; border-radius: 0;
    }
    body.chat-full .thread-head { padding-top: calc(10px + env(safe-area-inset-top)); }
    body.chat-full .thread-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    html.tg body.chat-full .thread-head { padding-top: calc(10px + var(--safe-top)); }
    html.tg body.chat-full .thread-form { padding-bottom: calc(12px + var(--safe-bottom)); }
    body.chat-full .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  }

  /* ---------- рисование обложки и фона ---------- */
  .draw-box { max-width: 780px; }
  .draw-wrap { padding: 14px; background: var(--deep); display: grid; place-items: center; }
  #draw-canvas {
    width: 100%; max-height: 52vh; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    touch-action: none; cursor: crosshair; box-shadow: 0 12px 30px -20px var(--shadow);
  }
  .draw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .draw-colors { display: flex; flex-wrap: wrap; gap: 6px; }
  .draw-colors button { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--line-hi); cursor: pointer; }
  .draw-colors button.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
  .draw-custom { position: relative; width: 28px; height: 28px; overflow: hidden; border: 2px solid var(--line-hi); border-radius: 50%; cursor: pointer; }
  .draw-custom input { position: absolute; inset: -8px; width: 44px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; }
  .draw-size { display: flex; align-items: center; margin-left: auto; }
  .draw-size input { width: 120px; accent-color: var(--accent); }
  .chip-btn.on { border-color: var(--accent); background: var(--soft); }
  @media (max-width: 560px) {
    #draw-canvas { max-height: 38vh; }
    .draw-tools .lbl { display: none; }
    .draw-size { width: 100%; margin: 0; }
    .draw-size input { width: 100%; }
  }

  /* обложка: кнопки в углу, нарисованный фон профиля */
  .cover-tools { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .cover-tools .cover-btn { position: static; }
  .profile-bg { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; opacity: .7; pointer-events: none; }
  .profile-page { position: relative; z-index: 1; }

  /* нарисованный фон профиля не должен залезать на меню и мешать читать текст */
  .side { position: sticky; z-index: 2; }
  .profile-bg { opacity: .55; }
  .has-bg .pf-bio, .has-bg .pf-stats {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
  }
  .has-bg .pf-stats { display: flex; }
  @media (max-width: 900px) { .side { position: fixed; } }

  /* меню на телефоне должно быть НАД затемнением */
  @media (max-width: 900px) {
    .side { position: fixed; z-index: 40; }
    .scrim { z-index: 35; }
  }

  /* ---------- подтверждённый аккаунт ---------- */
  .vbadge { display: inline-flex; vertical-align: -2px; margin-left: 4px; }
  .vbadge .ico { width: 15px; height: 15px; color: #1d9bf0; }
  .pf-title h1 .vbadge .ico { width: 22px; height: 22px; }

  /* ---------- опрос ---------- */
  .poll { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 0; }
  .poll-row {
    position: relative; display: flex; align-items: center; gap: 10px; overflow: hidden;
    padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--field); color: var(--text); font-size: 14px; text-align: left; cursor: pointer;
    transition: border-color .15s;
  }
  .poll-row:hover { border-color: var(--line-hi); }
  .poll-row.mine { border-color: var(--accent-2, var(--accent)); }
  .poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--soft); transition: width .35s cubic-bezier(.2,.8,.2,1); }
  .poll-text { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
  .poll-check { width: 15px; height: 15px; color: var(--accent-2, var(--accent)); stroke-width: 3; }
  .poll-num { position: relative; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
  .poll-row.mine .poll-num { color: var(--text); }
  .poll-total { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; color: var(--dim); }
  .poll-total .ico { width: 14px; height: 14px; }

  /* редактор опроса в форме публикации */
  .poll-edit { margin-top: 10px; padding: 12px; border: 1px dashed var(--line-hi); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
  .poll-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
  .poll-head .icon-btn { margin-left: auto; width: 28px; height: 28px; }
  .poll-opt { display: flex; align-items: center; gap: 6px; }
  .poll-opt input {
    flex: 1; min-width: 0; padding: 9px 12px; background: var(--field);
    border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14px; outline: none;
  }
  .poll-opt input:focus { border-color: var(--accent); }
  .poll-opt .icon-btn { width: 30px; height: 30px; }
  .poll-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
  .poll-multi { display: flex; align-items: center; gap: 6px; cursor: pointer; }
  .poll-multi input { accent-color: var(--accent); }

  /* ---------- поделиться профилем ---------- */
  .qr-box { max-width: 380px; text-align: center; }
  .qr-holder { display: grid; place-items: center; margin: 4px 0 12px; }
  .qr-holder .qr { border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 6px; }
  .qr-link { font-size: 13px; color: var(--muted); word-break: break-all; margin-bottom: 4px; }
  .qr-box .dialog-actions { justify-content: center; flex-wrap: wrap; }
