/* знакомство при первом заходе (onboard.js): RusMind пишет сообщениями; текст крупный — от 17px */
html.ob-open,html.ob-open body{overflow:hidden}
.obgate{position:fixed;inset:0;z-index:310;display:grid;place-items:center;padding:16px;
  background:linear-gradient(160deg,rgba(236,241,255,.9),rgba(246,243,255,.9));-webkit-backdrop-filter:blur(22px) saturate(160%);backdrop-filter:blur(22px) saturate(160%);
  animation:lgIn .45s var(--ease)}
.obgate.out{animation:lgOut .42s var(--ease) forwards}
.ob-card{position:relative;display:flex;flex-direction:column;width:min(560px,100%);height:min(700px,calc(100dvh - 32px));border-radius:30px;overflow:hidden;
  background:linear-gradient(170deg,rgba(255,255,255,.86),rgba(255,255,255,.66));border:1px solid rgba(255,255,255,.95);
  box-shadow:0 30px 70px -36px rgba(22,44,140,.55),inset 0 1px 0 #fff;-webkit-backdrop-filter:blur(26px) saturate(170%);backdrop-filter:blur(26px) saturate(170%);
  animation:lgCard .6s var(--ease)}
.ob-head{display:flex;align-items:center;gap:12px;padding:14px 14px 12px 18px;border-bottom:1px solid var(--line)}
.ob-head b{font-size:18px;font-weight:700;letter-spacing:-.01em}
.ob-av{width:42px;height:42px;flex:none;border-radius:50%;display:grid;place-items:center;background:#fff;box-shadow:0 0 0 1px rgba(32,72,240,.1),0 6px 14px -8px rgba(32,72,240,.5)}
.ob-av img{width:27px}
.ob-skip{margin-inline-start:auto;height:44px;padding:0 16px;border-radius:999px;font-size:17px;font-weight:600;color:var(--ink-2);transition:background .2s,color .2s}
.ob-skip:hover{background:rgba(32,72,240,.07);color:var(--blue)}

.ob-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:20px 18px 12px;scrollbar-width:thin}
.ob-msg{display:flex;max-width:88%}
.ob-msg.bot{align-self:flex-start}
.ob-msg.user{align-self:flex-end}
.ob-bubble{padding:12px 18px;font-size:18px;line-height:1.5;border-radius:22px;word-wrap:break-word;overflow-wrap:anywhere}
.ob-msg.bot .ob-bubble{background:#fff;color:var(--ink);border-end-start-radius:8px;box-shadow:0 0 0 1px rgba(32,72,240,.08),0 8px 20px -16px rgba(22,44,140,.5);
  transform-origin:0 100%;animation:obIn .38s var(--ease) both}
[dir="rtl"] .ob-msg.bot .ob-bubble{transform-origin:100% 100%}
.ob-msg.bot.in .ob-bubble{animation:obText .32s var(--ease) both}
.ob-msg.user .ob-bubble{color:var(--ink);border-end-end-radius:8px;
  background:linear-gradient(180deg,rgba(236,242,255,.98),rgba(219,229,255,.95));border:1px solid rgba(255,255,255,.9);box-shadow:0 8px 20px -14px rgba(32,72,240,.5);
  transform-origin:100% 100%;animation:obIn .34s var(--ease) both}
.ob-msg.user .ob-bubble.muted{color:var(--ink-2);font-style:italic}
.ob-typing{padding:8px 18px}
@keyframes obIn{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
@keyframes obText{from{opacity:.35}to{opacity:1}}

.ob-ans{padding:0 16px;max-height:0;opacity:0;transition:max-height .35s var(--ease),opacity .25s,padding .35s var(--ease)}
.ob-ans.show{max-height:340px;opacity:1;padding:12px 16px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.ob-choices{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.ob-choices.stack{flex-direction:column;align-items:stretch}
.ob-choice{min-height:54px;padding:12px 22px;border-radius:999px;font-size:17px;font-weight:600;line-height:1.3;color:var(--blue);text-align:center;
  background:#fff;border:1.5px solid rgba(32,72,240,.22);box-shadow:0 6px 16px -12px rgba(22,44,140,.5);transition:transform .2s var(--ease),border-color .2s,background .2s,box-shadow .2s}
.ob-choices.stack .ob-choice{border-radius:20px}
.ob-choice:hover{border-color:var(--blue);box-shadow:0 0 0 4px rgba(32,72,240,.1)}
.ob-choice:active{transform:scale(.98)}
.ob-choices.stack .ob-choice:first-child{color:#fff;border-color:transparent;background:linear-gradient(180deg,#4F70FF,#2048F0)}
.ob-name{display:flex;gap:10px}
.ob-input{flex:1;min-width:0;height:56px;padding:0 20px;border-radius:999px;font-size:18px;color:var(--ink);background:#fff;
  border:1.5px solid rgba(32,72,240,.2);outline:none;transition:border-color .2s,box-shadow .2s}
.ob-input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(32,72,240,.12)}
.ob-send{width:56px;height:56px;flex:none;border-radius:50%;display:grid;place-items:center;color:#fff;background:linear-gradient(180deg,#4F70FF,#2048F0);
  box-shadow:0 10px 22px -12px rgba(32,72,240,.7);transition:transform .2s var(--ease),opacity .2s}
.ob-send .ic{width:24px;height:24px;stroke-width:2.2}
.ob-send:disabled{opacity:.4;cursor:default;box-shadow:none}
.ob-send:not(:disabled):active{transform:scale(.94)}
.ob-link{display:block;margin:8px auto 0;min-height:44px;padding:0 14px;border-radius:999px;font-size:17px;font-weight:600;color:var(--ink-2)}
.ob-link:hover{color:var(--blue);background:rgba(32,72,240,.06)}

/* настройки: имя и обращение */
.ob-set-name{width:220px;max-width:46%;height:40px;padding:0 14px;border-radius:12px;border:1px solid rgba(32,72,240,.15);background:#fff;font-size:14px;font-weight:600}
.ob-set-name:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(32,72,240,.12)}

@media (max-width:600px){
  .obgate{padding:0;place-items:stretch}
  .ob-card{width:100%;height:100dvh;border-radius:0;border:0}
  .ob-head{padding-top:calc(12px + env(safe-area-inset-top))}
  .ob-msg{max-width:92%}
}
@media (prefers-reduced-motion:reduce){ .obgate,.ob-card,.ob-bubble{animation:none!important} .ob-ans{transition:none} }
/* примеры мемов в вопросе «показывать мемы, пока я думаю?» (memes.js) */
.ob-memes{display:flex;align-items:flex-end;gap:10px;margin-top:10px;height:64px}
.ob-memes .mm-img{width:auto;height:100%;max-width:96px}
.ob-memes .mm-img,:root[data-theme="dark"] .ob-memes .mm-img{filter:none}   /* окно знакомства всегда светлое — линии не инвертируем */
