/* My Mini Cat - Cat Chat (#chat) */
.chat-card { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.chat-card h2 { margin: 0; text-align: center; }
.chat-sub { margin: -6px 0 0; text-align: center; color: var(--ink-soft); font-size: 18px; }
.chat-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.chat-cat { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 24px; transition: transform .2s, background .2s; font: inherit; }
.chat-cat img { width: clamp(84px, 22vw, 128px); height: auto; filter: drop-shadow(0 6px 10px rgba(170,100,160,.25)); transition: transform .2s; }
.chat-cat.on { background: rgba(255,255,255,.7); box-shadow: var(--shadow); }
.chat-cat.on img { transform: scale(1.06); }
.chat-cat:not(.on) img { opacity: .72; }
.chat-cat.talking img { animation: chatBob .45s ease-in-out infinite alternate; }
@keyframes chatBob { from { transform: translateY(0) rotate(-2deg) scale(1.06); } to { transform: translateY(-8px) rotate(2deg) scale(1.08); } }
.chat-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chat-modes { display: flex; gap: 6px; background: rgba(255,255,255,.7); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); flex-wrap: wrap; justify-content: center; }
.chat-modes button { border: 0; border-radius: 999px; padding: 8px 14px; font: 700 17px var(--font); color: var(--ink); background: transparent; cursor: pointer; min-height: 44px; }
.chat-modes button[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, var(--lilac), var(--pink)); }
.chat-modes button[data-mode="fuzz"][aria-pressed="true"] { background: linear-gradient(135deg, var(--fuzz), var(--fuzz-2)); }
.chat-modes button[data-mode="cola"][aria-pressed="true"] { background: linear-gradient(135deg, var(--cola), var(--cola-2)); }
.chat-turn { font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.chat-log { min-height: 240px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: rgba(255,255,255,.55); border-radius: 22px; scroll-behavior: smooth; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row.kid { justify-content: flex-end; }
.chat-av { width: 46px; height: 46px; object-fit: contain; flex: none; }
.chat-b { position: relative; max-width: 78%; padding: 10px 16px; border-radius: 22px; font-size: 21px; line-height: 1.35; box-shadow: 0 3px 10px rgba(170,100,160,.15); background: #fff; color: var(--ink); }
.chat-row.kid .chat-b { background: linear-gradient(135deg, #FFE0EC, #FFD6E6); border-bottom-right-radius: 6px; }
.chat-row.fuzz .chat-b { background: linear-gradient(135deg, #FFF1E2, #FFE3C8); border-bottom-left-radius: 6px; }
.chat-row.cola .chat-b { background: linear-gradient(135deg, #E6FAFB, #D3F2F8); border-bottom-left-radius: 6px; }
.chat-row.wait .chat-b, .chat-row.note .chat-b { background: transparent; box-shadow: none; color: var(--ink-soft); font-size: 18px; font-style: italic; }
.chat-row.wait .chat-b::after { content: ' 🐾'; animation: chatPaw 1s steps(2) infinite; }
@keyframes chatPaw { 50% { opacity: .2; } }
.chat-name { display: block; font-size: 15px; color: var(--ink-soft); }
.chat-say { border: 0; background: none; cursor: pointer; font-size: 20px; padding: 0 0 0 6px; vertical-align: middle; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-chip { border: 0; border-radius: 999px; padding: 8px 16px; font: 600 17px var(--font); background: #fff; color: var(--ink); box-shadow: 0 3px 8px rgba(170,100,160,.15); cursor: pointer; min-height: 44px; }
.chat-form { display: flex; align-items: center; gap: 10px; }
.chat-mic { flex: none; width: 88px; height: 88px; border-radius: 50%; border: 0; font-size: 42px; cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--coral), var(--orange)); box-shadow: var(--shadow), inset 0 -6px 0 rgba(0,0,0,.12); }
.chat-mic.on { animation: chatPulse 1s ease-in-out infinite; background: linear-gradient(135deg, #FF5A7A, #FF9A4C); }
@keyframes chatPulse { 50% { transform: scale(1.1); box-shadow: 0 0 0 12px rgba(255,122,138,.25); } }
.chat-input { flex: 1; min-width: 0; font: 600 21px var(--font); padding: 16px 18px; border-radius: 999px; border: 3px solid #F3D3E6; background: #fff; color: var(--ink); }
.chat-input:focus { outline: none; border-color: var(--lilac); }
.chat-send { flex: none; width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 28px; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--sky), var(--lilac)); box-shadow: var(--shadow); }
.busy .chat-send, .busy .chat-mic { opacity: .6; pointer-events: none; }
.chat-tools { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.chat-tools button { border: 0; border-radius: 999px; padding: 8px 16px; font: 600 16px var(--font); background: rgba(255,255,255,.8); color: var(--ink); cursor: pointer; min-height: 44px; }
.chat-parents { font-size: 15px; color: var(--ink-soft); background: rgba(255,255,255,.6); border-radius: 18px; padding: 8px 14px; }
.chat-parents summary { cursor: pointer; font-weight: 700; }
.chat-parents p { margin: 8px 0 2px; line-height: 1.45; }
[dir="rtl"] .chat-row.kid .chat-b { border-bottom-right-radius: 22px; border-bottom-left-radius: 6px; }
[dir="rtl"] .chat-row.fuzz .chat-b, [dir="rtl"] .chat-row.cola .chat-b { border-bottom-left-radius: 22px; border-bottom-right-radius: 6px; }
[dir="rtl"] .chat-send { transform: scaleX(-1); }
@media (max-width: 520px) { .chat-mic { width: 74px; height: 74px; font-size: 36px; } .chat-b { font-size: 19px; } .chat-modes button { font-size: 15px; padding: 7px 10px; } }
@media (prefers-reduced-motion: reduce) { .chat-cat.talking img, .chat-mic.on, .chat-row.wait .chat-b::after { animation: none; } }
.chatbtn-b { background: linear-gradient(135deg, var(--pink), var(--lilac)); }
