/* ============================================= */
/*  界面美化 — 马卡龙奶系 统一主题                */
/* ============================================= */

/* ---- 顶部栏 ---- */
.sticky.w-full.top-0.flex.items-center {
  background: linear-gradient(
    135deg,
    #fefcf8 0%,
    #fdf0f0 35%,
    #f0ecf6 70%,
    #eef4fa 100%
  ) !important;
  border-bottom: 1.5px solid #e0d8d4 !important;
  box-shadow: 0 2px 12px rgba(80, 60, 60, 0.06) !important;
}

/* 模型选择器容器 */
#ai-model-selector .group.flex.items-center {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid #e0d8d4 !important;
  border-radius: 8px !important;
  padding: 3px 10px !important;
  transition: border-color 0.25s, box-shadow 0.25s !important;
}

#ai-model-selector .group.flex.items-center:hover {
  border-color: #d8cce8 !important;
  box-shadow: 0 0 0 2px rgba(216, 204, 232, 0.2) !important;
}

/* 模型名称 */
#ai-model-selector .truncate.text-\[13px\] {
  color: #5a5070 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  font-weight: 500 !important;
}

/* 下拉箭头 */
#ai-model-selector .shrink-0.flex.items-center svg {
  fill: #a098b0 !important;
  transition: transform 0.2s !important;
}

#ai-model-selector .group.flex.items-center:hover svg {
  transform: translateY(1px) !important;
}

/* 设置按钮 */
#header-setting-button {
  color: #a098b0 !important;
  border-radius: 8px !important;
  transition: background 0.25s, color 0.25s !important;
}

#header-setting-button:hover {
  background: rgba(216, 204, 232, 0.18) !important;
  color: #706078 !important;
}

/* ---- 开场白选择器 ---- */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: linear-gradient(135deg, #fefcf8, #fdf0f0) !important;
  border: 1.5px solid #e0d8d4 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 6px rgba(80, 60, 60, 0.05) !important;
  transition: border-color 0.25s, box-shadow 0.25s !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
  border-color: #d8cce8 !important;
  box-shadow: 0 2px 10px rgba(216, 204, 232, 0.18) !important;
}

div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"],
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] {
  fill: #a098b0 !important;
  transition: transform 0.2s !important;
}

div.flex.items-center.h-9.cursor-pointer.group:hover svg[data-icon="ChevronDown"] {
  transform: translateY(1px) !important;
}

/* ---- 按钮栏 ---- */
#ai-mod-button2 button.MuiButton-root {
  background: linear-gradient(180deg, #fefcf8, #f8f0f0) !important;
  border: 1px solid #e0d8d4 !important;
  border-radius: 8px !important;
  color: #5a5070 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  font-size: 12.5px !important;
  box-shadow:
    0 1px 4px rgba(80, 60, 60, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  transition: all 0.25s !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  background: linear-gradient(180deg, #f0ecf6, #e8e0f0) !important;
  border-color: #c8bcd8 !important;
  box-shadow:
    0 2px 8px rgba(216, 204, 232, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
  fill: #a098b0 !important;
  transition: fill 0.2s !important;
}

#ai-mod-button2 button.MuiButton-root:hover svg {
  fill: #706078 !important;
}

/* ---- 底部栏 ---- */
.bg-gradient-to-t {
  background: linear-gradient(
    to top,
    #fefcf8 0%,
    #fdf0f0 40%,
    rgba(254, 252, 248, 0) 100%
  ) !important;
}

/* 输入框容器 */
#ai-chat-bottom-input {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1.5px solid #e0d8d4 !important;
  border-radius: 14px !important;
  box-shadow:
    0 2px 14px rgba(80, 60, 60, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
}

#ai-chat-bottom-input:focus-within {
  border-color: #d8cce8 !important;
  box-shadow:
    0 2px 18px rgba(216, 204, 232, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* 主输入框 */
#ai-chat-input {
  color: #4a4444 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  font-size: 14px !important;
  background: transparent !important;
}

#ai-chat-input::placeholder {
  color: #c0b8c0 !important;
  font-style: italic !important;
}

#ai-chat-input::selection {
  background: rgba(216, 204, 232, 0.35) !important;
  color: #4a4444 !important;
}

/* ---- 分页栏 ---- */
.MuiPaginationItem-root {
  color: #8a8090 !important;
  border-color: #e0d8d4 !important;
  background: rgba(255, 255, 255, 0.5) !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s !important;
}

.MuiPaginationItem-root:hover {
  background: rgba(240, 236, 246, 0.5) !important;
  border-color: #d0c8d8 !important;
  color: #5a5070 !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, #e8ddf0, #d8cce8) !important;
  color: #4a4060 !important;
  border-color: #c8bcd8 !important;
  font-weight: 600 !important;
}

.MuiPaginationItem-root.Mui-disabled {
  color: #d0c8cc !important;
  opacity: 0.5 !important;
}

.MuiPaginationItem-icon {
  fill: #a098b0 !important;
}

/* 跳转输入区域 */
.MuiStack-root.css-1uwir8f {
  color: #8a8090 !important;
}

.MuiStack-root.css-1uwir8f .MuiBox-root {
  color: #8a8090 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

.MuiInputBase-input {
  color: #5a5070 !important;
  border-color: #e0d8d4 !important;
  background: rgba(255, 255, 255, 0.5) !important;
  border-radius: 6px !important;
}

/* ---- 评论区 ---- */

/* 背景容器 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: linear-gradient(
    180deg,
    #fefcf8 0%,
    #fdf0f0 50%,
    #f0ecf6 100%
  ) !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* 顶部标题 */
div.text-lg.font-bold {
  color: #4a4060 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

/* 个人评分文字 */
p.MuiTypography-body1.text-grey-600 {
  color: #8a8090 !important;
}

/* 评分星星 */
span.MuiRating-iconEmpty svg {
  fill: #e0d8d4 !important;
}

span.MuiRating-iconFilled svg {
  fill: #e8b898 !important;
}

/* 评分数字 */
span.text-orange-500 {
  color: #c8a080 !important;
  font-weight: 600 !important;
}

/* 评论输入框容器 */
div.flex.flex-col.border-gray-200 {
  border-color: #e0d8d4 !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  transition: border-color 0.25s !important;
  padding: 4px 8px !important;
}

div.flex.flex-col.border-gray-200:focus-within {
  border-color: #d8cce8 !important;
}

/* 评论输入框 */
textarea.rc-textarea {
  color: #4a4444 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  background: transparent !important;
}

/* 字数统计 */
div.bg-gray-100.text-gray-500 {
  background: rgba(240, 236, 246, 0.3) !important;
  color: #b0a8b8 !important;
  border-radius: 0 0 10px 10px !important;
}

/* 发送评论按钮 */
div.cursor-pointer.group.flex.items-center.justify-center {
  transition: transform 0.2s !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
  transform: scale(1.08) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
  fill: #a098b0 !important;
  transition: fill 0.2s !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover svg[data-icon="Send03"] {
  fill: #706078 !important;
}

/* 分割线 */
div.style_divider__mW0YX {
  background: linear-gradient(
    90deg,
    transparent,
    #e0d8d4 20%,
    #d8cce8 50%,
    #e0d8d4 80%,
    transparent
  ) !important;
  height: 1px !important;
}

/* 排序按钮 */
button.MuiButton-containedPrimary,
button.MuiButton-outlinedPrimary {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  transition: all 0.25s !important;
}

button.MuiButton-containedPrimary {
  background: linear-gradient(135deg, #d8cce8, #c8bcd8) !important;
  color: #4a4060 !important;
  border: 1px solid #c0b0d0 !important;
  box-shadow: 0 1px 4px rgba(160, 140, 180, 0.15) !important;
}

button.MuiButton-containedPrimary:hover {
  background: linear-gradient(135deg, #c8bcd8, #b8a8cc) !important;
  box-shadow: 0 2px 8px rgba(160, 140, 180, 0.25) !important;
}

button.MuiButton-outlinedPrimary {
  background: rgba(255, 255, 255, 0.5) !important;
  color: #8a8090 !important;
  border: 1px solid #e0d8d4 !important;
}

button.MuiButton-outlinedPrimary:hover {
  background: rgba(240, 236, 246, 0.4) !important;
  border-color: #d0c8d8 !important;
  color: #5a5070 !important;
}

/* 评论列表 */
div.p-3.overflow-y-auto {
  scrollbar-width: thin !important;
  scrollbar-color: #d8d0dc #f8f4f8 !important;
}

div.p-3.overflow-y-auto::-webkit-scrollbar {
  width: 5px !important;
}

div.p-3.overflow-y-auto::-webkit-scrollbar-track {
  background: #f8f4f8 !important;
  border-radius: 3px !important;
}

div.p-3.overflow-y-auto::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d8cce8, #e0d0d8) !important;
  border-radius: 3px !important;
}

/* 评论项 hover */
div.group.ml-0 {
  border-radius: 8px !important;
  transition: background 0.2s !important;
  padding: 8px 12px !important;
}

div.group.ml-0:hover {
  background: rgba(248, 240, 246, 0.35) !important;
}

/* 用户头像 */
div.group img.rounded-full {
  border: 1.5px solid #e0d8e4 !important;
  box-shadow: 0 1px 4px rgba(80, 60, 80, 0.08) !important;
}

/* 用户名 */
div.text-sm.text-grey-600 span.font-bold {
  color: #5a5070 !important;
}

/* "（你）" 标签 */
span.text-\[10px\] {
  color: #c0a8b8 !important;
  background: rgba(240, 236, 246, 0.4) !important;
  border-radius: 4px !important;
  padding: 0 4px !important;
}

/* 评论内容 */
div.break-all {
  color: #4a4444 !important;
  line-height: 1.7 !important;
}

/* 时间戳 */
div.text-xs.text-grey-600 {
  color: #b8b0b8 !important;
}

/* 点赞按钮 */
button.text-gray-400 {
  color: #c0b8c8 !important;
  transition: color 0.2s !important;
}

button.text-gray-400:hover {
  color: #e8889a !important;
}

button.text-gray-400 svg {
  transition: transform 0.2s !important;
}

button.text-gray-400:hover svg {
  transform: scale(1.15) !important;
}

/* 回复文字 */
span.cursor-pointer {
  color: #a098b0 !important;
  transition: color 0.2s !important;
}

span.cursor-pointer:hover {
  color: #706078 !important;
}

/* 回复区域边框 */
div.ml-8.border-l {
  border-color: #e4dced !important;
}

/* ============================================= */
/*  聊天框美化 — 马卡龙奶系 配套主题               */
/* ============================================= */

/* ---- 隐藏顶部颜色装饰条 ---- */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
  display: none !important;
}

/* ---- 统一聊天框 ---- */
.bg-gray-100\/90.relative.inline-block {
  background: linear-gradient(
    160deg,
    #fefcf8 0%,
    #fdf0f0 40%,
    #f0ecf6 100%
  ) !important;
  border: 1.5px solid #e0d8d4 !important;
  border-radius: 14px !important;
  box-shadow:
    0 2px 14px rgba(80, 60, 60, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  padding: 4px !important;
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
}

/* ---- 聊天框内层双边框效果 ---- */
.bg-gray-100\/90.relative.inline-block::after {
  content: "" !important;
  position: absolute !important;
  inset: 3px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(232, 228, 224, 0.6) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* ---- 输入框单独微调（略深一点点） ---- */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
  background: linear-gradient(
    160deg,
    #fefcf8 0%,
    #eef4fa 50%,
    #eef8f2 100%
  ) !important;
  border-color: #c8d8d0 !important;
}

/* ---- 背景装饰伪元素（微妙的浮动光斑） ---- */
.bg-gray-100\/90.relative.inline-block::before {
  content: "" !important;
  position: absolute !important;
  top: -30% !important;
  right: -20% !important;
  width: 160px !important;
  height: 160px !important;
  border-radius: 50% !important;
  background: radial-gradient(
    circle,
    rgba(216, 204, 232, 0.12) 0%,
    rgba(242, 208, 208, 0.08) 40%,
    transparent 70%
  ) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* ---- 文本内容 ---- */
.markdown-body {
  color: #4a4444 !important;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
  position: relative !important;
  z-index: 1 !important;
  background: transparent !important;
  padding: 8px 16px !important;
}

/* ---- 底部按钮 ---- */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
  color: #a098a8 !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  transition: background 0.2s, color 0.2s !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
  background: rgba(216, 204, 232, 0.2) !important;
  color: #706078 !important;
}

/* ---- 模型名称 ---- */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
  color: #b8b0b8 !important;
  font-size: 11px !important;
}

/* ---- Token消耗 ---- */
.text-orange-500 {
  color: #c8a080 !important;
  font-size: 11px !important;
}



/* ============================================= */

:root {
  --mk-pink: #f2d0d0;
  --mk-pink-deep: #e8b4b4;
  --mk-pink-pale: #fdf0f0;
  --mk-blue: #c8ddf0;
  --mk-blue-deep: #a8c4de;
  --mk-blue-pale: #eef4fa;
  --mk-purple: #d8cce8;
  --mk-purple-deep: #c0b0d8;
  --mk-purple-pale: #f0ecf6;
  --mk-mint: #c8e8d4;
  --mk-mint-deep: #a0d0b4;
  --mk-mint-pale: #eef8f2;
  --mk-yellow: #f5ecc8;
  --mk-yellow-deep: #e8d898;
  --mk-yellow-pale: #fdfaee;
  --mk-cream: #fefcf8;
  --mk-cream-warm: #faf6f0;
  --mk-text: #4a4444;
  --mk-text-sub: #8a8080;
  --mk-text-faint: #b8b0a8;
  --mk-border: #d8d0cc;
  --mk-border-light: #e8e4e0;
  --mk-highlight: #fff;
  --mk-shadow: rgba(80, 60, 60, 0.08);
  --mk-shadow-md: rgba(80, 60, 60, 0.12);
  --font-body: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
  --font-note: "Segoe Print", "Comic Sans MS", cursive, sans-serif;
}

/* ---- XP 窗口基础 ---- */
.xp-win {
  border: 1.5px solid var(--mk-border);
  border-radius: 10px;
  background: var(--mk-cream);
  box-shadow:
    0 2px 12px var(--mk-shadow-md),
    inset 0 1px 0 var(--mk-highlight);
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--mk-text);
  overflow: hidden;
  position: relative;
}

/* 双层边框内圈 */
.xp-win::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 8px;
  border: 1px solid var(--mk-border-light);
  pointer-events: none;
  z-index: 0;
}

/* ---- 标题栏 ---- */
.xp-win .xp-title {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mk-text);
  border-bottom: 1px solid var(--mk-border);
  position: relative;
  z-index: 1;
  text-shadow: 0 0.5px 0 rgba(255,255,255,0.7);
  gap: 5px;
  user-select: none;
}

.xp-title .t-icon { font-size: 13px; flex-shrink: 0; }

/* XP 按钮组 */
.xp-title .xp-btns {
  margin-left: auto;
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.xp-title .xp-b {
  width: 16px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #c0b8b4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-family: var(--font-mono);
  color: #998;
  position: relative;
  overflow: hidden;
}

.xp-b::after {
  content: "";
  position: absolute;
  top: 0; left: 1px; right: 1px;
  height: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
  border-radius: 2px 2px 0 0;
}

.xp-b-n { background: linear-gradient(180deg, #f0ece8, #e0d8d4); }
.xp-b-m { background: linear-gradient(180deg, #f0ece8, #e0d8d4); }
.xp-b-x {
  background: linear-gradient(180deg, #f5d0cc, #e8b0a8);
  border-color: #d0a8a0;
  color: #885050;
}

/* ---- 各窗口标题栏配色 ---- */
.xp-win.w-status .xp-title {
  background: linear-gradient(180deg, #e8f0f6, var(--mk-blue), #b8d0e4);
}
.xp-win.w-user .xp-title {
  background: linear-gradient(180deg, #e8f4ec, var(--mk-mint), #a8d4b8);
}
.xp-win.w-npc .xp-title {
  background: linear-gradient(180deg, #f8e8e8, var(--mk-pink), #dca8a8);
}
.xp-win.w-notes .xp-title {
  background: linear-gradient(180deg, #fdf6e0, var(--mk-yellow), #dcc880);
}
.xp-win.w-slime .xp-title {
  background: linear-gradient(180deg, #ece4f4, var(--mk-purple), #b8a8d0);
}
.xp-win.w-fridge .xp-title {
  background: linear-gradient(180deg, #e4f0f8, #b8d8ec, #98c4dc);
}
.xp-win.w-action .xp-title {
  background: linear-gradient(180deg, #e8f4ec, #b8dcc8, #98ccb0);
}

/* 记忆区折叠标题 */
details.xp-win.w-memory > summary {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mk-text);
  border-bottom: 1px solid var(--mk-border);
  background: linear-gradient(180deg, #f0ecf6, var(--mk-purple), #c0aed4);
  cursor: pointer;
  list-style: none;
  z-index: 1;
  position: relative;
  text-shadow: 0 0.5px 0 rgba(255,255,255,0.7);
  gap: 5px;
  user-select: none;
}

details.xp-win.w-memory > summary::-webkit-details-marker { display: none; }

details.xp-win.w-memory > summary .fold-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--mk-text-sub);
  font-weight: 400;
}

details.xp-win.w-memory > summary .fold-hint::before { content: "[+] "; font-family: var(--font-mono); }
details.xp-win.w-memory[open] > summary .fold-hint::before { content: "[−] "; }

/* ============================================= */
/*  内容区底色 — 每个区域独立的可见柔和底色        */
/* ============================================= */

.xp-win .wb {
  padding: 14px 20px 16px !important;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

/* 状态总览（w-status）— 奶蓝底 */
.xp-win.w-status .wb {
  background: #eef4fa;
}

/* 个人档案区（w-user）— 奶绿底 */
.xp-win.w-user .wb {
  background: #eef8f2;
}

/* 同居者档案区（w-npc）— 奶粉底 */
.xp-win.w-npc .wb {
  background: #fdf0f0;
}

/* 冰箱贴和便签（w-notes）— 奶黄底 */
.xp-win.w-notes .wb {
  background: #fdfaee;
}

/* 厨房分身分布报告 / 史莱姆（w-slime）— 奶紫底 */
.xp-win.w-slime .wb {
  background: #f0ecf6;
}

/* 冰箱（w-fridge）— 冰蓝底 */
.xp-win.w-fridge .wb {
  background: #e8f2fa;
}

/* 记忆区（w-memory）— 薰衣草底 */
details.xp-win.w-memory .wb {
  background: #ece6f4;
}

/* 行动推荐（w-action）— 抹茶底 */
.xp-win.w-action .wb {
  background: #e8f6ee;
}

/* 内凹信息框 */
.wb .inset {
  background: #fff;
  border: 1px solid var(--mk-border-light);
  border-radius: 6px;
  padding: 10px 16px !important;
  margin: 6px 0 8px;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.03);
}

/* 分隔线 */
.wb .sep {
  border: none;
  border-top: 1px dashed #e0d8d4;
  margin: 10px 0;
}

/* 小标签 */
.tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
  vertical-align: middle;
}
.tag-g { background: var(--mk-mint-pale); border: 1px solid #c0dcc8; color: #5a7a60; }
.tag-p { background: var(--mk-pink-pale); border: 1px solid #e0c8c8; color: #886060; }
.tag-b { background: var(--mk-blue-pale); border: 1px solid #c0d0e0; color: #506878; }
.tag-y { background: var(--mk-yellow-pale); border: 1px solid #dcd0a0; color: #706020; }
.tag-v { background: var(--mk-purple-pale); border: 1px solid #ccc0d8; color: #605070; }

/* 字段标签 */
.fl { color: var(--mk-text-sub); font-size: 11px; }

/* ---- 布局 ---- */
.ly-row { display: flex; gap: 14px; align-items: flex-start; }
.ly-row > * { flex: 1; min-width: 0; }
.ly-col-s { flex: 0.55 !important; }
.ly-col-m { flex: 0.75 !important; }
.ly-col-l { flex: 1.25 !important; }
.ly-stack { display: flex; flex-direction: column; gap: 14px; }

/* 三列布局 */
.ly-tri { display: flex; gap: 14px; align-items: flex-start; }
.ly-tri > * { flex: 1; min-width: 0; }

/* ---- 便签 ---- */
.note {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.35) 0%, transparent 40%),
    var(--mk-yellow-pale);
  border: 1px solid #e4dcc0;
  border-left: 3.5px solid var(--mk-yellow-deep);
  border-radius: 1px 6px 6px 1px;
  padding: 14px 16px 12px;
  margin-bottom: 10px;
  font-family: var(--font-note);
  font-size: 12.5px;
  color: #5a5030;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.05);
  position: relative;
  line-height: 1.7;
}

.note:nth-child(odd) { transform: rotate(-0.5deg); }
.note:nth-child(even) {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.3) 0%, transparent 40%),
    #fff0e8;
  border-left-color: #e0a870;
  transform: rotate(0.6deg);
  color: #604838;
}
.note:nth-child(3n) { transform: rotate(0.3deg) translateX(1px); }

.note .tape {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 42px;
  height: 12px;
  background: linear-gradient(180deg, rgba(220,215,200,0.5), rgba(200,195,180,0.35));
  border-radius: 1px;
}

.note .n-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.note ul { margin: 4px 0 2px; padding-left: 16px; }
.note li { margin-bottom: 3px; }
.note li::marker { content: "☒ "; font-size: 10px; }

.note .n-detail {
  font-size: 9.5px;
  color: #c0b898;
  display: block;
  text-align: right;
  margin-top: 6px;
  font-style: italic;
}

.note .n-bite {
  position: absolute;
  bottom: 3px;
  right: 6px;
  font-size: 8px;
  color: #d0c8b0;
  font-family: var(--font-mono);
}

.note .n-stain {
  position: absolute;
  width: 20px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(160,150,120,0.1), transparent 70%);
  pointer-events: none;
}

/* ---- 瓶装史莱姆 ---- */
.slime-jar {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 14px auto 6px;
  width: 70px;
  height: 100px;
  border: 2px solid #c8d8e8;
  border-radius: 0 0 18px 18px;
  border-top: none;
  position: relative;
  background: linear-gradient(180deg, rgba(220,240,255,0.3), rgba(200,230,250,0.1));
}

.slime-jar::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -4px;
  width: calc(100% + 8px);
  height: 12px;
  background: linear-gradient(180deg, #f8d8b8, #f0c8a0);
  border-radius: 3px 3px 0 0;
  border: 1.5px solid #d4a878;
}

.slime-body {
  width: 30px;
  height: 24px;
  background: radial-gradient(ellipse at 40% 40%, #555, #1a1a1a);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  margin-bottom: 10px;
  position: relative;
  animation: slime-bounce 1.8s ease-in-out infinite;
}

.slime-body::before,
.slime-body::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  top: 6px;
}
.slime-body::before { left: 7px; }
.slime-body::after { left: 18px; }

@keyframes slime-bounce {
  0%, 100% {
    transform: translateY(0) scaleX(1) scaleY(1);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  }
  30% {
    transform: translateY(-12px) scaleX(0.9) scaleY(1.15);
    border-radius: 50% 50% 45% 45% / 55% 55% 45% 45%;
  }
  50% {
    transform: translateY(0) scaleX(1.12) scaleY(0.85);
    border-radius: 55% 55% 50% 50% / 65% 65% 35% 35%;
  }
  70% {
    transform: translateY(-5px) scaleX(0.95) scaleY(1.05);
  }
}

/* 分身列表 */
.s-list { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; }
.s-list li {
  padding: 4px 8px;
  font-size: 12px;
  border-bottom: 1px dashed #e0dce8;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.s-list li:last-child { border-bottom: none; }
.s-list .si { flex-shrink: 0; font-size: 12px; }
.s-list .sn { font-weight: 600; color: #5a5070; }
.s-list .ss {
  color: var(--mk-text-faint);
  font-size: 11px;
  margin-left: auto;
  font-style: italic;
  white-space: nowrap;
}

/* ---- 冰箱面板 ---- */
.fridge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 6px;
}

.fridge-item {
  background: #fff;
  border: 1px solid var(--mk-border-light);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.fridge-item .fi-name { font-weight: 500; }
.fridge-item .fi-status { font-size: 10.5px; color: var(--mk-text-sub); }

/* ---- NPC 故障效果 ---- */
@keyframes glitch-micro {
  0%, 90%, 100% { opacity: 1; transform: translate(0,0); }
  91% { opacity: 0.75; transform: translate(0.5px, 0); }
  92.5% { opacity: 1; transform: translate(-0.5px, 0); }
  94% { opacity: 0.9; }
}

.glitch-s { animation: glitch-micro 15s infinite; }

.xp-win.w-npc {
  box-shadow:
    0 2px 12px var(--mk-shadow-md),
    inset 0 1px 0 var(--mk-highlight),
    -0.5px 0 0 rgba(255,80,80,0.04),
    0.5px 0 0 rgba(80,180,255,0.04);
}

/* ---- 表格 ---- */
.xp-win table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin-top: 8px;
}
.xp-win th {
  background: linear-gradient(180deg, var(--mk-purple-pale), #e4dced);
  padding: 5px 8px;
  text-align: left;
  border: 1px solid #d0c8d8;
  font-weight: 600;
  font-size: 11px;
  color: #585068;
}
.xp-win td {
  padding: 5px 8px;
  border: 1px solid #e8e4e0;
}
.xp-win tr:nth-child(even) td { background: rgba(0,0,0,0.012); }

/* ---- 行动推荐 ---- */
.xp-win.w-action ol {
  padding-left: 22px;
  margin: 6px 0 2px;
}
.xp-win.w-action li {
  padding: 4px 0;
  border-bottom: 1px dotted #d8e0d8;
  font-size: 13px;
}
.xp-win.w-action li:last-child { border-bottom: none; }

/* ============================================= */
/*  强化移动端适配 — 消除大片空白，紧凑排版        */
/* ============================================= */

@media (max-width: 720px) {
  /* 多列全部转单列 */
  .ly-row,
  .ly-tri {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .ly-col-s, .ly-col-m, .ly-col-l {
    flex: 1 !important;
    width: 100% !important;
  }

  /* 窗口间距收紧 */
  .xp-win {
    margin-bottom: 8px;
    border-radius: 8px;
  }

  /* 内容区内边距收紧，消除大片空白 */
  .xp-win .wb {
    padding: 10px 12px 12px !important;
    font-size: 13px;
    line-height: 1.65;
  }

  /* 标题栏紧凑 */
  .xp-win .xp-title {
    padding: 4px 8px;
    font-size: 11.5px;
  }

  /* 内凹框紧凑 */
  .wb .inset {
    padding: 8px 10px !important;
    margin: 4px 0 6px;
  }

  /* 冰箱网格单列 */
  .fridge-grid {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  .fridge-item {
    padding: 4px 7px;
    font-size: 11.5px;
  }

  /* 便签紧凑 */
  .note {
    padding: 10px 12px 8px !important;
    margin-bottom: 8px;
    font-size: 12px;
    transform: none !important;
  }
  .note .n-title {
    font-size: 12.5px;
  }

  /* 分身列表紧凑 */
  .s-list li {
    padding: 3px 6px;
    font-size: 11.5px;
    gap: 4px;
  }
  .s-list .ss {
    font-size: 10px;
  }

  /* 史莱姆罐缩小 */
  .slime-jar {
    width: 58px;
    height: 82px;
    margin: 10px auto 4px;
  }
  .slime-body {
    width: 26px;
    height: 20px;
  }

  /* 标签缩小 */
  .tag {
    font-size: 9.5px;
    padding: 1px 5px;
  }

  /* 表格紧凑 */
  .xp-win table {
    font-size: 10.5px;
  }
  .xp-win th,
  .xp-win td {
    padding: 3px 5px;
  }

  /* 分隔线间距收紧 */
  .wb .sep {
    margin: 7px 0;
  }

  /* 行动推荐紧凑 */
  .xp-win.w-action li {
    font-size: 12.5px;
    padding: 3px 0;
  }
  .xp-win.w-action ol {
    padding-left: 18px;
    margin: 4px 0 2px;
  }

  /* 记忆区折叠标题紧凑 */
  details.xp-win.w-memory > summary {
    padding: 4px 8px;
    font-size: 11.5px;
  }
}

@media (max-width: 480px) {
  /* 进一步压缩内边距 */
  .xp-win .wb {
    padding: 8px 10px 10px !important;
    font-size: 12.5px;
    line-height: 1.6;
  }

  .xp-win {
    margin-bottom: 6px;
    border-radius: 7px;
  }

  .xp-win .xp-title {
    padding: 3px 7px;
    font-size: 11px;
    gap: 3px;
  }

  /* XP按钮缩小 */
  .xp-title .xp-btns { gap: 2px; }
  .xp-title .xp-b {
    width: 14px;
    height: 12px;
    font-size: 7px;
  }

  /* 内凹框进一步紧凑 */
  .wb .inset {
    padding: 6px 8px !important;
    margin: 3px 0 5px;
    border-radius: 5px;
  }

  /* 冰箱项 */
  .fridge-item {
    padding: 3px 6px;
    font-size: 11px;
    border-radius: 5px;
  }

  /* 便签进一步紧凑 */
  .note {
    padding: 8px 10px 7px !important;
    margin-bottom: 6px;
    font-size: 11.5px;
    line-height: 1.6;
  }
  .note .n-title { font-size: 12px; }
  .note .tape {
    width: 34px;
    height: 9px;
    top: -5px;
  }
  .note ul { padding-left: 14px; margin: 3px 0 1px; }
  .note li { margin-bottom: 2px; font-size: 11px; }
  .note .n-detail { font-size: 9px; margin-top: 4px; }

  /* 史莱姆罐再缩 */
  .slime-jar {
    width: 50px;
    height: 72px;
    margin: 8px auto 3px;
  }
  .slime-body {
    width: 22px;
    height: 17px;
    margin-bottom: 8px;
  }
  .slime-body::before,
  .slime-body::after {
    width: 4px;
    height: 5px;
    top: 5px;
  }
  .slime-body::before { left: 5px; }
  .slime-body::after { left: 13px; }
  .slime-jar::before {
    height: 10px;
    top: -8px;
  }

  /* 分身列表 */
  .s-list li {
    padding: 2px 4px;
    font-size: 11px;
    gap: 3px;
  }
  .s-list .ss { font-size: 9.5px; }

  /* 表格极紧凑 — 横向可滚动防溢出 */
  .xp-win .wb > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .xp-win table { font-size: 10px; white-space: nowrap; }
  .xp-win th,
  .xp-win td {
    padding: 2px 4px;
  }

  /* 分隔线 */
  .wb .sep { margin: 5px 0; }

  /* 字段标签 */
  .fl { font-size: 10px; }

  /* 标签 */
  .tag { font-size: 9px; padding: 0px 4px; }

  /* 行动推荐 */
  .xp-win.w-action li { font-size: 12px; padding: 2px 0; }
  .xp-win.w-action ol { padding-left: 16px; }

  /* 记忆区 */
  details.xp-win.w-memory > summary {
    padding: 3px 7px;
    font-size: 11px;
  }
  details.xp-win.w-memory > summary .fold-hint { font-size: 9px; }

  /* 平台适配 */
  .bg-gray-100\/90.relative.inline-block .markdown-body {
    padding: 6px 10px !important;
    font-size: 12.5px !important;
  }
  div.group.ml-0 {
    padding: 5px 8px !important;
  }
  div.flex.flex-col.border-gray-200 {
    padding: 3px 5px !important;
  }
  .MuiPaginationItem-root {
    min-width: 26px !important;
    margin: 0 1px !important;  font-size: 11px !important;
  }
  .MuiStack-root.css-1uwir8f {
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
  }
  .flex.items-center.justify-center.w-6.h-5 {
    transform: scale(0.85);
  }
  .flex.items-center.justify-center.w-6.h-5::before {
    font-size: 30px !important;
  }
}

/* ---- 超小屏 360px 以下 ---- */
@media (max-width: 360px) {
  .xp-win .wb {
    padding: 6px 8px 8px !important;
    font-size: 12px;
    line-height: 1.55;
  }
  .xp-win {
    margin-bottom: 5px;
    border-radius: 6px;
  }
  .xp-win .xp-title {
    padding: 3px 6px;
    font-size: 10.5px;
    gap: 2px;
  }
  .xp-title .xp-b {
    width: 13px;
    height: 11px;
    font-size: 6px;
  }
  .wb .inset {
    padding: 5px 7px !important;
    margin: 2px 0 4px;
  }
  .fridge-item {
    font-size: 10.5px;
    padding: 2px 5px;
  }
  .note {
    padding: 7px 8px 6px !important;
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1.55;
  }
  .note .n-title { font-size: 11.5px; }
  .note .tape {
    width: 30px;
    height: 8px;
    top: -4px;
  }
  .note ul { padding-left: 12px; }
  .note li { font-size: 10.5px; margin-bottom: 1px; }
  .note .n-detail { font-size: 8.5px; }
  .note .n-bite { font-size: 7px; }
  .slime-jar {
    width: 44px;
    height: 62px;
    margin: 6px auto 2px;
  }
  .slime-body {
    width: 18px;
    height: 14px;
    margin-bottom: 6px;
  }
  .slime-body::before,
  .slime-body::after {
    width: 3px;
    height: 4px;
    top: 4px;
  }
  .slime-body::before { left: 4px; }
  .slime-body::after { left: 11px; }
  .slime-jar::before {
    height: 8px;
    top: -7px;
  }
  .s-list li {
    padding: 2px 3px;
    font-size: 10.5px;
    gap: 2px;
  }
  .s-list .ss { font-size: 9px; }
  .xp-win table { font-size: 9.5px; }
  .xp-win th,
  .xp-win td { padding: 2px 3px; }
  .wb .sep { margin: 4px 0; }
  .fl { font-size: 9.5px; }
  .tag { font-size: 8.5px; padding: 0px 3px; }
  .xp-win.w-action li { font-size: 11.5px; padding: 2px 0; }
  .xp-win.w-action ol { padding-left: 14px; }
  details.xp-win.w-memory > summary {
    padding: 3px 6px;
    font-size: 10.5px;
  }
  details.xp-win.w-memory > summary .fold-hint { font-size: 8.5px; }
}

/* 低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .flex.items-center.justify-center.w-6.h-5::before,
  .flex.items-center.justify-center.w-6.h-5 {
    animation-duration: 4s !important;
  }
  .slime-body {
    animation-duration: 3s !important;
  }
}