/* Чат-диалог: мессенджер */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 128px); min-height: 520px; background: var(--white); border: var(--bd); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: var(--bd); background: var(--lilac-l); flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 150px; }
.who-n { font: 800 18px/1.1 var(--f-h); outline: none; }
.who > div { min-width: 0; }
.who small { color: var(--ink-2); font-weight: 600; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-tools { display: flex; gap: 8px; }
.chip-b { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; background: var(--white); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); font-weight: 700; font-size: 15px; transition: transform .08s, box-shadow .08s; }
.chip-b .ic { width: 20px; height: 20px; }
.chip-b:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.chip-b[aria-pressed=true] { background: var(--lemon); }
.chip-b:disabled { opacity: .5; cursor: not-allowed; }
.chat .steps { flex: none; padding: 12px 16px 0; background: var(--cream); }
.feed { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--cream); overscroll-behavior: contain; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; animation: pop .22s ease-out; }
.msg.him { align-self: flex-start; } .msg.me { align-self: flex-end; justify-content: flex-end; }
.msg.note { align-self: stretch; max-width: 100%; display: block; border: 0; background: none; padding: 0; }
.bub { padding: 11px 16px; border: 3px solid var(--ink); background: var(--white); box-shadow: 0 3px 0 var(--ink); font-size: 18px; }
.him .bub { border-radius: 22px 22px 22px 6px; }
.me .bub { border-radius: 22px 22px 6px 22px; background: var(--lilac); font-weight: 600; }
.me.ok .bub { background: var(--mint); } .me.bad .bub { background: var(--tomato-l); animation: shake .4s; }
.bub .en { font-weight: 600; }
.bub .ru { display: none; margin-top: 6px; padding-top: 6px; border-top: 2px dashed var(--ink-2); color: var(--ink-2); font-size: 15px; }
.bub .ru.on { display: block; }
.tr-b { display: inline-block; margin-top: 4px; min-height: 28px; padding: 0; background: none; border: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.typing { display: flex; gap: 5px; padding: 15px 18px; }
.typing i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .4; } }

.note { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 10px; border: 3px solid var(--ink); border-radius: 22px; font-weight: 600; font-size: 16px; line-height: 1.4; }
.note.ok { background: var(--mint-l); } .note.bad { background: var(--tomato-l); }
.note b { font-weight: 800; } .note .mascot { width: 64px; }
.note .mascot { animation: pop .35s ease-out; }

.opts { flex: none; padding: 14px 16px 16px; border-top: var(--bd); background: var(--white); display: flex; flex-direction: column; gap: 10px; max-height: 52%; overflow-y: auto; }
.opts:empty { display: none; }
.opts-h { font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 16px 10px 10px; text-align: left; background: var(--white); border: var(--bd); border-radius: 20px; box-shadow: var(--sh); font: 600 18px/1.3 var(--f-t); transition: transform .08s, box-shadow .08s, background .15s; }
.opt:hover:not(:disabled) { background: var(--lemon-l); }
.opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 var(--ink); }
.ob { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--lemon); border: 2.5px solid var(--ink); border-radius: 12px; font: 800 17px var(--f-h); }
.opt:disabled { cursor: default; color: var(--ink); }
.opt:disabled:not(.right):not(.wrong) { display: none; }
.opt.right { background: var(--mint); }
.opt.right .ob { background: var(--white); }
.opt.wrong { background: var(--tomato-l); animation: shake .4s; }
.opt.hinted { background: var(--mint-l); }
.opt.hinted .ob { background: var(--mint); }
.next-b { align-self: stretch; }

.finish { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--white); border: var(--bd); border-radius: 26px; padding: 22px 18px; box-shadow: var(--sh); width: 100%; }
.fin-m { margin-bottom: -6px; }
.fin-stars { display: flex; gap: 6px; } .fin-stars .star { width: 46px; height: 46px; }
.fin-h { font: 800 26px/1.15 var(--f-h); }
.fin-p { font-weight: 600; color: var(--ink-2); } .fin-p b { color: var(--ink); }
.fin-r { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fin-r span { padding: 6px 16px; background: var(--lemon); border: 3px solid var(--ink); border-radius: 999px; font-weight: 800; }
.fin-b { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.rev-h { font: 800 18px var(--f-h); margin-top: 8px; align-self: flex-start; }
.rev { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.rev li { padding: 12px 14px; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 18px; display: flex; flex-direction: column; gap: 4px; }
.rv-q { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.rv-bad, .rv-ok { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; }
.rv-bad { color: #B02A12; text-decoration: line-through; text-decoration-thickness: 2px; }
.rv-bad .ic, .rv-ok .ic { width: 20px; height: 20px; margin-top: 3px; }
.rv-ok .ic { color: #0E8F63; }
.rv-ok .mk { align-self: flex-start; }
.rv-w { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.rev-none { font-weight: 700; padding: 10px 14px; background: var(--mint-l); border: 2.5px solid var(--ink); border-radius: 16px; }

@media (max-width: 700px) {
  .chat { height: calc(100dvh - 78px); min-height: 480px; border-radius: 24px; }
  .chat-h { flex-wrap: nowrap; gap: 8px; padding: 10px; } .who { min-width: 0; } .who small { font-size: 12px; } .who-n { font-size: 16px; }
  .chip-b { padding: 6px 10px; } .chip-b .hl { display: none; }
  .msg { max-width: 94%; } .bub { font-size: 17px; }
  .opt { font-size: 17px; }
  .opts { max-height: 50%; padding: 12px; } .opt { min-height: 54px; }
}
