/* Talking to Muse (muse-chat.js): press and hold the kitten to open her chat. */
.muse-stage .muse { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }

.mc-sheet {
  width: min(560px, calc(100% - 20px)); height: min(86dvh, 760px); max-height: none; padding: 0; border: 0; border-radius: 26px;
  background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden;
}
.mc-sheet[open] { display: grid; grid-template-rows: auto 1fr auto auto; }
.mc-sheet::backdrop { background: rgba(20, 12, 24, .55); }

.mc-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 14px; border-bottom: 1px solid var(--line); }
.mc-muse { flex: none; width: 54px; height: 62px; display: block; }
.mc-muse svg { width: 100%; height: 100%; overflow: visible; }
.mc-who { flex: 1; min-width: 0; display: grid; }
.mc-who h2 { margin: 0; font-size: 1.3rem; line-height: 1.15; }
.mc-who small { font: 400 .9rem/1.3 var(--sans); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-icon { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.mc-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mc-icon[aria-pressed="true"] { color: var(--accent); }
.mc-close { font-size: 1.8rem; line-height: 1; }

.mc-log:focus { outline: none; }
.mc-log { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.mc-msg { max-width: 86%; padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.mc-msg p { margin: 0; font: 400 1.05rem/1.4 var(--sans); white-space: pre-wrap; overflow-wrap: break-word; }
.mc-from-me { align-self: flex-end; border-radius: 20px 20px 6px 20px; background: var(--accent-soft); border-color: transparent; }
.mc-msg.is-typing p { letter-spacing: .2em; animation: mc-typing 1s ease-in-out infinite; }
@keyframes mc-typing { 50% { opacity: .35; } }

.mc-consent { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.mc-consent p { font-size: .95rem; color: var(--ink-2); }
.mc-consent a { color: var(--accent); }
.mc-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mc-agree, .mc-decline { min-height: 44px; padding: 0 16px; border-radius: 999px; font: 600 1rem var(--sans); cursor: pointer; }
.mc-agree { border: 0; background: var(--candy, var(--accent)); color: var(--accent-ink); }
.mc-decline { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }

.mc-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px; scrollbar-width: none; }
.mc-chips::-webkit-scrollbar { display: none; }
.mc-chips button { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 .95rem var(--sans); cursor: pointer; }

.mc-form { display: flex; gap: 8px; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.mc-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 400 1.05rem var(--sans); }
.mc-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mc-send { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--candy, var(--accent)); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.mc-send svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .mc-msg.is-typing p { animation: none; } }

/* Two-way voice: the mic button and what Muse is doing */
.mc-mic { flex: none; width: 48px; height: 48px; border: 1.5px solid var(--accent); border-radius: 50%; background: var(--surface); color: var(--accent); display: grid; place-items: center; cursor: pointer; position: relative; }
.mc-mic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mc-mic.is-live { background: var(--candy, var(--accent)); color: var(--accent-ink); border-color: transparent; }
.mc-mic.is-listening::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); animation: mc-ring 1.2s ease-out infinite; }
@keyframes mc-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.mc-hint { margin: 0; padding: 0 16px; min-height: 0; font: 500 .9rem/1.6 var(--sans); color: var(--accent); text-align: center; }
.mc-hint:empty { display: none; }
.mc-sheet[open] { grid-template-rows: auto 1fr auto auto auto; }
.mc-hearing p { font-style: italic; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .mc-mic.is-listening::after { animation: none; opacity: .6; } }
