.mentor-companion { position: fixed; z-index: 45; width: 150px; height: 184px; pointer-events: none; color: #75531f; }
.mentor-companion button, .mc-panel button { font: inherit; cursor: pointer; }
.mc-character { width: 150px; height: 184px; padding: 0; position: relative; display: block; border: 0; background: transparent; touch-action: none; pointer-events: auto; cursor: grab; }
.mc-art { width: 100%; height: 160px; display: block; object-fit: contain; user-select: none; filter: drop-shadow(0 6px 7px #76500f1f); animation: mc-breathe 4s ease-in-out infinite; }
.mc-name { display: inline-block; margin-top: -2px; padding: 4px 11px; border: 1px solid #d4bd82; border-radius: 999px; background: #fff8e8f0; color: #785720; font-size: 12px; line-height: 1.4; box-shadow: 0 3px 9px #67461712; }
.mc-collapse { position: absolute; right: -2px; top: 8px; padding: 4px 7px; color: #7c622e; background: #fffaf0f0; border: 1px solid #ddcca0; border-radius: 8px; font-size: 10px !important; pointer-events: auto; opacity: 0; }
.mentor-companion:hover .mc-collapse, .mentor-companion:focus-within .mc-collapse { opacity: 1; }
.mc-dock { display: none; pointer-events: auto; align-items: center; gap: 3px; height: 43px; padding: 2px 11px 2px 1px; color: #76531e; background: #fff8e7; border: 1px solid #d5bd83; border-radius: 999px; box-shadow: 0 4px 12px #8061301a; font-size: 12px; touch-action: none; }
.mc-dock img { width: 35px; height: 36px; object-fit: contain; }
.mentor-companion.mc-mini { width: 85px; height: 43px; }
.mc-mini .mc-dock { display: inline-flex; }
.mc-mini .mc-character, .mc-mini .mc-collapse { display: none; }
.mc-dragging .mc-art { animation: none; }
.mc-dragging .mc-character, .mc-dragging .mc-dock { cursor: grabbing; }
.mc-badge { position: absolute; right: -1px; top: 26px; color: #fff8e5; background: #967031; padding: 4px 7px; border-radius: 7px; font-size: 10px; }
.mc-panel { position: fixed; z-index: 46; overflow: auto; padding: 17px 18px 13px; border: 1px solid #d7bc7a; border-radius: 16px; background: #fffbf0fc; color: #5d461d; box-shadow: 0 12px 34px #5f43152a; scrollbar-width: thin; scrollbar-color: #ccb27b transparent; }
.mc-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid #ebdfc0; }
.mc-panel-heading h2 { margin: 0; font-size: 16px; font-weight: 600; color: #74501e; }
.mc-close { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: #f5ecd5; color: #8b6d36; font-size: 20px !important; }
.mc-quote { margin: 15px 0 8px; color: #78521c; font-family: 'KaiTi', 'STKaiti', serif; font-size: 22px; line-height: 1.55; }
.mc-quote:empty { display: none; }
.mc-note { font-size: 14px; line-height: 1.85; color: #6c562d; margin: 12px 0 9px; white-space: pre-line; }
.mc-source { display: block; font-size: 12px; line-height: 1.6; color: #897144; text-underline-offset: 3px; }
.mc-source:not([href]) { text-decoration: none; cursor: default; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.mc-actions button { padding: 8px 10px; min-height: 37px; border: 1px solid #dcc898; border-radius: 9px; background: #fbf3df; color: #75551f; font-size: 12px; }
.mc-actions .mc-ask { background: #a57d36; border-color: #a57d36; color: #fffdf6; }
.mc-audio { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 14px; padding-top: 11px; border-top: 1px solid #ebdfc0; }
.mc-audio button { padding: 3px 0; min-height: 26px; border: 0; background: none; color: #8c703a; font-size: 11px; }
.mc-audio-status { font-size: 11px; line-height: 1.6; color: #8b713f; margin: 8px 0 0; }
.mc-audio-status:empty { display: none; }
.mc-character:focus-visible, .mc-dock:focus-visible, .mc-panel button:focus-visible, .mc-panel a:focus-visible { outline: 2px solid #af8841; outline-offset: 3px; }
.mc-panel button:disabled { opacity: .5; cursor: wait; }
.mc-greeting .mc-art { animation: mc-greet .42s ease-out; }
.mc-paused .mc-art { animation-play-state: paused; }
.mc-composer-focus { outline: 2px solid #c5a15c; outline-offset: 3px; }
body.challenge-intro-open .mentor-companion, body.challenge-intro-open .mc-panel { visibility: hidden; }
@keyframes mc-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes mc-greet { 0%,100% { transform: rotate(0); } 40% { transform: rotate(-3deg) translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .mc-art, .mc-greeting .mc-art { animation: none !important; } }
@media (max-width: 600px) { .mc-panel { padding: 14px 15px 11px; } .mc-panel-heading h2 { font-size: 15px; } .mc-quote { font-size: 21px; } .mc-note { font-size: 14px; } }

/* 角色不是通用胶囊按钮，保留原图的透明轮廓。 */
html.white-controls body.master-edition .mentor-companion .mc-character,
html.white-controls body.master-edition .mentor-companion .mc-character:not(:disabled):hover {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
html.white-controls body.master-edition .mentor-companion .mc-collapse { background: #fff8eaf0; border: 1px solid #dbc590; border-radius: 8px; box-shadow: none; }
html.white-controls body.master-edition .mc-panel .mc-actions .mc-ask { background: #ecd59c; color: #4d3c2b; border-color: #cfb06f; }
html.white-controls body.master-edition .mc-panel .mc-audio button { background: transparent; color: #805f2c; border: 0; border-radius: 0; box-shadow: none; padding: 4px 0; }

/* 模型语音与备用系统朗读分开选择，保持师父面板的浅金层级。 */
.mc-audio-engine { margin: 15px 0 0; padding-top: 11px; border-top: 1px solid #e7d8b7; color: #78654e; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.mc-panel .mc-audio { gap: 5px 12px; margin-top: 7px; padding-top: 0; border-top: 0; }
html.white-controls body.master-edition .mc-panel .mc-audio button { min-height: 36px; font-size: 12px; }
html.white-controls body.master-edition .mc-panel .mc-audio .mc-read { padding: 7px 11px; border: 1px solid #d1b77d; border-radius: 7px; background: #f1e3c2; color: #5d4526; }
html.white-controls body.master-edition .mc-panel .mc-audio .mc-read:not(:disabled):hover { border-color: #bea064; background: #ead5aa; color: #503b21; }
html.white-controls body.master-edition .mc-panel .mc-audio .mc-system-read { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bda476; }
.mc-audio-status { margin-top: 7px; color: #78654e; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.mc-audio-status[data-state="error"] { color: #8a4b36; }
.mc-audio-engine[data-state="loading"] { color: #795b29; }
@media (max-width: 600px) { html.white-controls body.master-edition .mc-panel .mc-audio button { min-height: 40px; } }
