/* Miita – website chat widget. Scoped under .mc so it never touches the host theme. */
.mc { --mc-brand: #6D5DFB; --mc-brand-600: #5A4AE8; --mc-navy: #172554; --mc-ink: #0F172A; --mc-mute: #64748B; --mc-line: #E6E8F1; --mc-bg: #F7F8FC; --mc-surface: #fff;
	font: 14px/1.5 "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--mc-ink); }
.mc *, .mc *::before, .mc *::after { box-sizing: border-box; }
.mc [hidden] { display: none !important; }
.mc button { font: inherit; cursor: pointer; }
.mc-ico { display: inline-grid; place-items: center; line-height: 0; }

.mc--float { position: fixed; right: 20px; bottom: 20px; z-index: 99990; }
.mc-launch { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--mc-brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px -8px rgba(76, 61, 220, .65); transition: transform .15s, background .15s; margin-left: auto; }
.mc-launch:hover { background: var(--mc-brand-600); transform: translateY(-1px); }
.mc-launch.is-open { background: var(--mc-navy); }
.mc-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #DC2626; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }

.mc-panel { display: flex; flex-direction: column; background: var(--mc-surface); border: 1px solid var(--mc-line); border-radius: 18px; overflow: hidden; }
.mc--float .mc-panel { position: absolute; right: 0; bottom: 72px; width: 370px; height: min(580px, calc(100vh - 110px)); box-shadow: 0 24px 60px -16px rgba(15, 23, 42, .35); animation: mc-in .18s ease-out; }
.mc--inline .mc-panel { height: 560px; max-width: 520px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
@keyframes mc-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.mc-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: var(--mc-navy); color: #fff; }
.mc-head__mark, .mc-hello__mark { width: 38px; height: 38px; border-radius: 12px; background: var(--mc-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.mc-head__text { flex: 1; min-width: 0; }
.mc-head__text strong { display: block; font-size: 15px; }
.mc-sub { font-size: 12px; color: #c7d0ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #c7d0ea; display: grid; place-items: center; }
.mc-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.mc-scroll { flex: 1; overflow-y: auto; background: var(--mc-bg); overscroll-behavior: contain; }
.mc-list { display: flex; flex-direction: column; gap: 2px; padding: 16px 14px; }
.mc-hello { text-align: center; padding: 28px 16px; color: var(--mc-mute); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mc-hello strong { color: var(--mc-ink); font-size: 16px; margin-top: 6px; }
.mc-hello p { margin: 0; font-size: 13px; }
.mc-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; margin-top: 4px; }
.mc-msg.is-me { align-self: flex-end; align-items: flex-end; }
.mc-msg__name { font-size: 11.5px; color: var(--mc-mute); font-weight: 600; margin: 6px 0 3px 4px; }
.mc-bubble { background: #fff; border: 1px solid var(--mc-line); border-radius: 16px 16px 16px 6px; padding: 8px 12px; overflow-wrap: anywhere; }
.mc-msg.is-me .mc-bubble { background: var(--mc-brand); border-color: transparent; color: #fff; border-radius: 16px 16px 6px 16px; }
.mc-msg.is-pending .mc-bubble { opacity: .7; }
.mc-msg.is-failed .mc-bubble { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.mc-text { white-space: pre-wrap; }
.mc-meta { font-size: 10.5px; color: var(--mc-mute); margin: 2px 4px 0; }
.mc-img { display: block; margin: 0 -6px 6px; border-radius: 12px; overflow: hidden; max-width: 240px; }
.mc-img img { display: block; max-width: 100%; max-height: 220px; object-fit: cover; }
.mc-file { display: flex; align-items: center; gap: 6px; color: inherit; font-weight: 600; font-size: 13px; text-decoration: none; padding: 4px 0; }
.mc-note { align-self: center; text-align: center; font-size: 12px; color: var(--mc-mute); background: #fff; border: 1px solid var(--mc-line); border-radius: 10px; padding: 8px 12px; margin: 12px 0 4px; max-width: 90%; }

.mc-err { background: #FEF2F2; color: #991B1B; font-size: 12.5px; padding: 8px 14px; border-top: 1px solid #FECACA; }
.mc-form { border-top: 1px solid var(--mc-line); padding: 10px; background: #fff; }
.mc-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mc-intro p { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--mc-mute); }
.mc-intro input, .mc-compose textarea { width: 100%; border: 1px solid #D8DCE8; border-radius: 10px; background: #fff; color: var(--mc-ink); font: inherit; outline: none; margin: 0; }
.mc-intro input { height: 38px; padding: 0 10px; font-size: 13.5px; }
.mc-intro input:focus, .mc-compose:focus-within { border-color: var(--mc-brand); box-shadow: 0 0 0 3px #E3DEFF; }
.mc-compose { display: flex; align-items: flex-end; gap: 6px; border: 1px solid #D8DCE8; border-radius: 14px; padding: 4px; }
.mc-compose textarea { border: 0; resize: none; padding: 8px 8px; min-height: 38px; max-height: 120px; line-height: 1.45; box-shadow: none !important; }
.mc-send { width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--mc-brand); color: #fff; display: grid; place-items: center; flex: none; }
.mc-send:disabled { opacity: .35; cursor: default; }
.mc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mc-foot { text-align: center; font-size: 11px; color: var(--mc-mute); padding: 0 10px 10px; background: #fff; }

@media (max-width: 480px) {
	.mc--float { right: 14px; bottom: 14px; }
	.mc--float .mc-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; border: 0; bottom: 0; }
	.mc--float .mc-launch.is-open { display: none; }
	.mc-intro { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mc *, .mc-panel { animation: none !important; transition: none !important; } }
.mc-intro input[type=tel] { grid-column: 1 / -1; }
.mc-sub.is-off { color: #ffd59e; }
