/* Talksy Web — Android: Material You-скин поверх раскладки ios.css (html.ios.md).
   Свои доработки: фирменный индиго, градиентные исходящие, «сквиркл»-кнопки, пилюля-индикатор в нижней панели. */
html.ios .hgrp{display:flex;gap:6px;align-items:center}

/* ── палитра ── */
html.md.ios{
  --bg:#fffbfe;--bg-g:#f4eff6;--panel:#fff;--panel-g:#fff;--panel2:#f1ecf4;--panel3:#e6e0ec;--line:rgba(0,0,0,.08);
  --text:#1d1b20;--text2:#49454f;--text3:#8a8591;--atext:#4f52d9;--accent-soft:rgba(99,102,241,.14);
  --in:#fff;--in-text:#1d1b20;--out:linear-gradient(135deg,#6e71f4,#5457e6);--out-end:#5457e6;--in-sh:0 1px 2px rgba(0,0,0,.16);
  --glass:#f1ecf4;--glass-strong:#ece6f0;--glass-sh:0 1px 3px rgba(0,0,0,.18);
  --daypill:rgba(29,27,32,.5);--daytext:#fff;--sheet:#fffbfe;--ok:#6366f1;
  --wall:var(--doodle) 0 0/300px 300px,linear-gradient(180deg,#f1ecfb,#e6e0f6);
}
html.md.ios[data-theme=dark]{
  --bg:#141218;--bg-g:#141218;--panel:#1d1b20;--panel-g:#211f26;--panel2:#2b2930;--panel3:#36343b;--line:rgba(255,255,255,.09);
  --text:#e6e0e9;--text2:#cac4d0;--text3:#938f99;--atext:#b9bbff;--accent-soft:rgba(140,143,255,.2);
  --in:#2b2930;--in-text:#e6e0e9;--out:linear-gradient(135deg,#5b5ee9,#4548cf);--out-end:#4548cf;--in-sh:none;
  --glass:#211f26;--glass-strong:#2b2930;--glass-sh:0 1px 3px rgba(0,0,0,.5);
  --daypill:rgba(20,18,24,.7);--daytext:#e6e0e9;--sheet:#1d1b20;
  --wall:var(--doodle) 0 0/300px 300px,linear-gradient(180deg,#0e0c13,#16131d);
}
@media (prefers-color-scheme:dark){
  html.md.ios[data-theme=auto]{
    --bg:#141218;--bg-g:#141218;--panel:#1d1b20;--panel-g:#211f26;--panel2:#2b2930;--panel3:#36343b;--line:rgba(255,255,255,.09);
    --text:#e6e0e9;--text2:#cac4d0;--text3:#938f99;--atext:#b9bbff;--accent-soft:rgba(140,143,255,.2);
    --in:#2b2930;--in-text:#e6e0e9;--out:linear-gradient(135deg,#5b5ee9,#4548cf);--out-end:#4548cf;--in-sh:none;
    --glass:#211f26;--glass-strong:#2b2930;--glass-sh:0 1px 3px rgba(0,0,0,.5);
    --daypill:rgba(20,18,24,.7);--daytext:#e6e0e9;--sheet:#1d1b20;
    --wall:var(--doodle) 0 0/300px 300px,linear-gradient(180deg,#0e0c13,#16131d);
  }
}
html.md.ios{--ease:cubic-bezier(.2,0,0,1);--spring:cubic-bezier(.2,0,0,1)}
html.md.ios body{font-family:Roboto,"Google Sans",system-ui,-apple-system,sans-serif;letter-spacing:0}

/* без стекла — плотные тональные поверхности */
html.md.ios .gl,html.md.ios .pinbar,html.md.ios #pinbar.pinbar,html.md.ios .ctx,html.md.ios .selbar,html.md.ios .blocked,html.md.ios .todown,html.md.ios .picker,html.md.ios .toast,html.md.ios #sbar,html.md.ios .sbar{-webkit-backdrop-filter:none;backdrop-filter:none}
html.md.ios .ios-head,html.md.ios .chat-top{background:var(--panel-g)}
html.md.ios .ios-head::before,html.md.ios .ios-head::after,html.md.ios .chat-top::before,html.md.ios .chat-top::after{display:none}
html.md.ios .ios-head{padding-bottom:6px;min-height:calc(var(--sat) + 64px)}
html.md.ios .ios-head .gl,html.md.ios .chat-top .back,html.md.ios .info-hd .gl{background:none;box-shadow:none}
html.md.ios .htitle{left:20px;right:130px;text-align:left;font-size:24px;font-weight:500}
html.md.ios .shell:not(.editing):not(.searching) .ios-head .gtxt{display:none}
html.md.ios .sfield{border-radius:28px;background:var(--panel2);box-shadow:none}
html.md.ios .gtxt{background:none;box-shadow:none;color:var(--atext)}

/* список */
html.md.ios .row{min-height:76px}
html.md.ios .row .mid{border-bottom:0}
html.md.ios .row:active{background:var(--accent-soft)}
html.md.ios .row .name{font-size:16.5px;font-weight:500}
html.md.ios .badge{background:var(--accent);border-radius:12px}
html.md.ios .tab{border:1px solid var(--line);border-radius:10px;height:32px;font-size:14px}
html.md.ios .tab.on{background:var(--accent-soft);border-color:transparent;color:var(--text)}
html.md.ios .av{border-radius:50%}
html.md.ios .ring{background:linear-gradient(135deg,#6366f1,#ec4899)}

/* нижняя навигация M3 с пилюлей-индикатором */
html.md.ios .ios-tabbar{padding:0}
html.md.ios .tb-pill{border-radius:0;height:calc(76px + var(--sab));padding:10px 6px var(--sab);background:var(--panel-g);box-shadow:0 -1px 0 var(--line);gap:0;align-items:flex-start}
html.md.ios .tb-search{display:none}
html.md.ios .tb{background:none!important;color:var(--text2);gap:4px;border-radius:0;justify-content:flex-start;height:56px}
html.md.ios .tb.on{color:var(--text)}
html.md.ios .tbi{width:64px;height:32px;border-radius:16px;transition:background .25s,width .25s}
html.md.ios .tb.on .tbi{background:var(--accent-soft);color:var(--atext)}
html.md.ios .tbl{font-size:12px;font-weight:500}
html.md.ios .tbn{top:-3px;margin-left:8px;background:#e5484d}
html.md.ios .ios-edit{left:0;right:0;bottom:0;border-radius:0;height:calc(72px + var(--sab));padding-bottom:var(--sab);background:var(--panel-g);box-shadow:0 -1px 0 var(--line)}

/* шапка чата: плоская app bar */
html.md.ios .chat-top{grid-template-columns:auto auto 1fr;gap:4px;padding-bottom:8px;box-shadow:0 1px 4px rgba(0,0,0,.22)}
html.md.ios .chat-top .back{order:1;min-width:40px;padding:0 8px 0 6px}
html.md.ios .chat-top .avb{order:2;width:42px;height:42px;justify-self:start}
html.md.ios .chat-top .who{order:3;justify-self:start;max-width:none;height:auto;background:none;box-shadow:none;align-items:flex-start;text-align:left;padding:0 6px}
html.md.ios .chat-top .nm{justify-content:flex-start;font-size:17px;font-weight:500}
html.md.ios .bkn{display:none}
html.md.ios .pinbar,html.md.ios #pinbar.pinbar{top:calc(var(--sat) + 70px);border-radius:16px;min-height:48px;background:var(--panel-g);box-shadow:0 2px 8px rgba(0,0,0,.25)}
html.md.ios .day{border-radius:10px;font-weight:500}

/* пузыри: Material-форма, без «хвостиков» */
html.md.ios .bub{border-radius:20px;box-shadow:var(--in-sh)}
html.md.ios .m.out .bub{box-shadow:0 2px 8px rgba(84,87,230,.35)}
html.md.ios .bub::after{display:none!important}
html.md.ios .m:not(.out):not(:has(+.m:not(.out))) .bub{border-bottom-left-radius:6px}
html.md.ios .m.out:not(:has(+.m.out)) .bub{border-bottom-right-radius:6px}
html.md.ios .react{border-radius:10px}
html.md.ios .m.out .react.mine{color:#4f52d9}

/* ввод: тональное поле + «сквиркл»-кнопки */
html.md.ios .comp .pill{border-radius:26px;background:var(--panel2);box-shadow:none}
html.md.ios .comp .cbtn.att{background:none;box-shadow:none;color:var(--text2)}
html.md.ios .comp .mic,html.md.ios .comp .send{border-radius:18px;background:var(--accent);color:#fff;box-shadow:0 3px 10px rgba(99,102,241,.45)}
html.md.ios .comp .mic{box-shadow:0 3px 10px rgba(99,102,241,.45)}
html.md.ios .ctx{border-radius:16px;background:var(--panel2);box-shadow:none}
html.md.ios .todown{border-radius:16px;background:var(--panel-g);box-shadow:0 2px 8px rgba(0,0,0,.3)}

/* меню, листы, кнопки */
html.md.ios .menu{border-radius:20px;padding:8px 0;background:var(--glass-strong);box-shadow:0 6px 20px rgba(0,0,0,.35)}
html.md.ios .mi{height:48px;border-radius:0;padding:0 18px}
html.md.ios .menu-react{border-radius:26px}
html.md.ios .menu-scrim{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(0,0,0,.45)}
html.md.ios .modal{border-radius:28px 28px 0 0;background:var(--sheet)}
html.md.ios .btn{height:48px;border-radius:24px}
html.md.ios .field{border-radius:14px;border-bottom:2px solid var(--text3);border-radius:14px 14px 4px 4px;background:var(--panel2)}
html.md.ios .field:focus{box-shadow:none;border-bottom-color:var(--accent)}
html.md.ios .chip{border-radius:10px;border:1px solid var(--line);background:none}
html.md.ios .chip.on{background:var(--accent-soft);color:var(--text);border-color:transparent}
html.md.ios .toast{top:auto;bottom:calc(var(--sab) + 96px);left:16px;right:16px;transform:none;max-width:none;border-radius:12px;background:#322f35;color:#f5eff7;box-shadow:0 4px 14px rgba(0,0,0,.4);text-align:left;animation:snack-in .3s var(--ease)}
html.md.ios .toast.out{transform:none;opacity:0}
@keyframes snack-in{from{opacity:0;transform:translateY(16px)}}

/* переключатель Material 3 */
html.md.ios .sw{width:52px;height:32px;border-radius:16px;background:var(--panel3);box-shadow:inset 0 0 0 2px var(--text3)}
html.md.ios .sw::after{top:8px;left:8px;width:16px;height:16px;background:var(--text3);box-shadow:none;transition:all .25s var(--ease)}
html.md.ios .sw.on{background:var(--accent);box-shadow:none}
html.md.ios .sw.on::after{top:4px;left:4px;width:24px;height:24px;background:#fff;transform:translateX(20px)}

/* настройки и профиль */
html.md.ios .snav .se{border-radius:50%;width:36px;height:36px}
html.md.ios .snav,html.md.ios .spage .card,html.md.ios .info .card{border-radius:24px}
html.md.ios .sn::before{display:none}
html.md.ios .atile{border-radius:18px;background:var(--panel2)}
html.md.ios .mtbar,html.md.ios .mt{border-radius:12px}
html.md.ios .sback,html.md.ios .stitle{background:var(--panel2);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
html.md.ios .sfield input,html.md.ios .comp textarea{caret-color:var(--accent)}

/* ───────── Android: голосовые, подарки, запись ───────── */
html.md.ios .vplay{border-radius:50%}
html.md.ios .m.out .vplay{background:#fff;color:#4f52d9}
html.md.ios .m:not(.out) .vplay{background:var(--accent)}
html.md.ios .recov{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--panel2);box-shadow:none;border-radius:26px}
html.md.ios .comp .mic.hot{border-radius:22px;box-shadow:0 0 0 10px rgba(99,102,241,.25)}
html.md.ios .gcard{-webkit-backdrop-filter:none;backdrop-filter:none;border-radius:28px;background:var(--panel2);box-shadow:none}
html.md.ios .gcard.prem{background:radial-gradient(120% 70% at 50% 0%,rgba(110,113,244,.4),transparent 70%),var(--panel2)}
html.md.ios .gbtn{background:var(--accent-soft);color:var(--atext);box-shadow:none;border-radius:20px}
html.md.ios .gcell.gtile{border-radius:16px}
html.md.ios .pcard{border-radius:16px}

/* Android: настройки */
html.md.ios .sgrp{border-radius:26px;box-shadow:none;background:var(--panel2)}
html.md.ios .sq{border-radius:22px;background:var(--panel2);box-shadow:none}
html.md.ios .sqi,html.md.ios .sn .se{border-radius:50%;box-shadow:none}
html.md.ios .ssearch{border-radius:26px;background-color:var(--panel2);box-shadow:none}
html.md.ios .spage .btn{background:var(--accent);box-shadow:none}
html.md.ios .spage .sect{color:var(--atext)}
