/* MIKENA Chat v0.1: all selectors are isolated under mc- prefix. */
.mc-chat[hidden], .mc-chips[hidden] { display: none !important; }
.mc-chat, .mc-chat *, .mc-chat *::before, .mc-chat *::after { box-sizing: border-box; }
.mc-launch-character, .mc-launch-bubble { cursor: pointer !important; pointer-events: auto !important; }
.mc-launch-character:focus-visible, .mc-launch-bubble:focus-visible { outline: 3px solid #b88c59; outline-offset: 5px; border-radius: 18px; }
.mc-chat { position: fixed; z-index: 99990; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); width: min(390px, calc(100vw - 28px)); height: min(600px, calc(100dvh - 44px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e4dad1; border-radius: 22px; background: #fdfbf8; color: #2a2927; box-shadow: 0 18px 65px rgba(57,43,36,.19); font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif; font-size: 14px; line-height: 1.65; }
.mc-head { display: flex; align-items: center; justify-content: space-between; min-height: 80px; padding: 15px 16px; border-bottom: 1px solid #ede7e1; background: #f7f2ed; }
.mc-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mc-avatar { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border: 1px solid #e3cabb; border-radius: 50%; background: #ede1d7; color: #3c3530; font-size: 24px; font-family: Georgia, serif; }
.mc-brandnames { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.mc-brandnames strong { font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.mc-brandnames small { font-size: 11px; color: #6b625d; }
.mc-close { appearance: none; cursor: pointer; border: none; background: transparent; border-radius: 50%; width: 40px; height: 40px; font-size: 25px; color: #48413d; }
.mc-close:hover, .mc-close:focus-visible { background: #e9ded5; }
.mc-log { display: flex; flex: 1; flex-direction: column; gap: 17px; overflow-y: auto; overscroll-behavior: contain; padding: 22px 16px; }
.mc-line { display: flex; flex-direction: column; max-width: 92%; gap: 5px; align-items: flex-start; }
.mc-line.mc-user { align-self: flex-end; align-items: flex-end; }
.mc-message { background: #f1ebe6; padding: 11px 13px; border: 1px solid #efe6df; border-radius: 14px 14px 14px 3px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.mc-user .mc-message { background: #292825; border-color: #292825; color: #fff; border-radius: 14px 14px 3px 14px; }
.mc-source { color: #736a61; font-size: 10px; padding: 0 4px; }
.mc-links { display: flex; flex-direction: column; gap: 5px; padding: 0 2px; }
.mc-links a { font-size: 12px; font-weight: 600; color: #665035; text-decoration: underline; text-underline-offset: 3px; }
.mc-links a:hover { color: #30261e; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 14px 3px; border-top: 1px solid #efe9e3; }
.mc-chip { cursor: pointer; appearance: none; border: 1px solid #dfd2c7; padding: 6px 10px; border-radius: 999px; background: #fffdfb; font: inherit; font-size: 11px; color: #4f463f; }
.mc-chip:hover { background: #eee4d9; }
.mc-form { display: flex; gap: 9px; align-items: center; padding: 12px 14px 7px; margin: 0; }
.mc-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid #ded4cb; border-radius: 999px; outline: none; background: #fff; color: #292825; font: inherit; font-size: 13px; }
.mc-input:focus { border-color: #a7815e; box-shadow: 0 0 0 2px #dcc8b766; }
.mc-send { appearance: none; cursor: pointer; height: 42px; width: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: #292825; color: #fff; font-size: 17px; }
.mc-send:disabled { opacity: .45; cursor: wait; }
.mc-privacy { flex-shrink: 0; color: #756f6a; font-size: 10px; line-height: 1.55; padding: 2px 17px 14px; margin: 0; }
.mc-floating-launcher { position: fixed; z-index: 99980; right: 22px; bottom: 20px; border: 0; padding: 11px 18px; border-radius: 999px; background: #2b2927; color: white; cursor: pointer; box-shadow: 0 5px 24px #0002; }
@media (max-width: 600px) {
 .mc-chat { right: 0; bottom: 0; width: 100vw; height: min(100dvh, 760px); max-height: 100dvh; border-radius: 19px 19px 0 0; padding-bottom: env(safe-area-inset-bottom); }
 .mc-head { min-height: 70px; }
 .mc-log { padding-top: 18px; }
}
@media (prefers-reduced-motion: no-preference) { .mc-chat:not([hidden]) { animation: mc-enter 140ms ease-out; } @keyframes mc-enter { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } }
