/* ═══ ПРОФИЛЬ v2 (телефон) ═══════════════════════════════════════════════
   По видео-референсу Рамазана (01.10): кольцо вокруг аватара, три счётчика,
   сгруппированные настройки с цветными плитками, большая карточка темы
   с переключателем солнце/луна, iOS-переходы между экранами и крупные
   заголовки подэкранов. Грузится последним — перекрывает site/milk.
   Цвета — наши: тёмная (#141414) и «Молоко». */

@media (max-width:820px){
  #mprofile{
    --p2-card:#1d1d1f; --p2-card-2:#262628; --p2-line:rgba(255,255,255,.07);
    --p2-text:#f3f3f3; --p2-sub:#8e8e93; --p2-acc:#f3f3f3; --p2-acc-ink:#141414;
    --p2-knob:#fff; --p2-off:#3a3a3c;
    --p2-ring:conic-gradient(from 0deg,#ffffff,#6b6b70,#d9d9dc,#3a3a3c,#ffffff);
    --p2-shadow:0 1px 0 rgba(255,255,255,.04) inset;
    --p2-ease:cubic-bezier(.22,1,.36,1);
    --p2-spring:cubic-bezier(.34,1.56,.64,1);
  }
  html[data-skin=milk] #mprofile{
    --p2-card:#fffdf9; --p2-card-2:#f7f2ea; --p2-line:rgba(42,36,29,.08);
    --p2-text:#1f1b16; --p2-sub:#7d7263; --p2-acc:#2a241d; --p2-acc-ink:#fffdf9;
    --p2-knob:#fff; --p2-off:#e4dccf;
    --p2-ring:conic-gradient(from 0deg,#2a241d,#c9a77c,#efe4d2,#8a6f4e,#2a241d);
    --p2-shadow:0 1px 2px rgba(42,36,29,.05),0 8px 24px -12px rgba(42,36,29,.12);
  }

  /* ---- Переходы экранов ---- */
  html body #mprofile .mprofile-screen.active{animation:none}
  html body #mprofile .mprofile-screen.active.p2-fwd{animation:p2Fwd .42s var(--p2-ease) both}
  html body #mprofile .mprofile-screen.active.p2-back{animation:p2Back .42s var(--p2-ease) both}
  @keyframes p2Fwd{from{opacity:0;transform:translateX(38%)}to{opacity:1;transform:none}}
  @keyframes p2Back{from{opacity:0;transform:translateX(-22%)}to{opacity:1;transform:none}}
  /* лесенка появления блоков */
  #mprofile .mprofile-screen.active > *{animation:p2Rise .5s var(--p2-ease) both}
  #mprofile .mprofile-screen.active > *:nth-child(2){animation-delay:.04s}
  #mprofile .mprofile-screen.active > *:nth-child(3){animation-delay:.08s}
  #mprofile .mprofile-screen.active > *:nth-child(4){animation-delay:.12s}
  #mprofile .mprofile-screen.active > *:nth-child(5){animation-delay:.16s}
  #mprofile .mprofile-screen.active > *:nth-child(6){animation-delay:.2s}
  #mprofile .mprofile-screen.active > *:nth-child(7){animation-delay:.24s}
  #mprofile .mprofile-screen.active > *:nth-child(n+8){animation-delay:.28s}
  @keyframes p2Rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

  /* ---- Шапка профиля ---- */
  html body #mprofile .p2-hero{display:flex;flex-direction:column;align-items:center;padding:4px 0 18px;text-align:center}
  html body #mprofile .p2-ring{position:relative;width:112px;height:112px;border-radius:50%;padding:4px;margin-bottom:14px;isolation:isolate}
  html body #mprofile .p2-ring::before{content:"";position:absolute;inset:0;border-radius:50%;background:var(--p2-ring);z-index:-1;animation:p2Spin 6s linear infinite}
  html body #mprofile .p2-ring::after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--bg-page);z-index:-1}
  @keyframes p2Spin{to{transform:rotate(360deg)}}
  html body #mprofile .p2-ring .mprof-avatar{width:100%;height:100%;border-radius:50%;margin:0;border:0;box-shadow:none;animation:p2Pop .6s var(--p2-spring) both}
  @keyframes p2Pop{from{transform:scale(.7);opacity:0}to{transform:none;opacity:1}}
  html body #mprofile .p2-ring .mprof-avatar-cam{right:0;bottom:2px;width:32px;height:32px;border-radius:50%;background:var(--p2-acc);color:var(--p2-acc-ink);border:3px solid var(--bg-page)}
  html body #mprofile .p2-ring .mprof-avatar-cam svg{width:14px;height:14px}
  html body #mprofile .p2-hero .mprof-name{font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--p2-text);margin:0}
  html body #mprofile .p2-sub{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:4px;font-size:13.5px;color:var(--p2-sub);max-width:88%}
  html body #mprofile .p2-sub .mprof-status{font-size:inherit;color:inherit;margin:0;padding:0;background:none;border:0;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
  html body #mprofile .p2-dot{opacity:.6}

  /* ---- Счётчики ---- */
  html body #mprofile .p2-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 14px}
  html body #mprofile .p2-stat{background:var(--p2-card);border:.5px solid var(--p2-line);border-radius:var(--p2-r,18px);padding:14px 8px 12px;text-align:center;box-shadow:var(--p2-shadow);transition:transform .25s var(--p2-spring)}
  html body #mprofile .p2-stat:active{transform:scale(.96)}
  html body #mprofile .p2-stat b{display:block;font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--p2-text);font-variant-numeric:tabular-nums;line-height:1.1}
  html body #mprofile .p2-stat span{display:block;margin-top:3px;font-size:11.5px;color:var(--p2-sub)}

  /* ---- Карточка темы ---- */
  html body #mprofile .p2-theme{display:flex;align-items:center;gap:12px;width:100%;padding:14px 14px 14px 12px;margin:0 0 6px;background:var(--p2-card);border:.5px solid var(--p2-line);border-radius:var(--p2-r,20px);box-shadow:var(--p2-shadow);color:var(--p2-text);text-align:left;font:inherit;cursor:pointer;transition:transform .2s var(--p2-ease)}
  html body #mprofile .p2-theme:active{transform:scale(.985)}
  html body #mprofile .p2-theme-text{flex:1;min-width:0;display:flex;flex-direction:column}
  html body #mprofile .p2-theme-text b{font-size:15.5px;font-weight:600}
  html body #mprofile .p2-theme-text small{font-size:12.5px;color:var(--p2-sub);margin-top:1px}
  html body #mprofile .p2-ic-theme{position:relative;overflow:hidden}
  html body #mprofile .p2-ic-theme svg{position:absolute;transition:transform .5s var(--p2-spring),opacity .3s}
  html body #mprofile .p2-theme .p2-moon{transform:translateY(120%) rotate(-40deg);opacity:0}
  html body #mprofile .p2-theme.on .p2-sun{transform:translateY(-120%) rotate(60deg);opacity:0}
  html body #mprofile .p2-theme.on .p2-moon{transform:none;opacity:1}
  /* переключатель солнце → луна */
  html body #mprofile .p2-sw{position:relative;flex:none;width:60px;height:34px;border-radius:17px;background:linear-gradient(135deg,#ffd27a,#f59f45);overflow:hidden;transition:background .45s var(--p2-ease)}
  html body #mprofile .p2-theme.on .p2-sw{background:linear-gradient(135deg,#2b2f4a,#12131f)}
  html body #mprofile .p2-sw-knob{position:absolute;top:4px;left:4px;width:26px;height:26px;border-radius:50%;background:#fff6d8;box-shadow:0 0 0 4px rgba(255,255,255,.25),0 2px 6px rgba(0,0,0,.2);transition:transform .5s var(--p2-spring),background .4s,box-shadow .4s}
  html body #mprofile .p2-theme.on .p2-sw-knob{transform:translateX(26px);background:#eef0ff;box-shadow:inset -7px -3px 0 0 #c9cde6,0 2px 6px rgba(0,0,0,.4)}
  html body #mprofile .p2-star{position:absolute;width:3px;height:3px;border-radius:50%;background:#fff;opacity:0;transform:scale(0);transition:all .4s var(--p2-ease)}
  html body #mprofile .p2-star.s1{left:10px;top:9px}
  html body #mprofile .p2-star.s2{left:18px;top:20px;width:2px;height:2px}
  html body #mprofile .p2-star.s3{left:26px;top:8px;width:2px;height:2px}
  html body #mprofile .p2-theme.on .p2-star{opacity:.9;transform:none;transition-delay:.15s}

  /* ---- Подписи групп и группы ---- */
  html body #mprofile .p2-cap,
  html body #mprofile .mprof-section-cap{font-size:11.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--p2-sub);margin:18px 6px 8px;padding:0;background:none}
  html body #mprofile .p2-group{background:var(--p2-card) !important;border:.5px solid var(--p2-line) !important;border-radius:var(--p2-r,20px) !important;box-shadow:var(--p2-shadow) !important;padding:4px 0 !important;margin:0 !important;overflow:hidden;-webkit-backdrop-filter:none !important;backdrop-filter:none !important}
  html body #mprofile .p2-group .mprof-menu-item{position:relative;display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 14px 8px 12px !important;background:transparent !important;border:0 !important;border-radius:0 !important;color:var(--p2-text) !important;text-align:left;transition:background .15s}
  html body #mprofile .p2-group .mprof-menu-item + .mprof-menu-item::before{content:"";position:absolute;top:0;left:58px;right:0;height:.5px;background:var(--p2-line)}
  html body #mprofile .p2-group .mprof-menu-item:active{background:var(--p2-card-2) !important}
  html body #mprofile .p2-row-text{flex:1;min-width:0;display:flex;flex-direction:column}
  html body #mprofile .p2-row-text small{font-size:12.5px;color:var(--p2-sub);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body #mprofile .p2-group .mprof-menu-title{font-size:15.5px;font-weight:500;color:var(--p2-text) !important}
  html body #mprofile .p2-group .mprof-menu-item > .mprof-menu-title{flex:1}
  html body #mprofile .p2-group .mprof-chev{width:17px;height:17px;color:var(--p2-sub);opacity:.7;transition:transform .2s var(--p2-ease)}
  html body #mprofile .p2-group .mprof-menu-item:active .mprof-chev{transform:translateX(3px)}
  html body #mprofile .p2-group .mprof-menu-val{font-size:13px;color:var(--p2-sub)}

  /* цветные плитки иконок */
  html body #mprofile .mprof-menu-ic,
  html body #mprofile .p2-ic{flex:none;width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:var(--tile-bg,var(--p2-card-2)) !important;color:var(--tile-fg,var(--p2-text)) !important;border:0 !important}
  html body #mprofile .mprof-menu-ic svg,
  html body #mprofile .p2-ic svg{width:18px;height:18px}
  #mprofile .p2-t1{--tile-bg:rgba(120,140,255,.16);--tile-fg:#8c9bff}
  #mprofile .p2-t2{--tile-bg:rgba(60,200,140,.15);--tile-fg:#43c98f}
  #mprofile .p2-t3{--tile-bg:rgba(255,95,110,.15);--tile-fg:#ff6b78}
  #mprofile .p2-t4{--tile-bg:rgba(255,170,60,.16);--tile-fg:#ffab45}
  #mprofile .p2-t5{--tile-bg:rgba(80,190,255,.15);--tile-fg:#55b8f5}
  #mprofile .p2-t6{--tile-bg:rgba(170,170,180,.16);--tile-fg:var(--p2-sub)}
  #mprofile .p2-ic-theme{--tile-bg:rgba(255,190,70,.18);--tile-fg:#f0a530}
  #mprofile .p2-theme.on .p2-ic-theme{--tile-bg:rgba(140,150,255,.18);--tile-fg:#a3adff}
  html[data-skin=milk] #mprofile .p2-t1{--tile-fg:#5b67d8}
  html[data-skin=milk] #mprofile .p2-t2{--tile-fg:#23915f}
  html[data-skin=milk] #mprofile .p2-t3{--tile-fg:#d8414f}
  html[data-skin=milk] #mprofile .p2-t4{--tile-fg:#c77712}
  html[data-skin=milk] #mprofile .p2-t5{--tile-fg:#1f84c4}

  /* ---- Подэкраны: шапка + крупный заголовок ---- */
  html body #mprofile .mprof-head{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:center;height:46px;margin:0 -16px 0;padding:0 16px;background:transparent;transition:background .25s,backdrop-filter .25s}
  html body #mprofile .mprof-back{position:absolute;left:12px;top:5px;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--p2-card) !important;border:.5px solid var(--p2-line) !important;color:var(--p2-text) !important;transition:transform .2s var(--p2-spring)}
  html body #mprofile .mprof-back:active{transform:scale(.88)}
  html body #mprofile .mprof-back svg{width:18px;height:18px}
  html body #mprofile .mprof-head-title{font-size:16px;font-weight:600;color:var(--p2-text);opacity:0;transform:translateY(6px);transition:opacity .25s,transform .25s var(--p2-ease)}
  html body #mprofile.p2-scrolled .mprof-head{background:color-mix(in srgb,var(--bg-page) 82%,transparent);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
  html body #mprofile.p2-scrolled .mprof-head-title{opacity:1;transform:none}
  html body #mprofile .p2-big{font-size:32px;font-weight:700;letter-spacing:-.03em;color:var(--p2-text);margin:6px 4px 10px;transition:opacity .25s,transform .3s var(--p2-ease);transform-origin:left}
  html body #mprofile.p2-scrolled .p2-big{opacity:0;transform:scale(.92) translateY(-6px)}

  /* секции подэкранов — карточки */
  html body #mprofile .mprof-section{background:var(--p2-card) !important;border:.5px solid var(--p2-line) !important;border-radius:var(--p2-r,20px) !important;box-shadow:var(--p2-shadow) !important;padding:6px 14px !important;margin:0 0 14px !important}
  html body #mprofile .mprof-section .mprof-section-cap{margin:10px 0 4px}
  html body #mprofile .mprof-toggle-row,
  html body #mprofile .mprof-list-row{min-height:54px;padding:8px 0 !important;border-color:var(--p2-line) !important;background:transparent !important;color:var(--p2-text)}
  html body #mprofile .mprof-toggle-text{color:var(--p2-text);font-size:15px}
  html body #mprofile .mprof-toggle-text span{color:var(--p2-sub) !important}

  /* тумблеры — iOS-пилюля с пружиной */
  html body #mprofile .mprof-tgl{position:relative;flex:none;width:51px !important;height:31px !important;border-radius:16px !important;background:var(--p2-off) !important;border:0 !important;box-shadow:none !important;cursor:pointer;transition:background .3s var(--p2-ease) !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important}
  html body #mprofile .mprof-tgl[data-on="1"]{background:var(--p2-acc) !important}
  html body #mprofile .mprof-tgl .mprof-tgl-lens{position:absolute !important;top:2px !important;left:2px !important;width:27px !important;height:27px !important;border-radius:50% !important;background:var(--p2-knob) !important;border:0 !important;box-shadow:0 2px 6px rgba(0,0,0,.22) !important;transform:none;transition:transform .45s var(--p2-spring),width .2s !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important}
  html body #mprofile .mprof-tgl[data-on="1"] .mprof-tgl-lens{transform:translateX(20px) !important}
  html body #mprofile .mprof-tgl[data-on="1"] .mprof-tgl-lens{background:var(--p2-acc-ink) !important}
  html body #mprofile .mprof-tgl:active .mprof-tgl-lens{width:32px !important}
  html body #mprofile .mprof-tgl[data-on="1"]:active .mprof-tgl-lens{transform:translateX(15px) !important}
}

/* ═══ ПРОФИЛЬ v2 · часть 2 (01.10): Оформление, Язык, пуш-превью,
   Аккаунт / Конфиденциальность / Итоги в том же стиле ═══════════════════ */

/* размер текста из «Оформления» — масштаб всего содержимого */
html body .main{zoom:var(--p2-zoom,1)}
/* пользовательский акцент в элементах профиля */
#mprofile{--p2-hl:var(--p2-user-acc,var(--p2-acc))}

@media (max-width:820px){
  html body #mprofile .p2-lead{font-size:14px;color:var(--p2-sub);margin:-4px 4px 14px}
  html body #mprofile .p2-card{background:var(--p2-card);border:.5px solid var(--p2-line);border-radius:var(--p2-r,20px);box-shadow:var(--p2-shadow);padding:14px}
  html body #mprofile .p2-cap-row{display:flex;justify-content:space-between;align-items:baseline}
  html body #mprofile .p2-cap-row span{text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:600;color:var(--p2-hl)}

  /* живое превью */
  html body #mprofile .p2-preview{background:var(--p2-card);border:.5px solid var(--p2-line);border-radius:var(--p2-r,22px);box-shadow:var(--p2-shadow);padding:14px;margin-bottom:12px;display:flex;flex-direction:column;gap:8px;transition:border-radius .35s var(--p2-ease)}
  html body #mprofile .p2-preview.p2-bump{animation:p2Bump .45s var(--p2-spring)}
  @keyframes p2Bump{40%{transform:scale(.975)}}
  html body #mprofile .p2-pv-head{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--p2-text)}
  html body #mprofile .p2-pv-head em{margin-left:auto;font-style:normal;font-size:11.5px;color:#43c98f}
  html body #mprofile .p2-pv-dot{width:26px;height:26px;border-radius:50%;background:var(--p2-hl);box-shadow:inset 0 0 0 7px var(--p2-card)}
  html body #mprofile .p2-pv-msg{max-width:84%;padding:9px 12px;border-radius:calc(var(--p2-r,20px) - 4px);font-size:13.5px;line-height:1.35;transition:all .35s var(--p2-ease)}
  html body #mprofile .p2-pv-msg.in{background:var(--p2-card-2);color:var(--p2-text);border-bottom-left-radius:6px}
  html body #mprofile .p2-pv-msg.out{align-self:flex-end;background:var(--p2-hl);color:var(--p2-acc-ink);border-bottom-right-radius:6px}
  html body #mprofile .p2-pv-task{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:calc(var(--p2-r,20px) - 6px);border:.5px solid var(--p2-line);font-size:13.5px;color:var(--p2-text)}
  html body #mprofile .p2-pv-task i{margin-left:auto;font-style:normal;font-size:11.5px;padding:3px 8px;border-radius:99px;background:color-mix(in srgb,var(--p2-hl) 16%,transparent);color:var(--p2-hl)}
  html body #mprofile .p2-pv-check{width:18px;height:18px;border-radius:6px;border:2px solid var(--p2-hl)}
  html body #mprofile #mprof-appearance .p2-theme{margin-bottom:0}

  /* цвета */
  html body #mprofile .p2-swatches{display:flex;justify-content:space-between;padding:14px 16px}
  html body #mprofile .p2-swatch{width:40px;height:40px;border-radius:50%;border:0;background:var(--sw);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .35s var(--p2-spring),box-shadow .3s}
  html body #mprofile .p2-swatch svg{width:18px;height:18px;opacity:0;transform:scale(.3);transition:all .35s var(--p2-spring);mix-blend-mode:difference}
  html body #mprofile .p2-swatch.on{box-shadow:0 0 0 3px var(--p2-card),0 0 0 5px var(--sw);transform:scale(1.04)}
  html body #mprofile .p2-swatch.on svg{opacity:1;transform:none}
  html body #mprofile .p2-swatch:active{transform:scale(.88)}

  /* размер текста */
  html body #mprofile .p2-sizes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:10px}
  html body #mprofile .p2-size{height:48px;border-radius:calc(var(--p2-r,20px) - 6px);border:1.5px solid transparent;background:var(--p2-card-2);color:var(--p2-text);font-weight:600;cursor:pointer;transition:all .3s var(--p2-spring)}
  html body #mprofile .p2-size.on{border-color:var(--p2-hl);background:color-mix(in srgb,var(--p2-hl) 12%,var(--p2-card));color:var(--p2-hl);transform:translateY(-2px)}
  html body #mprofile .p2-size:active{transform:scale(.92)}

  /* стиль углов */
  html body #mprofile .p2-styles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
  html body #mprofile .p2-style{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 8px 10px;background:var(--p2-card);border:1.5px solid var(--p2-line);border-radius:var(--p2-r,20px);color:var(--p2-sub);font:600 12.5px var(--sans);cursor:pointer;transition:all .3s var(--p2-spring)}
  html body #mprofile .p2-style.on{border-color:var(--p2-hl);color:var(--p2-text);transform:translateY(-2px)}
  html body #mprofile .p2-style-demo{width:100%;height:44px;display:flex;flex-direction:column;gap:5px;justify-content:center;padding:0 8px;background:var(--p2-card-2)}
  html body #mprofile .p2-style-demo i{display:block;height:9px;background:var(--p2-sub);opacity:.35}
  html body #mprofile .p2-style-demo i:first-child{width:70%;background:var(--p2-hl);opacity:1}
  html body #mprofile .p2-style-round .p2-style-demo{border-radius:12px}
  html body #mprofile .p2-style-round .p2-style-demo i{border-radius:6px}
  html body #mprofile .p2-style-soft .p2-style-demo{border-radius:18px}
  html body #mprofile .p2-style-soft .p2-style-demo i{border-radius:9px}
  html body #mprofile .p2-style-crisp .p2-style-demo{border-radius:3px}
  html body #mprofile .p2-style-crisp .p2-style-demo i{border-radius:1px}
  html body #mprofile .p2-reset{display:block;margin:18px auto 0;background:none;border:0;color:var(--p2-sub);font:500 13.5px var(--sans);text-decoration:underline;text-underline-offset:3px;cursor:pointer}

  /* язык */
  html body #mprofile .p2-hello{text-align:center;padding:26px 14px 20px;margin-bottom:4px;background:radial-gradient(120% 100% at 50% 0%,color-mix(in srgb,var(--p2-hl) 14%,var(--p2-card)),var(--p2-card))}
  html body #mprofile .p2-hello b{display:block;font-size:34px;font-weight:700;letter-spacing:-.02em;color:var(--p2-hl)}
  html body #mprofile .p2-hello b.p2-swap{animation:p2Swap .5s var(--p2-spring)}
  @keyframes p2Swap{from{opacity:0;transform:translateY(10px) scale(.9);filter:blur(4px)}to{opacity:1;transform:none;filter:none}}
  html body #mprofile .p2-hello small{display:block;margin-top:4px;font-size:12.5px;color:var(--p2-sub)}
  html body #mprofile .p2-lang .p2-row-text{padding-left:4px}
  html body #mprofile .p2-group .p2-lang + .p2-lang::before{left:16px}
  html body #mprofile .p2-soon{font-size:11px;padding:3px 8px;border-radius:99px;background:var(--p2-card-2);color:var(--p2-sub)}
  html body #mprofile .p2-radio{width:22px;height:22px;border-radius:50%;border:1.5px solid var(--p2-sub);opacity:.6;flex:none;transition:all .3s var(--p2-spring)}
  html body #mprofile .p2-lang.on .p2-radio{border:6px solid var(--p2-hl);opacity:1}

  /* пуш-превью */
  html body #mprofile .p2-push{display:flex;gap:12px;align-items:flex-start;padding:14px;margin-bottom:14px;border-radius:calc(var(--p2-r,20px) + 4px);background:color-mix(in srgb,var(--p2-card) 78%,transparent);-webkit-backdrop-filter:blur(24px) saturate(160%);backdrop-filter:blur(24px) saturate(160%);border:.5px solid var(--p2-line);box-shadow:0 18px 40px -18px rgba(0,0,0,.45),var(--p2-shadow);transition:opacity .3s,filter .3s}
  html body #mprofile .p2-push.p2-drop{animation:p2Drop .6s var(--p2-spring)}
  @keyframes p2Drop{from{opacity:0;transform:translateY(-26px) scale(.94)}to{opacity:1;transform:none}}
  html body #mprofile .p2-push.off{opacity:.55;filter:grayscale(1)}
  html body #mprofile .p2-push-ic{flex:none;width:40px;height:40px;border-radius:11px;background:var(--p2-hl);color:var(--p2-acc-ink);display:flex;align-items:center;justify-content:center}
  html body #mprofile .p2-push-ic svg{width:22px;height:22px}
  html body #mprofile .p2-push-body{flex:1;min-width:0}
  html body #mprofile .p2-push-top{display:flex;justify-content:space-between;font-size:12.5px;color:var(--p2-sub)}
  html body #mprofile .p2-push-top b{color:var(--p2-text);font-weight:600}
  html body #mprofile .p2-push-title{font-size:15px;font-weight:600;color:var(--p2-text);margin-top:2px}
  html body #mprofile .p2-push-text{font-size:13.5px;color:var(--p2-sub);margin-top:1px;line-height:1.35}
  #mprofile .p2-t7{--tile-bg:rgba(200,120,255,.16);--tile-fg:#c58cff}
  html[data-skin=milk] #mprofile .p2-t7{--tile-fg:#8a4fd0}
  html body #mprofile .mprof-tgl[data-on="1"]{background:var(--p2-hl) !important}

  /* ---- Аккаунт ---- */
  html body #mprofile #mprof-account .mprof-photo-row{display:flex;flex-direction:column;align-items:center;gap:12px;padding:10px 0 6px}
  html body #mprofile #mprof-account .mprof-avatar.sm{width:96px;height:96px;border-radius:50%;font-size:36px;box-shadow:0 0 0 3px var(--p2-card),0 0 0 5px var(--p2-hl)}
  html body #mprofile #mprof-account .mprof-photo-actions{display:flex;gap:8px}
  html body #mprofile #mprof-account .mprof-photo-btn{display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:99px !important;border:.5px solid var(--p2-line) !important;background:var(--p2-card-2) !important;color:var(--p2-text) !important;font:500 13px var(--sans)}
  html body #mprofile #mprof-account .mprof-photo-btn.del{color:#ff6b78 !important}
  html body #mprofile #mprof-account .mprof-photo-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
  html body #mprofile .mprof-lbl{display:block;font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--p2-sub);margin:14px 2px 6px}
  html body #mprofile .mprof-input{width:100%;background:var(--p2-card-2) !important;border:1.5px solid transparent !important;border-radius:calc(var(--p2-r,20px) - 6px) !important;color:var(--p2-text) !important;padding:12px 14px !important;font:500 16px var(--sans) !important;box-shadow:none !important;transition:border-color .2s,background .2s,box-shadow .25s !important}
  html body #mprofile .mprof-input:focus{outline:0;border-color:var(--p2-hl) !important;background:var(--p2-card) !important;box-shadow:0 0 0 4px color-mix(in srgb,var(--p2-hl) 14%,transparent) !important}
  html body #mprofile .mprof-input-prefixed{position:relative;display:flex;align-items:center}
  html body #mprofile .mprof-input-prefix{position:absolute;left:14px;color:var(--p2-sub);font-weight:600;z-index:1}
  html body #mprofile .mprof-input-prefixed .mprof-input{padding-left:30px !important}
  html body #mprofile .mprof-hint{font-size:12.5px;color:var(--p2-sub);margin:6px 2px 4px;line-height:1.4}
  html body #mprofile .mprof-bd-row{display:flex;align-items:center;gap:10px;margin-top:12px;padding:12px 14px;border-radius:calc(var(--p2-r,20px) - 6px);background:var(--p2-card-2);cursor:pointer}
  html body #mprofile .mprof-bd-text{flex:1}
  html body #mprofile .mprof-bd-value{color:var(--p2-text);font-weight:500}
  html body #mprofile .mprof-bd-value.empty{color:var(--p2-sub)}
  html body #mprofile .mprof-bd-label{font-size:12px;color:var(--p2-sub)}
  html body #mprofile .mprof-bd-age{font-size:12.5px;padding:3px 9px;border-radius:99px;background:color-mix(in srgb,var(--p2-hl) 14%,transparent);color:var(--p2-hl)}
  html body #mprofile .mprof-bd-age:empty{display:none}
  html body #mprofile .mprof-section.mprof-danger{background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important}
  html body #mprofile .mprof-delete-btn{width:100%;height:50px;border-radius:var(--p2-r,20px) !important;background:rgba(255,95,110,.12) !important;color:#ff6b78 !important;border:0 !important;font:600 15px var(--sans)}
  html[data-skin=milk] body #mprofile .mprof-delete-btn{color:#c0392b !important}

  /* ---- Конфиденциальность ---- */
  html body #mprofile .mprof-list-row{display:flex;align-items:center;gap:12px;cursor:pointer;border-bottom:.5px solid var(--p2-line) !important}
  html body #mprofile .mprof-section > .mprof-list-row:last-child,
  html body #mprofile .mprof-section > .mprof-toggle-row:last-child{border-bottom:0 !important}
  html body #mprofile .mprof-list-row .mprof-field-text{flex:1;min-width:0}
  html body #mprofile .mprof-field-value{color:var(--p2-text);font-size:15px;font-weight:500}
  html body #mprofile .mprof-field-label{color:var(--p2-sub);font-size:12.5px}
  html body #mprofile .mprof-list-row .mprof-chev{width:17px;height:17px;color:var(--p2-sub)}
  html body #mprofile .mprof-toggle-row{display:flex;align-items:center;gap:12px;border-bottom:.5px solid var(--p2-line) !important}
  html body #mprofile .mprof-toggle-text{flex:1;display:flex;flex-direction:column;font-weight:500}
  html body #mprofile .mprof-toggle-text span{font-size:12.5px;font-weight:400;margin-top:1px}
  html body #mprofile .mprof-data-btn{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:8px 0 !important;margin:0 !important;background:transparent !important;border:0 !important;border-bottom:.5px solid var(--p2-line) !important;border-radius:0 !important;color:var(--p2-text) !important;font:500 15px var(--sans) !important;text-align:left;cursor:pointer;box-shadow:none !important}
  html body #mprofile .mprof-data-btn:last-child{border-bottom:0 !important}
  html body #mprofile .mprof-data-btn svg{flex:none;width:34px;height:34px;padding:8px;border-radius:11px;background:rgba(60,200,140,.15);color:#43c98f;box-sizing:border-box}
  html body #mprofile .mprof-section-cap + .mprof-data-btn svg{background:rgba(200,120,255,.16);color:#c58cff}
  html body #mprofile .mprof-data-btn:active{opacity:.6}
}

/* ---- Итоги недели / месяца — тот же язык: карточки, пилюли, мягкие входы ---- */
.ins-sheet{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.ins-panel{border-radius:28px !important;border:.5px solid var(--line) !important;box-shadow:var(--shadow-float) !important}
.ins-head{padding:22px 22px 8px !important}
.ins-title{font-size:30px !important;letter-spacing:-.03em}
.ins-close,.ins-nav button{border-radius:50% !important;border:.5px solid var(--line) !important}
.ins-seg{padding:3px !important}
.ins-seg button{border-radius:99px !important;padding:8px 16px !important;transition:all .3s cubic-bezier(.34,1.56,.64,1)}
.ins-seg button.active{background:var(--accent) !important;color:var(--bg-page) !important}
.ins-tile,.ins-card,.ins-notes{border-radius:20px !important;border:.5px solid var(--line) !important;box-shadow:var(--shadow-soft);animation:p2Rise .5s cubic-bezier(.22,1,.36,1) both}
.ins-tile{padding:14px 16px !important}
.ins-tile-value{font-size:24px !important;letter-spacing:-.02em;margin:2px 0}
.ins-tile:nth-child(2){animation-delay:.05s}.ins-tile:nth-child(3){animation-delay:.1s}.ins-tile:nth-child(4){animation-delay:.15s}
.ins-grid > .ins-card:nth-child(1){animation-delay:.12s}.ins-grid > .ins-card:nth-child(2){animation-delay:.17s}.ins-grid > .ins-card:nth-child(3){animation-delay:.22s}.ins-grid > .ins-card:nth-child(n+4){animation-delay:.27s}
.ins-delta{display:inline-block;padding:2px 7px;border-radius:99px;background:var(--bg-card-2)}
.ins-delta.good{background:color-mix(in srgb,var(--success) 14%,transparent)}
.ins-delta.bad{background:color-mix(in srgb,var(--danger) 14%,transparent)}
.ins-card-title{font-weight:600 !important}
.ins-cat-track{border-radius:99px !important;overflow:hidden}
.ins-cat-fill{border-radius:99px !important}
@keyframes p2Rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media (max-width:820px){
  .ins-sheet{align-items:flex-end !important}
  .ins-panel{width:100% !important;max-height:92dvh !important;border-radius:28px 28px 0 0 !important}
  .ins-tiles{grid-template-columns:1fr 1fr !important}
}

@media (prefers-reduced-motion:reduce){
  #mprofile *,#mprofile *::before,#mprofile *::after,.ins-sheet *{animation:none !important;transition:none !important}
}
