:root {
  color-scheme: dark;
  --home-bg: #111214;
  --home-card: rgba(30, 31, 36, 0.92);
  --home-border: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 109, 151, 0.18), transparent 24rem),
    radial-gradient(circle at 80% 0%, rgba(23, 170, 253, 0.16), transparent 22rem),
    var(--home-bg);
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 1rem; }
.login-card { width: min(24rem, 100%); padding: 1.5rem; border: 1px solid var(--home-border); border-radius: 8px; background: #1e1f24; }
.login-card h1 { margin: 0 0 1rem; font-size: 1.25rem; }
.login-form, .login-form label { display: grid; gap: 0.65rem; }
.login-form { gap: 1rem; }
.login-form input { width: 100%; padding: 0.65rem; border: 1px solid var(--home-border); border-radius: 6px; background: #111214; color: white; }
.login-form button { padding: 0.65rem; border: 0; border-radius: 6px; background: #ff6d97; color: white; cursor: pointer; }
.login-status { margin-top: 0.75rem; font-size: 0.85rem; color: #ff9dac; overflow-wrap: anywhere; }

.home-page {
  align-content: start;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 1rem;
}

.home-card {
  letter-spacing: 0;
  width: min(36rem, 100%);
  padding: 1.25rem;
  border: 1px solid var(--home-border);
  border-radius: 1.25rem;
  background: var(--home-card);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.home-card h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.home-card h2 {
  margin: 1.25rem 0 0.65rem;
  color: #c5c5c5;
  font-size: 0.9rem;
  font-weight: 700;
}

.fetch-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem;
  gap: 0.6rem;
}

.fetch-form input {
  min-height: 2.7rem;
  border: 1px solid var(--home-border);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  padding: 0 0.85rem;
  outline: none;
}

.fetch-form input:focus {
  border-color: #ff6d97;
}

.fetch-form button,
.role-link,
.chat .chat-bottom .uni-textarea .chat-input-scope .send-btn-icon[data-v-3fc3d0b2] {
  border: 0;
  border-radius: 0.85rem;
  background: #ff6d97;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.home-status {
  min-height: 1.5rem;
  margin-top: 0.7rem;
  color: #c5c5c5;
  font-size: 0.85rem;
  line-height: 1.6;
}

.home-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.home-tools button,
.batch-import-actions button {
  min-height: 2.4rem;
  border: 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.home-tools button:hover,
.batch-import-actions button:hover {
  background: rgba(255, 109, 151, 0.28);
}

.batch-import-panel {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.batch-import-panel[hidden] {
  display: none !important;
}

.batch-import-panel textarea {
  width: 100%;
  min-height: 8rem;
  border: 1px solid var(--home-border);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  padding: 0.75rem 0.85rem;
  resize: vertical;
  outline: none;
}

.batch-import-panel textarea:focus,
.role-search-input:focus {
  border-color: #ff6d97;
}

.batch-import-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem;
  gap: 0.55rem;
}

.batch-import-actions button:first-child {
  background: #ff6d97;
}

.role-search-input {
  width: 100%;
  min-height: 2.5rem;
  margin-top: 0.85rem;
  border: 1px solid var(--home-border);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  padding: 0 0.85rem;
  outline: none;
}

.role-list {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
}

.role-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.role-link:hover {
  background: rgba(255, 109, 151, 0.28);
  transform: translateY(-1px);
}

.role-link small {
  color: #b9b9b9;
  font-size: 0.74rem;
}

.role-json-row { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) 2.5rem; align-items: center; gap: 0.5rem; }
.role-json-row .role-link { min-width: 0; overflow-wrap: anywhere; }
.edit-json-btn, .json-editor-dialog button { border: 1px solid var(--home-border); border-radius: 6px; background: #303238; color: #fff; cursor: pointer; padding: 0.5rem 0.7rem; }
.edit-json-btn { width: 2.5rem; height: 2.5rem; padding: 0.6rem; }
.edit-json-btn img { width: 100%; height: 100%; object-fit: contain; }
.json-editor-dialog button:disabled { opacity: 0.45; cursor: default; }
.json-editor-dialog { width: min(68rem, calc(100% - 2rem)); height: min(52rem, calc(100dvh - 2rem)); padding: 1rem; border: 1px solid var(--home-border); border-radius: 8px; background: #1e1f24; color: #fff; }
.json-editor-dialog[open] { display: flex; flex-direction: column; gap: 0.8rem; }
.json-editor-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.json-editor-header, .json-editor-footer { display: flex; align-items: center; gap: 0.6rem; }
.json-editor-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.json-editor-header button { flex: 0 0 2.5rem; height: 2.5rem; font-size: 1.25rem; }
#jsonEditorContent { flex: 1; min-height: 0; width: 100%; resize: none; padding: 0.8rem; border: 1px solid var(--home-border); border-radius: 6px; background: #111214; color: #e6e8ee; font: 0.85rem/1.6 Consolas, monospace; tab-size: 2; }
#jsonEditorContent:focus { outline: 1px solid #ff6d97; }
.json-editor-footer { flex-wrap: wrap; }
#jsonEditorStatus { flex: 1 1 12rem; min-width: 0; color: #9bdcb3; font-size: 0.8rem; overflow-wrap: anywhere; }
#jsonEditorStatus.is-error { color: #ff9dac; }

.empty-list {
  padding: 1rem;
  border: 1px dashed var(--home-border);
  border-radius: 0.9rem;
  color: #c5c5c5;
  text-align: center;
}

.home-page { background: #141518; padding: 2.5rem 1rem; }
.home-card { width: min(72rem, 100%); border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.index-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid #35363c; margin-bottom: 1.5rem; }
.index-brand { color: #8aadb7; font-size: 0.7rem; font-weight: 700; }
.index-heading h1 { margin: 0.35rem 0 0; font-size: 1.65rem; }
.index-back { color: #c9dce1; font-size: 0.85rem; text-decoration: none; white-space: nowrap; padding: 0.6rem; border-bottom: 1px solid #688c97; }
.home-page .fetch-form { max-width: 32rem; }
.home-page .fetch-form input, .home-page .fetch-form button, .home-page .role-search-input, .home-page .home-tools button { border-radius: 6px; }
.home-page .fetch-form button { background: #bb466b; }
.home-page .home-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-bottom: 1.4rem; border-bottom: 1px solid #35363c; }
.home-page .home-tools button { padding: 0.55rem 0.85rem; background: #25272c; font-size: 0.8rem; font-weight: 500; border: 1px solid #383b43; }
.home-page .home-tools button:hover { background: #34434a; border-color: #638594; }
.home-page .role-search-input { margin-top: 1.5rem; min-height: 2.8rem; background: #1d1f24; border-color: #3d4048; }
.index-list-heading { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; gap: 1rem; }
.index-list-heading h2 { margin: 0; }
#roleCount { font-size: 0.75rem; color: #8d969f; white-space: nowrap; }
.home-page .role-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.index-group-tools { display: flex; align-items: center; gap: 0.8rem; }
.role-group-dialog { width: min(24rem, calc(100% - 2rem)); padding: 1.25rem; background: #1e2025; color: #eef0f3; border: 1px solid #41464f; border-radius: 8px; }
.role-group-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.role-group-dialog h2 { margin: 0 0 1.2rem; font-size: 1.1rem; }
.role-group-dialog label { display: block; font-size: .85rem; margin-bottom: .5rem; }
.role-group-dialog input { width: 100%; min-width: 0; padding: .65rem; background: #141518; color: #fff; border: 1px solid #56616c; border-radius: 4px; }
.role-group-dialog form > div { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.role-group-dialog button { padding: .5rem 1rem; border: 1px solid #52656a; border-radius: 4px; background: #2d4348; color: #fff; cursor: pointer; }
#newRoleGroupBtn, .role-group-heading button { width: 2rem; height: 2rem; flex: 0 0 2rem; padding: 0.45rem; background: #25272c; border: 1px solid #41464f; border-radius: 6px; color: #d2e3e7; cursor: pointer; }
#newRoleGroupBtn { font-size: 1.4rem; line-height: 1; padding: 0; }
.home-page #roleList { display: block; }
.role-group { margin-bottom: 0.5rem; border-top: 1px solid #41464f; transition: background 0.15s; }
.role-group[open] { margin-bottom: 1.5rem; }
.role-group > summary { cursor: pointer; list-style: none; min-height: 3.5rem; }
.role-group > summary::-webkit-details-marker { display: none; }
.role-group > summary::before { content: ''; width: 0.45rem; height: 0.45rem; flex: 0 0 0.45rem; margin: 0 0.35rem 0 0.15rem; border-right: 2px solid #8d969f; border-bottom: 2px solid #8d969f; transform: rotate(-45deg); }
.role-group[open] > summary::before { transform: rotate(45deg); }
.role-group > summary:focus-visible { outline: 2px solid #6eb7b1; outline-offset: 2px; }
.role-group-heading { display: flex; gap: 0.5rem; align-items: center; padding: 0.7rem 0; }
.role-group-heading h3 { margin: 0; font-size: 0.95rem; color: #c9dce1; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.role-group-heading > span { color: #8d969f; font-size: 0.75rem; }
.role-group-heading button img { width: 100%; height: 100%; object-fit: contain; }
.role-group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; min-height: 3rem; }
.group-empty { grid-column: 1 / -1; color: #6f7883; padding: 0.6rem 0; font-size: 0.8rem; }
.role-json-row[draggable="true"] { cursor: grab; }
.role-json-row.is-dragging { opacity: 0.4; }
.role-group.is-drop-target { background: #253c3e; outline: 2px solid #6eb7b1; outline-offset: 4px; }
@media (max-width: 760px) { .role-group-list { grid-template-columns: minmax(0, 1fr); } }
.home-page .role-json-row { grid-template-columns: minmax(0, 1fr) 2.3rem 2.3rem; border-bottom: 1px solid #303238; gap: 0.45rem; padding: 0.65rem 0; }
.home-page .role-link { background: transparent; padding: 0.4rem 0.35rem; border-radius: 4px; font-size: 0.86rem; line-height: 1.55; font-weight: 500; min-height: 4rem; align-content: center; }
.home-page .role-link:hover { background: #252a30; transform: none; }
.home-page .role-link small { font-size: 0.7rem; color: #969da7; }
.role-meta-separator { color: #50565f; padding: 0 0.35rem; }
.home-page .edit-json-btn, .delete-json-btn { width: 2.3rem; height: 2.3rem; border: 1px solid #363941; border-radius: 6px; background: #25272d; padding: 0.55rem; cursor: pointer; }
.delete-json-btn { background: #302126; border-color: #51313a; }
.delete-json-btn img { width: 100%; height: 100%; object-fit: contain; }
.delete-json-btn:hover { background: #5b2d37; border-color: #cc7184; }
.home-page .edit-json-btn:hover { background: #34434a; border-color: #638594; }
.delete-json-btn:disabled { opacity: 0.45; cursor: default; }
.home-page .empty-list { grid-column: 1 / -1; border-radius: 6px; }
@media (max-width: 760px) { .home-page .role-list { grid-template-columns: minmax(0, 1fr); } .home-page { padding: 1.5rem 1rem; } .index-heading h1 { font-size: 1.35rem; } }

.message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding: 0; min-height: 32px; }
#msglistview .message-actions > button[data-message-action] { box-sizing: border-box !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 32px !important; width: 32px !important; height: 32px !important; min-width: 32px !important; max-width: 32px !important; min-height: 32px !important; max-height: 32px !important; margin: 0 !important; padding: 7px !important; border: 1px solid #50545c !important; border-radius: 4px !important; background: #303238 !important; cursor: pointer; overflow: hidden !important; line-height: 1 !important; }
#msglistview .message-actions > button[data-message-action] > img { display: block !important; flex: 0 0 16px !important; width: 16px !important; height: 16px !important; min-width: 16px !important; max-width: 16px !important; min-height: 16px !important; max-height: 16px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; object-fit: contain !important; }
#msglistview .message-actions > button:hover { background: #454a52 !important; }
#msglistview .message-actions > button:focus-visible { outline: 2px solid #79b8ac; outline-offset: 2px; }
#msglistview .message-actions > button:disabled { opacity: .45; cursor: default; }
.message-edit-dialog { box-sizing: border-box; width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid #50545c; border-radius: 8px; background: #202226; color: #edf0f2; }
.message-edit-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.message-edit-dialog h2 { font-size: 18px; margin: 0 0 12px; }
.message-edit-dialog textarea { box-sizing: border-box; width: 100%; min-height: 40dvh; max-height: 65dvh; resize: vertical; padding: 12px; border: 1px solid #58616a; border-radius: 4px; background: #141619; color: #fff; font: inherit; }
.message-edit-dialog form > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.message-edit-dialog button { padding: 6px 14px; border: 1px solid #58616a; border-radius: 4px; background: #30353b; color: #fff; cursor: pointer; }

.chat-page[hidden],
.login-page[hidden],
.home-page[hidden] {
  display: none !important;
}

.chat[data-v-3fc3d0b2] {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #17181a;
}

.chat .page-header-scope[data-v-3fc3d0b2] {
  background: #17181a;
}

.local-back {
  color: inherit;
  text-decoration: none;
}

.chat .topTabbar .header-box .icon-back img {
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
}

.chat .topTabbar .local-action-box[data-v-3fc3d0b2] {
  justify-content: flex-end;
  min-width: 3.6rem;
  position: relative;
}

.local-menu-button,
.local-select-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
}

.local-menu-button {
  font: inherit;
}

.local-menu-button:active,
.local-select-button:active {
  transform: translateY(1px);
}

.local-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0.35rem;
  z-index: 50000;
  display: grid;
  width: min(17rem, calc(100vw - 1.4rem));
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  background: rgba(23, 24, 26, 0.96);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
  color: #fff;
  backdrop-filter: blur(12px);
}

.local-menu-panel[hidden] {
  display: none !important;
}

.local-menu-panel label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.local-menu-panel select,
.local-menu-panel input {
  width: 100%;
  min-height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: #1e1f24;
  color: #fff;
  padding: 0 0.55rem;
  outline: 0;
}

.local-menu-panel button,
.local-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  border: 0;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.local-menu-panel button:hover,
.local-menu-link:hover {
  background: rgba(255, 109, 151, 0.28);
}

.chat .topTabbar .header-center .header-role-img img {
  width: 1.5625rem;
  height: 1.5625rem;
  border-radius: 50%;
  object-fit: cover;
  background: #2c2e32;
}

.chat .topTabbar .header-roleName[data-v-3fc3d0b2] {
  color: #fff;
}

.role-sandbox-hidden {
  position: absolute;
  top: -99999px;
  left: 0;
  width: 1px;
  height: 1px;
}

.chat .chat-scope-box[data-v-3fc3d0b2] {
  position: absolute;
  inset: 0;
  background-color: #f6f6f6;
  background-position: center center;
  background-size: auto 100%;
  background-repeat: no-repeat;
}

.chat .chat-scope-box .scroll-view[data-v-3fc3d0b2] {
  position: absolute;
  top: 2.8125rem;
  bottom: 6.75rem;
  left: 0;
  right: 0;
  z-index: 999;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0);
  -webkit-overflow-scrolling: touch;
}

.chat .chat-scope-box .scroll-view .chat-body[data-v-3fc3d0b2] {
  min-height: 100%;
  padding-top: 0.6rem;
  padding-bottom: 6.75rem;
}

.chat .chat-scope-box .scroll-view .chat-body .item[data-v-3fc3d0b2] {
  align-items: flex-start;
  position: relative;
}

.message-pick-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0.42rem 0.28rem 0 0.12rem;
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.55);
}

.message-pick {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  accent-color: #ff6d97;
}

.chat .chat-scope-box .scroll-view .chat-body .item .avatar[data-v-3fc3d0b2] {
  flex: 0 0 2.4375rem;
  margin-right: 0.5rem;
}

.chat .chat-scope-box .scroll-view .chat-body .item.self .avatar[data-v-3fc3d0b2] {
  margin-right: 0;
  margin-left: 0.5rem;
}

.chat .chat-scope-box .scroll-view .chat-body .item .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat .chat-scope-box .scroll-view .chat-body .item .touch-scope[data-v-3fc3d0b2] {
  min-width: 0;
}

.chat .chat-scope-box .scroll-view .chat-body .item .touch-scope .content[data-v-3fc3d0b2] {
  color: var(--chat-content-font-color, #fff);
  line-height: 1.6;
  word-break: break-word;
  overflow: visible;
}

.chat .chat-scope-box .scroll-view .chat-body .item .touch-scope .content[data-v-3fc3d0b2] p {
  margin: 0 0 0.75rem;
}

.chat .chat-scope-box .scroll-view .chat-body .item .touch-scope .content[data-v-3fc3d0b2] p:last-child {
  margin-bottom: 0;
}

.chat .chat-bottom[data-v-3fc3d0b2],
.chat .chat-bottom .send-msg[data-v-3fc3d0b2] {
  background: #17181a;
}

.chat .chat-bottom[data-v-3fc3d0b2] {
  position: fixed !important;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20000;
  min-height: 5.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -0.75rem 1.5rem rgba(0, 0, 0, 0.32);
}

.chat .chat-bottom .send-msg[data-v-3fc3d0b2] {
  min-height: 5.35rem;
  margin: 0;
  padding: 0.72rem 0.85rem max(0.8rem, env(safe-area-inset-bottom));
}

.chat .chat-bottom .uni-textarea[data-v-3fc3d0b2] {
  width: 100%;
}

.chat .chat-bottom .uni-textarea .chat-input-scope[data-v-3fc3d0b2] {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.2rem;
  gap: 0.5rem;
  border: 1px solid #bd4b70 !important;
  border-radius: 16px !important;
  background: #1e1f22 !important;
  padding: 0 0.65rem;
}

.chat .chat-bottom .uni-textarea .chat-input-scope textarea[data-v-3fc3d0b2] {
  position: static !important;
  display: block !important;
  height: 52px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  margin: 0 !important;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 2.65rem;
  max-height: 10rem;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--input-font-color, #fff);
  line-height: 1.55;
  padding: 0.65rem 0.25rem;
}

.chat .chat-bottom .uni-textarea .chat-input-scope .send-btn-icon[data-v-3fc3d0b2] {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  display: grid !important;
  place-items: center;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

#fakeSendBtn img { display: block !important; width: 24px !important; height: 24px !important; max-width: none !important; pointer-events: none; }
#fakeSendBtn:disabled { opacity: 0.4; cursor: wait; }
#fakeSendBtn:focus-visible { outline: 2px solid #ff82a6; outline-offset: 1px; }

.local-toast {
  position: fixed;
  left: 50%;
  bottom: 6.5rem;
  z-index: 30000;
  max-width: min(34rem, calc(100vw - 2rem));
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.35);
  font-size: 0.86rem;
  transform: translateX(-50%);
}

pre {
  white-space: break-spaces;
}

@media (max-width: 640px) {
  .fetch-form {
    grid-template-columns: 1fr;
  }

  .home-tools,
  .batch-import-actions {
    grid-template-columns: 1fr;
  }

  .chat .chat-scope-box .scroll-view[data-v-3fc3d0b2] {
    bottom: 6.25rem;
  }
}

/* ===== 总结设置面板 ===== */
.summary-panel {
  position: fixed;
  inset: 0;
  z-index: 60000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.summary-panel[hidden] {
  display: none !important;
}

.summary-panel-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.summary-panel-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1rem 1.1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.1rem;
  background: rgba(23, 24, 26, 0.98);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
  color: #fff;
}

.summary-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.summary-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.summary-panel-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.summary-panel-close:hover {
  background: rgba(255, 109, 151, 0.35);
}

.summary-panel-body {
  display: grid;
  gap: 0.6rem;
}

.summary-panel-body label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.summary-panel-body input,
.summary-panel-body select {
  width: 100%;
  min-height: 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: #1e1f24;
  color: #fff;
  padding: 0 0.6rem;
  outline: 0;
  font-size: 0.84rem;
}

.summary-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.summary-grow {
  flex: 1 1 auto;
  min-width: 0;
}

.summary-mini-btn {
  flex: 0 0 auto;
  min-height: 2.3rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.summary-mini-btn:hover {
  background: rgba(255, 109, 151, 0.3);
}

.summary-save-row,
.summary-action-row {
  display: flex;
  gap: 0.5rem;
}

.summary-panel-body button {
  flex: 1 1 0;
  min-height: 2.3rem;
  border: 0;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.summary-panel-body button:hover {
  background: rgba(255, 109, 151, 0.3);
}

.summary-primary-btn {
  background: #ff6d97 !important;
}

.summary-divider {
  height: 1px;
  margin: 0.4rem 0;
  background: rgba(255, 255, 255, 0.14);
}

.summary-status {
  min-height: 1.4rem;
  font-size: 0.8rem;
  color: #c5c5c5;
  line-height: 1.5;
  word-break: break-word;
}

.summary-preview {
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e6e6e6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== 总结预览弹窗 ===== */
.summary-modal {
  position: fixed;
  inset: 0;
  z-index: 70000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.summary-modal[hidden] {
  display: none !important;
}

.summary-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.summary-modal-card {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.1rem;
  background: rgba(23, 24, 26, 0.98);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
  color: #fff;
  overflow: hidden;
}

.summary-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.summary-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.summary-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.9rem 1.1rem;
}

.summary-modal-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  font-size: 0.86rem;
  color: #e6e6e6;
}

.summary-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.summary-modal-footer button {
  flex: 1 1 0;
  min-height: 2.3rem;
  border: 0;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.summary-modal-footer button:hover {
  background: rgba(255, 109, 151, 0.3);
}

/* ===== 总结预览区 / 历史总结 ===== */
.summary-preview-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.summary-history-btn {
  min-height: 2rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(255, 109, 151, 0.5);
  border-radius: 0.65rem;
  background: rgba(255, 109, 151, 0.16);
  color: #ffd0de;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.summary-history-btn:hover {
  background: rgba(255, 109, 151, 0.34);
}

.summary-history-list {
  display: grid;
  gap: 0.7rem;
}

.summary-history-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
}

.summary-history-item-meta {
  margin-bottom: 0.4rem;
  color: #9aa0a6;
  font-size: 0.74rem;
}

.summary-history-item-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  font-size: 0.84rem;
  color: #e6e6e6;
}

.summary-history-empty {
  text-align: center;
  color: #9aa0a6;
  padding: 1.5rem 0;
  font-size: 0.86rem;
}
.home-page .role-json-row .json-file-mark { display: none; }
