:root {
  color: #e8fff6;
  background: #061713;
  --app-font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-family: var(--app-font-family);
  font-synthesis: none;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1080px;
  min-height: 720px;
  font-family: var(--app-font-family);
  background:
    radial-gradient(circle at 16% 4%, rgba(82, 234, 216, 0.14), transparent 30rem),
    radial-gradient(circle at 82% 0%, rgba(255, 226, 122, 0.08), transparent 24rem),
    linear-gradient(135deg, #061713 0%, #071f19 48%, #04110f 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.loading,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-panel,
.topbar,
.side,
.chat {
  border: 1px solid rgba(92, 230, 209, 0.28);
  background: rgba(5, 24, 20, 0.88);
  border-radius: 8px;
}

.auth-panel {
  width: min(480px, 100%);
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.eyebrow {
  margin: 0 0 6px;
  color: #53ddcb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.subtitle,
.muted {
  color: #94bdb2;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.btn,
.auth-tabs button,
.composer button,
.mini-form button,
.tiandao-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(92, 230, 209, 0.28);
  background: rgba(14, 45, 39, 0.9);
  color: #e8fff6;
  border-radius: 6px;
  padding: 10px 13px;
}

.auth-tabs button.active,
.primary,
.composer button {
  border-color: #52ead8;
  background: linear-gradient(180deg, rgba(28, 139, 123, 0.96), rgba(13, 82, 72, 0.96));
}

.auth-form,
.mini-form,
.tiandao-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #b9d9cf;
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(92, 230, 209, 0.28);
  outline: none;
  background: rgba(2, 13, 11, 0.72);
  color: #e8fff6;
  border-radius: 6px;
  padding: 11px 12px;
}

input:focus,
select:focus {
  border-color: #52ead8;
  box-shadow: 0 0 0 3px rgba(82, 234, 216, 0.12);
}

.error {
  color: #ffb1a3;
  margin: 0;
}

.notice {
  color: #ffe27a;
  margin: 0;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.session-expiry-warning {
  color: #ffb4a8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.with-badge {
  position: relative;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border: 1px solid rgba(255, 226, 122, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5a5a, #9f1717);
  color: #fff3d0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 0 5px;
  box-shadow: 0 0 12px rgba(255, 88, 88, 0.52);
}

.mention-badge {
  min-width: 28px;
  background: linear-gradient(135deg, #ffe27a, #bc8cff 55%, #52ead8);
  color: #150a1d;
  text-shadow: none;
  box-shadow: 0 0 16px rgba(188, 140, 255, 0.38);
  animation: mentionBadgePulse 1.6s ease-in-out infinite;
}

.workspace {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px minmax(520px, 1fr) 330px;
  gap: 10px;
}

.side,
.chat {
  min-height: 0;
  max-height: 100%;
  padding: 12px;
  overflow: auto;
}

.side {
  overflow-x: hidden;
}

.chat {
  display: grid;
  overflow: hidden;
}

.chat-world {
  grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr) auto;
}

.chat-direct {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.profile {
  text-align: center;
  padding: 12px 0 18px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.16);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  margin-top: 8px;
}

.avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid #52ead8;
  border-radius: 50%;
  background: rgba(82, 234, 216, 0.12);
  color: #ffe27a;
  font-size: 28px;
  font-weight: 800;
}

.block {
  margin-top: 12px;
  border: 1px solid rgba(92, 230, 209, 0.16);
  border-radius: 6px;
  background: rgba(6, 31, 26, 0.76);
  padding: 12px;
}

.block h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.side-feature-panel {
  padding: 8px;
}

.side-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.side-feature-grid .btn {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  white-space: nowrap;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 8px;
}

.section-title-row.no-top {
  margin-top: 0;
}

.section-title-row h4 {
  margin: 0;
}

.section-title-row h3 {
  margin: 0;
}

.count-badge {
  min-width: 26px;
  border: 1px solid rgba(82, 234, 216, 0.34);
  border-radius: 999px;
  background: rgba(82, 234, 216, 0.12);
  color: #52ead8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-align: center;
}

.kv {
  display: grid;
  gap: 6px;
  text-align: center;
}

.kv span {
  color: #9fcfc3;
  font-size: 13px;
}

.kv strong {
  color: #ffe27a;
  font-size: 18px;
  text-align: center;
}

.kv strong .supreme-realm-name {
  font-size: 1.18em;
  transform: translateY(1px);
}

.supreme-realm-name {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  min-width: 3.2em;
  margin: 0 2px;
  border-radius: 999px;
  padding: 2px 9px 3px;
  overflow: visible;
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.96) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 68%, rgba(255, 226, 122, 0.9) 0 1px, transparent 2px),
    linear-gradient(120deg, rgba(255, 77, 109, 0.22), rgba(82, 234, 216, 0.16), rgba(188, 140, 255, 0.22));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 10px rgba(255, 77, 206, 0.35),
    0 0 22px rgba(82, 234, 216, 0.32),
    0 0 38px rgba(255, 226, 122, 0.18);
  animation: supremeRealmBreath 3.8s ease-in-out infinite;
}

.supreme-realm-name::before,
.supreme-realm-name::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.supreme-realm-name::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(90deg, rgba(255, 77, 109, 0.72), rgba(255, 223, 93, 0.68), rgba(82, 234, 216, 0.7), rgba(88, 166, 255, 0.68), rgba(188, 140, 255, 0.72), rgba(255, 77, 206, 0.68));
  opacity: 0.52;
  filter: blur(7px);
  transform: scale(0.98);
  animation: supremeRealmAuraBreath 4.6s ease-in-out infinite;
}

.supreme-realm-name::after {
  inset: 1px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.2), transparent 54%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 44%, rgba(255, 255, 255, 0.12));
  mix-blend-mode: screen;
  opacity: 0.26;
  animation: supremeRealmInnerBreath 3.8s ease-in-out infinite;
}

.supreme-realm-name > span {
  position: relative;
  z-index: 1;
  color: transparent;
  background:
    linear-gradient(90deg, #fff6c4, #ff4d6d, #ffdf5d, #5dff9a, #52ead8, #58a6ff, #bc8cff, #ff4dce, #fff6c4);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 1.05em;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow:
    0 0 7px rgba(255, 246, 196, 0.88),
    0 0 14px rgba(255, 77, 109, 0.75),
    0 0 22px rgba(82, 234, 216, 0.7),
    0 0 36px rgba(188, 140, 255, 0.68);
  animation: supremeRealmGlow 6.5s ease-in-out infinite, supremeRealmTextBreath 3.8s ease-in-out infinite;
}

.message-meta .supreme-realm-name,
.friend-card small .supreme-realm-name,
.hover-grid .supreme-realm-name,
.leaderboard-row .supreme-realm-name,
.member-row .supreme-realm-name {
  padding: 1px 7px 2px;
  font-size: 0.98em;
}

.message-meta .supreme-realm-name::before,
.friend-card small .supreme-realm-name::before,
.hover-grid .supreme-realm-name::before,
.leaderboard-row .supreme-realm-name::before,
.member-row .supreme-realm-name::before {
  inset: -3px;
  filter: blur(3px);
}

.progress {
  display: block;
  width: 100%;
  height: 8px;
  padding: 0;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(92, 230, 209, 0.22);
  border-radius: 999px;
  background: rgba(2, 13, 11, 0.72);
}

.cultivation-progress::-webkit-progress-bar {
  background: rgba(2, 13, 11, 0.72);
}

.cultivation-progress::-webkit-progress-value {
  background: linear-gradient(90deg, #52ead8, #ffe27a);
}

.cultivation-progress::-moz-progress-bar {
  background: linear-gradient(90deg, #52ead8, #ffe27a);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.16);
}

.chat-header h2 {
  margin-bottom: 4px;
}

.chat-header p {
  color: #9fcfc3;
  margin-bottom: 0;
}

.message-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 4px 4px;
}

.message-search input {
  width: 100%;
  padding-right: 36px;
  background: rgba(2, 18, 15, 0.72);
}

.message-search span {
  color: #8dbfb4;
  font-size: 12px;
  white-space: nowrap;
}

.message-search .icon-clear {
  position: absolute;
  right: 86px;
  top: 50%;
  transform: translateY(-42%);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 1px solid rgba(92, 230, 209, 0.24);
  border-radius: 50%;
  background: rgba(7, 31, 28, 0.92);
  color: #b9d9cf;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}

.message-search .icon-clear:hover {
  border-color: rgba(255, 226, 122, 0.58);
  color: #ffe27a;
}

.anti-fraud-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 4px 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 226, 122, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(78, 54, 10, 0.78), rgba(28, 36, 20, 0.62));
  color: #ffeeb1;
  box-shadow: 0 0 18px rgba(255, 226, 122, 0.08);
}

.anti-fraud-banner strong {
  color: #ffe27a;
  white-space: nowrap;
}

.anti-fraud-banner span {
  color: #f3dfac;
  line-height: 1.5;
}

.channel-pill {
  border: 1px solid rgba(82, 234, 216, 0.5);
  border-radius: 999px;
  padding: 7px 12px;
  color: #52ead8;
  white-space: nowrap;
}

.channel-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(82, 234, 216, 0.2);
  border-radius: 999px;
  background: rgba(2, 18, 15, 0.64);
}

.channel-tabs button {
  min-width: 54px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9fcfc3;
  padding: 6px 10px;
}

.channel-tabs .nav-badge {
  height: 17px;
  min-width: 17px;
  font-size: 10px;
  margin-left: 4px;
}

.channel-tabs button.active {
  background: rgba(82, 234, 216, 0.18);
  color: #e8fff6;
  box-shadow: inset 0 0 0 1px rgba(82, 234, 216, 0.38);
}

.channel-tabs button:disabled {
  opacity: 0.45;
}

.messages-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.messages {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
}

.jump-bottom {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 4;
  width: auto;
  min-height: 34px;
  border: 1px solid rgba(82, 234, 216, 0.45);
  border-radius: 999px;
  background: rgba(4, 27, 25, 0.94);
  color: #e8fff6;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 18px rgba(82, 234, 216, 0.18);
}

.jump-bottom:hover {
  border-color: rgba(255, 226, 122, 0.68);
  color: #ffe27a;
}

.jump-bottom .nav-badge {
  margin: 0 2px;
}

.message {
  display: grid;
  grid-template-columns: 34px minmax(0, max-content);
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: calc(100% - 28px);
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 6px;
}

.message-bubble {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(92, 230, 209, 0.12);
  background: rgba(3, 16, 14, 0.68);
  border-radius: 6px;
  padding: 7px 10px;
}

.message-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  align-self: center;
  margin: 0;
  border: 1px solid rgba(255, 226, 122, 0.34);
  border-radius: 8px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 226, 122, 0.32), rgba(16, 53, 46, 0.92));
  color: #ffe27a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  flex: 0 0 auto;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.message-own {
  grid-template-columns: minmax(0, max-content) 34px;
  align-self: flex-end;
}

.message-own .message-avatar {
  grid-column: 2;
}

.message-own .message-bubble {
  grid-column: 1;
  grid-row: 1;
  border-color: rgba(82, 234, 216, 0.32);
  background: rgba(20, 92, 80, 0.82);
  border-top-right-radius: 2px;
}

.message-other {
  align-self: flex-start;
}

.message-other .message-bubble {
  border-color: rgba(92, 230, 209, 0.16);
  background: rgba(3, 16, 14, 0.72);
  border-top-left-radius: 2px;
}

.message-system {
  display: block;
  align-self: center;
  width: fit-content;
  max-width: calc(100% - 36px);
  border-radius: 6px;
}

.message-system-clean {
  border: 1px solid rgba(92, 230, 209, 0.12);
  background: rgba(3, 16, 14, 0.68);
  padding: 6px 12px;
}

.message-system-clean .message-body-row {
  display: block;
}

.message-session-notice {
  border-color: rgba(82, 234, 216, 0.24);
  background: rgba(7, 48, 42, 0.72);
  color: #d9fff8;
  padding: 5px 9px;
}

.message-session-notice .message-body-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.message-session-notice p {
  margin: 0;
}

.session-notice-private {
  flex: 0 0 auto;
  color: #8fcfc3;
  font-size: 10px;
  white-space: nowrap;
}

.message.system,
.message.tiandao,
.message.punishment,
.message.breakthrough,
.message.reward,
.message.blessing {
  border-color: rgba(255, 226, 122, 0.35);
  background: rgba(70, 53, 10, 0.24);
}

.message.punishment {
  border-color: rgba(255, 97, 97, 0.38);
  background: rgba(92, 16, 16, 0.24);
}

.message-tiandao-admin {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message-tiandao-admin .message-bubble {
  border-color: rgba(255, 59, 59, 0.72);
  background:
    linear-gradient(135deg, rgba(126, 16, 20, 0.92), rgba(67, 8, 12, 0.88)),
    radial-gradient(circle at 18% 0%, rgba(255, 226, 122, 0.18), transparent 44%);
  box-shadow:
    0 0 0 1px rgba(255, 189, 122, 0.16) inset,
    0 0 18px rgba(255, 59, 59, 0.3),
    0 12px 34px rgba(0, 0, 0, 0.34);
}

.message-tiandao-admin .message-meta,
.message-tiandao-admin .message-uid-link,
.message-tiandao-admin .message-actions button {
  color: #ffd2d2;
}

.message-tiandao-admin .message-user-link,
.message-tiandao-admin .tiandao-name {
  color: #fff0c4;
  text-shadow: 0 0 12px rgba(255, 226, 122, 0.46), 0 0 18px rgba(255, 59, 59, 0.42);
}

.message-tiandao-admin p {
  color: #fff7f2;
}

.message.reward {
  border-color: rgba(88, 166, 255, 0.38);
  background: rgba(22, 49, 88, 0.26);
}

.message.blessing {
  border-color: rgba(188, 140, 255, 0.42);
  background: rgba(62, 36, 92, 0.26);
}

.message-mentioned-me {
  border-color: rgba(255, 226, 122, 0.68);
  box-shadow: 0 0 0 1px rgba(255, 226, 122, 0.12), 0 0 24px rgba(255, 226, 122, 0.16);
}

.message-flash {
  animation: messageFlash 1.2s ease;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  align-items: center;
  color: #9fcfc3;
  font-size: 11px;
  margin-bottom: 3px;
}

.message-own .message-meta {
  justify-content: flex-end;
}

.message-own .message-meta time {
  margin-left: 0;
}

.message-own p {
  text-align: left;
}

.message-meta span {
  color: #52ead8;
  font-weight: 700;
}

.message-user-link,
.message-uid-link {
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #52ead8;
  font-size: inherit;
  font-weight: 800;
  line-height: 1.2;
  padding: 0 2px;
  text-align: left;
  cursor: pointer;
}

.message-uid-link {
  color: #9fcfc3;
  font-weight: 700;
}

.message-user-link:hover,
.message-uid-link:hover,
.message-user-link:focus-visible,
.message-uid-link:focus-visible {
  background: rgba(82, 234, 216, 0.12);
  color: #ffe27a;
  box-shadow: 0 0 0 1px rgba(82, 234, 216, 0.24);
}

.message-meta .org-badge,
.org-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 226, 122, 0.52);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 226, 122, 0.18), rgba(188, 140, 255, 0.18)),
    rgba(27, 20, 45, 0.82);
  color: #ffe27a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  padding: 1px 6px;
  text-shadow: 0 0 10px rgba(255, 226, 122, 0.38);
  vertical-align: middle;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 151, 112, 0.52);
  border-radius: 999px;
  background: rgba(86, 30, 18, 0.78);
  color: #ffc8b8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  padding: 1px 6px;
}

.status-shadowed {
  border-color: rgba(188, 140, 255, 0.52);
  background: rgba(52, 28, 80, 0.78);
  color: #e3d1ff;
}

.status-banned {
  border-color: rgba(255, 97, 97, 0.58);
  background: rgba(92, 16, 16, 0.78);
  color: #ffc1c1;
}

.message-meta time {
  margin-left: auto;
  white-space: nowrap;
}

.message p {
  margin-bottom: 0;
  line-height: 1.32;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.message-body-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 6px;
}

.message-body-content {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

.message-body-content p {
  display: inline;
}

.reply-quote {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 4px 0 5px;
  border: 1px solid rgba(82, 234, 216, 0.22);
  border-left: 3px solid rgba(255, 226, 122, 0.72);
  border-radius: 5px;
  background: rgba(1, 10, 9, 0.34);
  color: #d8fff7;
  padding: 5px 7px;
  text-align: left;
  cursor: pointer;
}

.reply-quote span,
.reply-composer span {
  display: block;
  color: #ffe27a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.reply-quote p,
.reply-composer p {
  margin: 2px 0 0;
  color: #9fcfc3;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-quote:hover,
.reply-quote:focus-visible {
  border-color: rgba(255, 226, 122, 0.54);
  background: rgba(255, 226, 122, 0.08);
}

.message-actions {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  margin-top: 0;
  flex: 0 0 auto;
  vertical-align: baseline;
}

.mention-self-label {
  border: 1px solid rgba(255, 226, 122, 0.46);
  border-radius: 999px;
  background: rgba(255, 226, 122, 0.12);
  color: #ffe27a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  padding: 2px 7px;
}

.message-actions button {
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #8dbfb4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 0 2px;
}

.message-actions button:hover,
.message-actions button:focus-visible {
  color: #52ead8;
  background: rgba(82, 234, 216, 0.08);
}

.mention-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 0;
  margin: 0 2px;
  border: 1px solid rgba(188, 140, 255, 0.42);
  border-radius: 999px;
  background: rgba(188, 140, 255, 0.1);
  color: #e6d5ff;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  padding: 0 6px;
  vertical-align: baseline;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(188, 140, 255, 0.12);
}

.mention-link:hover,
.mention-link:focus-visible {
  border-color: rgba(255, 226, 122, 0.64);
  color: #fff3ba;
  background: rgba(255, 226, 122, 0.12);
  box-shadow: 0 0 18px rgba(255, 226, 122, 0.22);
}

.search-hit {
  border-radius: 4px;
  background: rgba(255, 226, 122, 0.28);
  color: #fff6c4;
  font-weight: 900;
  padding: 0 3px;
  box-shadow: 0 0 12px rgba(255, 226, 122, 0.16);
}

.composer {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 68px;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(92, 230, 209, 0.16);
}

.composer-private {
  grid-template-columns: 30px minmax(0, 1fr) 68px 84px;
}

.reply-composer {
  position: relative;
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid rgba(188, 140, 255, 0.32);
  border-left: 3px solid rgba(188, 140, 255, 0.72);
  border-radius: 6px;
  background: rgba(24, 13, 35, 0.42);
  padding: 7px 38px 7px 10px;
}

.reply-composer .icon-clear {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
}

.privacy-form {
  gap: 14px;
}

.privacy-form label {
  display: grid;
  gap: 6px;
}

.privacy-form label > small {
  color: #9fcfc3;
  line-height: 1.35;
}

.privacy-form .toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-form .toggle-row input {
  flex: 0 0 auto;
}

.privacy-form .toggle-row span {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.privacy-form .toggle-row small {
  color: #9fcfc3;
  line-height: 1.3;
}

.blacklist-panel {
  margin-top: 14px;
}

.font-settings-form {
  margin-top: 14px;
}

.privacy-form .font-picker-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.font-picker-row select {
  min-width: 0;
}

.font-picker-row .btn {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
  white-space: nowrap;
}

.font-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.font-actions .btn {
  width: auto;
}

@media (max-width: 760px) {
  .privacy-form .font-picker-row {
    grid-template-columns: auto minmax(150px, 1fr);
  }
}

.blacklist-list {
  display: grid;
  gap: 8px;
}

.blacklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 97, 97, 0.18);
  border-radius: 8px;
  background: rgba(54, 16, 18, 0.32);
  padding: 10px;
}

.blacklist-row > div {
  display: grid;
  gap: 4px;
}

.blacklist-row small {
  color: #9fcfc3;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(92, 230, 209, 0.18);
  border-radius: 6px;
  background: rgba(3, 16, 14, 0.46);
  padding: 12px;
}

.toggle-row input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: #52ead8;
}

.realm-privilege-admin-row .toggle-row {
  gap: 4px;
  padding: 4px;
}

.toggle-row span {
  display: grid;
  gap: 4px;
}

.toggle-row strong {
  color: #e8fff6;
}

.toggle-row small {
  color: #8dbfb4;
  line-height: 1.45;
}

.composer input {
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emoji-toggle {
  min-height: 44px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.emoji-toggle.active {
  border-color: rgba(255, 226, 122, 0.6);
  color: #fff2b8;
  background: rgba(255, 226, 122, 0.12);
  box-shadow: 0 0 18px rgba(255, 226, 122, 0.18);
}

.emoji-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(92, 230, 209, 0.2);
  border-radius: 6px;
  background: rgba(3, 16, 14, 0.72);
  padding: 9px;
  box-shadow: inset 0 0 22px rgba(92, 230, 209, 0.06);
}

.emoji-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.emoji-tabs button {
  min-height: 26px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 12px;
}

.emoji-tabs button.active {
  border-color: rgba(255, 226, 122, 0.58);
  color: #ffe27a;
  background: rgba(255, 226, 122, 0.11);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(30px, 1fr));
  gap: 6px;
}

.emoji-option {
  min-height: 34px;
  padding: 0;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.emoji-option:hover,
.emoji-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(92, 230, 209, 0.5);
  background: rgba(92, 230, 209, 0.12);
}

.composer > button[type="submit"] {
  grid-column: 5;
}

.composer-private > button[type="submit"] {
  grid-column: 5;
}

.voice-toggle {
  grid-column: 6;
  display: none !important;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0;
  line-height: 1;
  user-select: none;
  touch-action: none;
}

.composer-private .voice-toggle {
  display: inline-grid !important;
  place-items: center;
}

.voice-toggle::before {
  content: "按住说话";
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.voice-toggle.recording {
  border-color: rgba(255, 97, 97, 0.75);
  color: #ffe1dd;
  background: rgba(124, 22, 22, 0.72);
  box-shadow: 0 0 18px rgba(255, 97, 97, 0.32);
  animation: recordingPulse 1s ease-in-out infinite;
}

.voice-toggle.recording::before {
  content: "松开发送";
}

.voice-toggle.requesting {
  border-color: rgba(255, 226, 122, 0.7);
  color: #ffe9a3;
  background: rgba(77, 60, 13, 0.72);
  box-shadow: 0 0 14px rgba(255, 226, 122, 0.22);
}

.voice-toggle.requesting::before {
  content: "等待授权";
}

.voice-message {
  display: grid;
  grid-template-columns: 22px minmax(160px, 260px) auto;
  align-items: center;
  gap: 9px;
  max-width: 340px;
}

.message-own .voice-message {
  margin-left: auto;
}

.voice-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffe27a;
  background: rgba(255, 226, 122, 0.12);
  box-shadow: 0 0 14px rgba(255, 226, 122, 0.18);
}

.voice-message audio {
  width: 100%;
  max-width: 260px;
  height: 34px;
}

.voice-message strong {
  color: #cceee7;
  font-size: 12px;
  white-space: nowrap;
}

.voice-broken {
  color: #ffb6a8;
}

.composer-sending input {
  border-color: rgba(255, 226, 122, 0.42);
  box-shadow: 0 0 0 2px rgba(255, 226, 122, 0.08);
}

.composer-hint {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  color: #8dbfb4;
  font-size: 12px;
  line-height: 1.4;
}

.composer-hint-left {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.clear-channel-btn {
  margin-left: 50px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid rgba(92, 230, 209, 0.22);
  background: rgba(4, 24, 22, 0.68);
  color: #9fcfc3;
  font-size: 11px;
  line-height: 1.2;
}

.clear-channel-btn:hover,
.clear-channel-btn:focus-visible {
  border-color: rgba(255, 226, 122, 0.55);
  color: #ffe27a;
  background: rgba(255, 226, 122, 0.1);
}

.composer-hint strong {
  color: #cceee7;
  font-weight: 800;
  white-space: nowrap;
}

.composer-hint.near-limit strong {
  color: #ffe27a;
}

.list {
  display: grid;
  gap: 8px;
}

.request-section {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 9px;
  border: 1px solid rgba(255, 226, 122, 0.22);
  border-radius: 8px;
  background: rgba(70, 53, 10, 0.18);
}

.request-section h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: #ffe27a;
  font-size: 14px;
}

.request-card {
  border-color: rgba(255, 226, 122, 0.32);
}

.scroll-list {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scroll-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.compact-list {
  max-height: 190px;
}

.item {
  width: 100%;
  border: 1px solid rgba(92, 230, 209, 0.12);
  color: inherit;
  text-align: left;
  border-radius: 6px;
  padding: 9px;
  background: rgba(5, 28, 24, 0.82);
}

.item:hover {
  background: rgba(18, 70, 60, 0.92);
}

.item strong,
.item span {
  color: #e8fff6;
  font-weight: 700;
}

.item em,
.item small {
  color: #9fcfc3;
  font-style: normal;
  font-size: 12px;
}

.item p {
  margin: 6px 0 0;
  color: #b9d9cf;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-form .wide {
  grid-column: 1 / -1;
}

.tiandao-form {
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(92, 230, 209, 0.12);
  padding-top: 12px;
}

.tiandao-form h4,
.tiandao-form .wide,
.tiandao-form button {
  grid-column: 1 / -1;
}

.tiandao-form h4 {
  color: #ffe27a;
  margin: 0;
}

.tiandao-section {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.tiandao-console {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

[data-tiandao-tabs] {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 5px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.16);
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 230, 209, 0.35) transparent;
}

[data-tiandao-tab] {
  position: relative;
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid rgba(92, 230, 209, 0.2);
  border-radius: 4px;
  background: rgba(2, 18, 15, 0.32);
  color: #b9d9cf;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

[data-tiandao-tab-label] {
  display: block;
  min-width: 0;
}

[data-tiandao-tab][aria-selected="true"] {
  border-color: rgba(255, 226, 122, 0.5);
  background: rgba(96, 68, 16, 0.34);
  color: #ffe27a;
}

[data-tiandao-tab]:hover,
[data-tiandao-tab]:focus-visible {
  border-color: rgba(92, 230, 209, 0.62);
  background: rgba(14, 76, 66, 0.52);
  color: #e8fff6;
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(92, 230, 209, 0.16);
}

[data-tiandao-pending-badge] {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  width: 6px;
  min-width: 6px;
  height: 6px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #ff6161;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.tiandao-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tiandao-summary article {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(92, 230, 209, 0.15);
  border-radius: 8px;
  background: rgba(2, 18, 15, 0.58);
}

.tiandao-summary b {
  color: #ffe27a;
  font-size: 18px;
}

.tiandao-summary span {
  color: #b9d9cf;
  font-size: 12px;
}

.governance-quality {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.governance-quality-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.governance-quality-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #b9d9cf;
  white-space: nowrap;
}

.governance-quality-toolbar select {
  width: 82px;
  height: 28px;
  min-height: 28px;
  padding-block: 2px;
}

.governance-quality-toolbar small {
  min-width: 0;
  overflow: hidden;
  color: #82afa5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.governance-quality-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-block: 1px solid rgba(92, 230, 209, .14);
}

.governance-quality-summary article {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 5px 6px;
  border-right: 1px solid rgba(92, 230, 209, .11);
}

.governance-quality-summary article:last-child {
  border-right: 0;
}

.governance-quality-summary span,
.governance-admin-row small {
  overflow: hidden;
  color: #83afa5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.governance-quality-summary b {
  overflow: hidden;
  color: #ffe27a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.governance-admin-list {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.governance-admin-entry {
  min-width: 0;
  border-bottom: 1px solid rgba(92, 230, 209, .12);
}

.governance-admin-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.4fr) repeat(7, minmax(62px, .75fr));
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 5px;
}

.governance-admin-row > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.governance-admin-row b {
  overflow: hidden;
  color: #dff8f2;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.governance-admin-identity b {
  color: #ff6b6b;
}

.governance-admin-labels {
  min-height: 22px;
  color: #7da99f;
  font-size: 10px;
}

.governance-admin-details {
  display: none;
}

.governance-quality-note {
  margin: 0;
  color: #86b1a7;
  font-size: 10px;
  line-height: 1.3;
}

.sensitive-rate-limit-monitor {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(92, 230, 209, .14);
}

.sensitive-rate-limit-head,
.sensitive-rate-limit-summary,
.sensitive-rate-limit-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sensitive-rate-limit-head {
  justify-content: space-between;
  gap: 8px;
}

.sensitive-rate-limit-head strong {
  color: #dff8f2;
  font-size: 12px;
}

.sensitive-rate-limit-head small {
  color: #83afa5;
  font-size: 10px;
}

.sensitive-rate-limit-summary {
  flex-wrap: wrap;
  gap: 5px 14px;
  color: #86b1a7;
  font-size: 10px;
}

.sensitive-rate-limit-summary b {
  color: #ffe27a;
  font-size: 11px;
}

.sensitive-rate-limit-summary em {
  margin-left: auto;
  color: #6edbbf;
  font-style: normal;
}

.sensitive-rate-limit-monitor.is-warning .sensitive-rate-limit-head strong,
.sensitive-rate-limit-monitor.is-warning .sensitive-rate-limit-summary em {
  color: #ff6b6b;
}

.sensitive-rate-limit-groups {
  display: grid;
  min-width: 0;
  border-block: 1px solid rgba(92, 230, 209, .1);
}

.sensitive-rate-limit-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 76px 66px;
  gap: 6px;
  min-height: 24px;
  padding: 3px 5px;
  border-bottom: 1px solid rgba(92, 230, 209, .08);
  font-size: 10px;
}

.sensitive-rate-limit-row:last-child {
  border-bottom: 0;
}

.sensitive-rate-limit-row span {
  overflow: hidden;
  color: #cfe9e3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sensitive-rate-limit-row b,
.sensitive-rate-limit-row small {
  color: #83afa5;
  font-size: 10px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.database-runtime-monitor {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(92, 230, 209, .14);
}

.database-runtime-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.database-runtime-head h4 {
  margin: 0;
  color: #dff8f2;
  font-size: 12px;
}

.database-runtime-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  border-block: 1px solid rgba(92, 230, 209, .1);
}

.database-runtime-cell {
  display: grid;
  align-content: start;
  gap: 1px;
  min-width: 0;
  min-height: 28px;
  padding: 4px 5px;
  border-right: 1px solid rgba(92, 230, 209, .08);
}

.database-runtime-cell:last-child {
  border-right: 0;
}

.database-runtime-cell-label {
  overflow: hidden;
  color: #83afa5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-runtime-cell-value {
  overflow: hidden;
  color: #ffe27a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiandao-grid {
  display: grid;
  gap: 10px;
}

.tiandao-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tiandao-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tiandao-system-stack {
  display: grid;
  gap: 8px;
}

#adminForm {
  grid-template-columns: minmax(150px, 1fr) 110px 120px auto;
  align-items: end;
}

#adminForm h4,
#adminForm .permission-check-row,
#adminForm .compact-note {
  grid-column: 1 / -1;
}

#adminForm button {
  grid-column: auto;
}

.grant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tiandao-card-form {
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 8px;
  background: rgba(2, 18, 15, 0.44);
  padding: 9px;
}

.tiandao-lookup-form {
  grid-template-columns: auto 150px auto;
  align-items: end;
  border-top: 0;
  padding-top: 0;
  margin-bottom: 0;
}

.tiandao-lookup-form h4,
.tiandao-lookup-form button {
  grid-column: auto;
}

.tiandao-section h3 {
  margin: 0;
  color: #e8fff6;
}

.tiandao-section h4 {
  margin: 0 0 7px;
  color: #e8fff6;
}

.tiandao-section > .muted {
  margin: -4px 0 0;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.permission-grid article {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 8px;
  background: rgba(2, 18, 15, 0.58);
}

.permission-grid strong {
  color: #ffe27a;
}

.permission-grid span {
  color: #b9d9cf;
  font-size: 13px;
}

.moderation-log-card {
  display: grid;
  gap: 6px;
  border-left: 3px solid rgba(255, 97, 97, 0.72);
}

.moderation-log-card code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 97, 97, 0.18);
  border-radius: 6px;
  background: rgba(42, 12, 12, 0.42);
  color: #ffd1c9;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  padding: 6px 8px;
  white-space: nowrap;
}

.avatar-review-panel {
  margin: 0 0 8px;
  padding: 7px;
  border: 1px solid rgba(255, 194, 76, 0.28);
  border-radius: 6px;
  background: rgba(32, 25, 10, 0.32);
}

.avatar-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.avatar-review-head h4,
.avatar-review-head small {
  margin: 0;
}

.avatar-review-head small {
  color: #cdbd87;
  font-size: 11px;
}

.avatar-review-list {
  display: grid;
  gap: 5px;
}

.media-review-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(2, 18, 15, 0.66);
}

.media-review-preview {
  width: 56px;
  height: 56px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 194, 76, 0.32);
  border-radius: 5px;
  background: #071612;
  color: #91aea6;
  font-size: 10px;
}

.media-review-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-review-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.media-review-title,
.media-review-labels,
.media-review-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.media-review-title {
  min-width: 0;
  flex-wrap: wrap;
}

.media-review-title strong {
  color: #f4f8f6;
}

.media-review-title span,
.media-review-title b,
.media-review-main small {
  color: #a9c7bf;
  font-size: 11px;
}

.media-review-title b {
  color: #ffd467;
}

.media-review-labels code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 194, 76, 0.13);
  color: #f2ce75;
  font-family: inherit;
  font-size: 10px;
}

.media-review-main p {
  margin: 0;
  color: #d7b7ad;
  font-size: 11px;
}

.media-review-actions {
  justify-content: flex-end;
  min-height: 28px;
}

.media-review-actions .btn {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 11px;
}

.media-review-actions > span,
.avatar-review-status {
  color: #ffd467;
  font-size: 11px;
}

@media (max-width: 600px) {
  .avatar-review-head {
    align-items: flex-start;
  }

  .media-review-card {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
  }

  .media-review-preview {
    grid-row: 1 / span 2;
  }

  .media-review-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.admin-log-card {
  border-left-color: rgba(255, 226, 122, 0.78);
}

.admin-log-card code {
  border-color: rgba(255, 226, 122, 0.22);
  background: rgba(45, 34, 9, 0.42);
  color: #ffe8a3;
}

.compact-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin: 4px 0 7px;
  color: #9fcfc3;
  font-size: 11px;
}

.compact-pager .btn {
  min-height: 24px;
  padding: 2px 7px;
  font-size: 11px;
}

.danger {
  border-color: rgba(255, 226, 122, 0.55) !important;
  background: rgba(96, 68, 16, 0.85) !important;
  color: #ffeeb1 !important;
}

.friend-card {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 3px 8px;
  align-items: center;
  border-left-width: 3px;
}

.friend-card strong,
.friend-card small,
.friend-card p,
.friend-card .contact-org-line {
  grid-column: 2;
}

.friend-card .tiandao-name,
.hover-head .tiandao-name {
  color: #ff3b3b;
  font-size: 17px;
  text-shadow: 0 0 12px rgba(255, 59, 59, 0.55);
}

.contact-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  min-width: 0;
  line-height: 1.25;
}

.contact-display-name,
.contact-name-line .org-badge,
.contact-name-line .inline-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  line-height: 1.2;
}

.contact-name-line .org-badge {
  margin-left: 2px;
  vertical-align: middle;
}

.inline-tag {
  display: inline-grid;
  place-items: center;
  margin-left: 0;
  padding: 1px 6px;
  border: 1px solid rgba(255, 226, 122, 0.42);
  border-radius: 999px;
  color: #ffe27a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
}

.contact-search {
  position: relative;
  margin: 10px 0 8px;
}

.contact-search input {
  width: 100%;
  padding-right: 34px;
  background: rgba(2, 18, 15, 0.82);
}

.contact-search .icon-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 1px solid rgba(92, 230, 209, 0.24);
  border-radius: 50%;
  background: rgba(7, 31, 28, 0.92);
  color: #b9d9cf;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}

.contact-search .icon-clear:hover {
  border-color: rgba(255, 226, 122, 0.58);
  color: #ffe27a;
}

.contact-org-line {
  min-width: 0;
}

.contact-org-line .org-badge,
.user-org-line .org-badge,
.leaderboard-row .org-badge {
  margin-top: 3px;
}

.presence-dot {
  grid-row: 1 / 3;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8a9a95;
  box-shadow: 0 0 0 3px rgba(138, 154, 149, 0.12);
}

.friend-card.online-male {
  border-left-color: #58a6ff;
  background: rgba(13, 38, 68, 0.72);
}

.friend-card.online-male .presence-dot {
  background: #58a6ff;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.68);
}

.friend-card.online-female {
  border-left-color: #ff8cc6;
  background: rgba(72, 25, 54, 0.68);
}

.friend-card.online-female .presence-dot {
  background: #ff8cc6;
  box-shadow: 0 0 12px rgba(255, 140, 198, 0.72);
}

.friend-card.online-unknown {
  border-left-color: #52ead8;
  background: rgba(6, 45, 39, 0.72);
}

.friend-card.online-unknown .presence-dot {
  background: #52ead8;
  box-shadow: 0 0 12px rgba(82, 234, 216, 0.62);
}

.friend-card.recent-active {
  border-left-color: #6fffe4;
  background: rgba(6, 45, 39, 0.62);
}

.friend-card.recent-active .presence-dot {
  background: #6fffe4;
  box-shadow: 0 0 10px rgba(111, 255, 228, 0.46);
}

.friend-card.away {
  border-left-color: #d8bd68;
  background: rgba(55, 47, 27, 0.62);
  color: #d8d0b1;
}

.friend-card.away .presence-dot {
  background: #d8bd68;
  box-shadow: 0 0 8px rgba(216, 189, 104, 0.32);
}

.friend-card.offline {
  border-left-color: #6b7672;
  background: rgba(35, 42, 40, 0.72);
  color: #b8c3bf;
}

.friend-card.offline .presence-dot {
  background: #7b8581;
}

.presence-text {
  font-weight: 800;
}

.presence-online {
  color: #7effe9;
  text-shadow: 0 0 10px rgba(126, 255, 233, 0.28);
}

.presence-recent {
  color: #b9fff4;
}

.presence-away {
  color: #ffe08a;
}

.presence-offline {
  color: #9ba9a4;
}

.contact-wrap {
  position: relative;
}

.contact-hover {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 12;
  width: min(250px, 100%);
  max-width: 100%;
  display: none;
  border: 1px solid rgba(92, 230, 209, 0.34);
  border-radius: 8px;
  background: rgba(3, 18, 15, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  padding: 10px;
  max-height: 220px;
  overflow: hidden;
}

.contact-wrap:hover .contact-hover,
.contact-wrap:focus-within .contact-hover {
  display: grid;
  gap: 9px;
}

.hover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.14);
  padding-bottom: 8px;
}

.hover-head strong {
  color: #e8fff6;
}

.hover-head span {
  color: #ffe27a;
  font-size: 12px;
}

.hover-grid {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 7px 10px;
  font-size: 13px;
}

.hover-grid span {
  color: #9fcfc3;
}

.hover-grid b {
  color: #e8fff6;
  font-weight: 700;
  min-width: 0;
}

.quick-admin {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  border-top: 1px solid rgba(255, 226, 122, 0.16);
  padding-top: 9px;
}

.quick-admin button {
  border: 1px solid rgba(255, 226, 122, 0.42);
  border-radius: 6px;
  background: rgba(96, 68, 16, 0.82);
  color: #ffeeb1;
  padding: 7px 8px;
}

.quick-admin button:hover {
  background: rgba(122, 30, 30, 0.88);
  border-color: rgba(255, 97, 97, 0.64);
}

.user-action-card {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.user-action-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(92, 230, 209, 0.18);
  border-radius: 8px;
  background: rgba(4, 34, 28, 0.7);
}

.user-action-head h3 {
  margin: 0 0 4px;
}

.user-action-head p {
  margin: 0;
}

.user-org-line {
  margin-top: 6px !important;
}

.user-action-grid {
  padding: 12px;
  border: 1px solid rgba(92, 230, 209, 0.16);
  border-radius: 8px;
  background: rgba(6, 31, 26, 0.58);
}

.profile-visibility-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr)) auto;
  align-items: end;
  gap: 5px;
}

.profile-visibility-row label {
  min-width: 0;
}

.profile-visibility-row select,
.profile-visibility-row .btn {
  min-height: 28px;
}

.profile-layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.profile-layer {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(92, 230, 209, 0.16);
  border-radius: 6px;
  background: rgba(6, 31, 26, 0.58);
}

.profile-layer > strong {
  display: block;
  margin-bottom: 3px;
  color: #8ce6d3;
  font-size: 12px;
}

.profile-layer > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  line-height: 1.35;
}

.profile-layer-hidden {
  background: rgba(19, 30, 28, 0.5);
}

.profile-honor-chip {
  color: #ffe38a;
}

.profile-achievement-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px;
  border: 1px solid rgba(140, 230, 211, 0.34);
  border-radius: 4px;
  color: #b8fff0;
  background: rgba(16, 78, 68, 0.5);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.dao-heart-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 220, 116, 0.42);
  border-radius: 5px;
  color: #ffe38a;
  background: rgba(82, 57, 17, 0.64);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.dao-heart-panel {
  display: grid;
  gap: 7px;
  width: min(680px, 100%);
}

.modal-card.modal-insight {
  width: min(700px, calc(100vw - 24px));
}

.insight-panel {
  display: grid;
  gap: 6px;
  width: 100%;
}

.insight-summary,
.insight-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.insight-summary > span,
.insight-rules > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(92, 230, 209, .2);
  background: rgba(4, 29, 25, .6);
}

.insight-summary small,
.insight-rules small {
  color: #8dbbb2;
  font-size: 10px;
}

.insight-summary strong,
.insight-rules b {
  overflow: hidden;
  color: #f3df9b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-history,
.insight-admin {
  border: 1px solid rgba(92, 230, 209, .18);
  background: rgba(3, 21, 18, .48);
}

.insight-history > summary,
.insight-admin > summary {
  padding: 6px 8px;
  color: #d8f6ef;
  cursor: pointer;
}

.insight-history > div {
  display: grid;
  gap: 1px;
  padding: 0 6px 6px;
}

.insight-history p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 4px 2px;
  border-top: 1px solid rgba(92, 230, 209, .1);
}

.insight-history p span {
  display: grid;
  min-width: 0;
}

.insight-history p small {
  overflow: hidden;
  color: #83aaa3;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-history p b {
  flex: 0 0 auto;
  color: #f3df9b;
  font-size: 11px;
}

.insight-admin {
  margin-bottom: 6px;
  border-color: rgba(243, 207, 114, .28);
}

.insight-admin-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr)) auto;
  align-items: end;
  gap: 5px;
  padding: 0 7px 7px;
}

.insight-admin-form label {
  min-width: 0;
}

.insight-admin-form input,
.insight-admin-form .btn {
  width: 100%;
  min-height: 30px;
  margin: 0;
}

.insight-admin-form .toggle-row {
  min-height: 30px;
  align-self: end;
}

.insight-admin-form .toggle-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

@media (max-width: 760px) {
  .sensitive-rate-limit-row {
    grid-template-columns: minmax(72px, 1fr) 62px 58px;
    gap: 3px;
    padding-inline: 2px;
  }

  .sensitive-rate-limit-summary {
    gap-inline: 8px;
  }

  .database-runtime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .database-runtime-grid .database-runtime-cell:last-child {
    grid-column: 1 / -1;
  }

  .insight-summary,
  .insight-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight-admin-form .btn {
    grid-column: 1 / -1;
  }
}

.dao-heart-display-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(150px, 220px) auto;
  align-items: center;
  gap: 5px;
}

.dao-heart-display-form .toggle-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dao-heart-display-form .toggle-row span {
  display: grid;
  gap: 1px;
}

.dao-heart-display-form select,
.dao-heart-display-form .btn {
  min-height: 30px;
}

.dao-heart-list {
  display: grid;
  gap: 4px;
}

.dao-heart-row {
  display: grid;
  grid-template-columns: minmax(135px, 0.9fr) minmax(100px, 1fr) 72px minmax(170px, 1.3fr);
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 5px 7px;
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 6px;
  background: rgba(6, 31, 26, 0.56);
}

.dao-heart-row > div:first-child {
  display: grid;
  gap: 1px;
}

.dao-heart-row span,
.dao-heart-row small {
  color: #a8bdb7;
  font-size: 11px;
  line-height: 1.25;
}

.dao-heart-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.dao-heart-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: #6ed8c2;
}

.dao-heart-progress.progress-1 i { width: 10%; }
.dao-heart-progress.progress-2 i { width: 20%; }
.dao-heart-progress.progress-3 i { width: 30%; }
.dao-heart-progress.progress-4 i { width: 40%; }
.dao-heart-progress.progress-5 i { width: 50%; }
.dao-heart-progress.progress-6 i { width: 60%; }
.dao-heart-progress.progress-7 i { width: 70%; }
.dao-heart-progress.progress-8 i { width: 80%; }
.dao-heart-progress.progress-9 i { width: 90%; }
.dao-heart-progress.progress-10 i { width: 100%; }

.dao-heart-history {
  border-top: 1px solid rgba(92, 230, 209, 0.14);
  padding-top: 5px;
}

.dao-heart-history p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin: 0;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 620px) {
  .profile-visibility-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-visibility-row .btn {
    grid-column: span 2;
  }

  .profile-layers {
    grid-template-columns: 1fr;
  }

  .dao-heart-display-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dao-heart-display-form .toggle-row {
    grid-column: span 2;
  }

  .dao-heart-row {
    grid-template-columns: minmax(120px, 1fr) 58px;
  }

  .dao-heart-progress,
  .dao-heart-row small {
    grid-column: span 2;
  }
}

.user-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-action-buttons [data-mention-user] {
  border-color: rgba(188, 140, 255, 0.42);
  color: #e3d1ff;
}

.user-action-admin {
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  border: 1px solid rgba(255, 226, 122, 0.16);
  border-radius: 8px;
  background: rgba(52, 29, 12, 0.42);
  padding: 10px;
}

.admin-status-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 226, 122, 0.18);
  border-radius: 8px;
  background: rgba(35, 28, 13, 0.42);
  padding: 12px;
}

.admin-status-panel.restricted {
  border-color: rgba(255, 97, 97, 0.34);
  background: rgba(57, 16, 16, 0.42);
}

.admin-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-status-head h4,
.risk-history h4 {
  margin: 0;
  color: #ffe27a;
}

.status-chip {
  border: 1px solid rgba(92, 230, 209, 0.28);
  border-radius: 999px;
  background: rgba(4, 34, 28, 0.72);
  color: #d8fff7;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  padding: 4px 9px;
}

.risk-history {
  display: grid;
  gap: 8px;
}

.risk-history article {
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 6px;
  background: rgba(2, 18, 15, 0.46);
  padding: 8px;
}

.risk-history article p {
  margin: 4px 0;
  line-height: 1.35;
}

.risk-history article small {
  color: #9fcfc3;
}

.report-form {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 97, 97, 0.18);
  border-radius: 8px;
  background: rgba(54, 16, 18, 0.34);
}

.report-form h4 {
  margin: 0;
  color: #ffb1b1;
}

.report-form label {
  display: grid;
  gap: 6px;
  color: #d4eee7;
  font-size: 12px;
}

.report-form textarea {
  min-height: 76px;
  resize: vertical;
}

.report-form .danger {
  justify-self: flex-start;
}

.report-evidence {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 226, 122, 0.18);
  border-radius: 6px;
  background: rgba(255, 226, 122, 0.07);
}

.report-evidence p {
  margin: 0;
  line-height: 1.28;
  color: #f4fff9;
}

.report-review-card {
  display: grid;
  gap: 7px;
}

.report-review-head,
.report-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  flex-wrap: wrap;
}

.report-review-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-status {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.report-status.pending {
  color: #ffe27a;
  background: rgba(255, 226, 122, 0.12);
}

.report-status.received {
  color: #8ee7ff;
  background: rgba(57, 190, 255, 0.12);
}

.report-status.valid {
  color: #8dffbf;
  background: rgba(85, 255, 160, 0.12);
}

.report-status.malicious {
  color: #ff9f95;
  background: rgba(255, 66, 52, 0.13);
}

.report-status.dismissed {
  color: #b7c5c1;
  background: rgba(183, 197, 193, 0.12);
}

.report-review-actions {
  justify-content: flex-start;
}

.report-note-line {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #cceee7;
  font-size: 12px;
}

.report-note-line input {
  min-height: 30px;
}

.report-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 226, 122, 0.24);
  background: rgba(255, 226, 122, 0.07);
}

.report-suggestion strong {
  color: #ffe27a;
}

.report-context summary {
  cursor: pointer;
  color: #8ee7ff;
  font-size: 11px;
}

.report-context-list {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.report-context-list p {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 4px 6px;
  background: rgba(2, 18, 15, 0.42);
}

.my-cases-panel,
.appeal-review-panel {
  display: grid;
  gap: 6px;
}

.my-case-card,
.appeal-review-card {
  display: grid;
  gap: 5px;
}

.my-case-card > div,
.appeal-review-card > div {
  display: grid;
  gap: 2px;
}

.case-appeal-form,
.appeal-review-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.high-risk-approval-panel,
.high-risk-approval-card {
  display: grid;
  gap: 5px;
}

.high-risk-review-form {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.appeal-review-form {
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto;
}

.case-timeline summary {
  cursor: pointer;
  color: #8ee7ff;
  font-size: 11px;
}

.case-timeline-list {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.case-timeline-list p {
  display: grid;
  grid-template-columns: minmax(145px, auto) minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 4px 6px;
  background: rgba(2, 18, 15, 0.42);
}

@media (max-width: 760px) {
  .case-appeal-form,
  .appeal-review-form,
  .high-risk-review-form {
    grid-template-columns: 1fr;
  }
}

.report-punish-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding-top: 2px;
}

.report-punish-actions > span {
  color: #ffe27a;
  font-size: 11px;
  font-weight: 800;
}

.report-punish-actions.is-locked > span {
  color: #aebbb8;
}

.report-risk-box {
  display: grid;
  flex-basis: 100%;
  gap: 4px;
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 6px;
  background: rgba(2, 18, 15, 0.36);
  padding: 6px;
}

.report-risk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #e8fff6;
  font-size: 12px;
}

.report-risk-head span {
  color: #9fcfc3;
  font-size: 11px;
}

.report-risk-box article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(92, 230, 209, 0.08);
  padding-top: 4px;
  font-size: 11px;
}

.report-risk-box article b {
  color: #ffe27a;
}

.report-risk-box article span {
  overflow: hidden;
  color: #d7eee8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-risk-box article small {
  color: #9fcfc3;
  white-space: nowrap;
}

.permission-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.permission-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: auto;
  min-width: 0;
  color: #d7eee8;
  font-size: 11px;
  white-space: nowrap;
}

.permission-check input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  accent-color: #5ce6d1;
}

.tiandao-permission-panel {
  display: grid;
  gap: 6px;
}

.tiandao-permission-form {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.tiandao-permission-form strong {
  color: #ffe27a;
  font-size: 12px;
}

.sect-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sect-head h3 {
  margin: 0 0 4px;
}

.sect-notice-box {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 226, 122, 0.22);
  border-radius: 8px;
  background: rgba(70, 53, 10, 0.18);
  padding: 10px;
  margin-bottom: 10px;
}

.sect-notice-box strong,
.sect-members h4 {
  color: #ffe27a;
}

.sect-notice-box p,
.sect-members h4 {
  margin: 0;
}

.sect-members {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sect-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  border-left-width: 3px;
  padding: 8px 9px;
}

.member-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.member-main:disabled {
  cursor: default;
}

.member-controls {
  display: grid;
  gap: 5px;
  justify-items: end;
  min-width: 280px;
}

.sect-role-form {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  gap: 5px;
  margin: 0;
}

.member-action-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.member-controls select,
.member-controls button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
}

.compact-danger {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.sect-member-hierarchy {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-left: 15px;
}

.sect-member-hierarchy::before {
  content: "";
  position: absolute;
  top: 17px;
  bottom: 48px;
  left: 5px;
  border-left: 1px solid rgba(82, 234, 216, 0.34);
}

.sect-role-tier {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 5px;
  background: rgba(2, 18, 15, 0.42);
}

.sect-role-tier::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -10px;
  width: 10px;
  border-top: 1px solid rgba(82, 234, 216, 0.34);
}

.sect-role-tier-summary {
  display: grid;
  grid-template-columns: 10px minmax(82px, auto) 64px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 4px 7px;
  list-style: none;
  cursor: pointer;
}

.sect-role-tier-summary::-webkit-details-marker {
  display: none;
}

.sect-role-tier-summary::after {
  content: "+";
  position: absolute;
  right: 7px;
  color: #8fcfc3;
  font-weight: 900;
}

.sect-role-tier[open] > .sect-role-tier-summary::after {
  content: "−";
}

.sect-role-tier-marker {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 226, 122, 0.72);
  border-radius: 50%;
  background: #0a2c26;
  box-shadow: 0 0 7px rgba(255, 226, 122, 0.22);
}

.sect-role-tier-summary strong {
  color: #f8e7a1;
  font-size: 12px;
}

.sect-role-tier-summary b {
  color: #d8fff7;
  font-size: 11px;
}

.sect-role-tier-summary small {
  min-width: 0;
  padding-right: 18px;
  overflow: hidden;
  color: #7fa89f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-role-tier-subcounts {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sect-role-tier-subcounts span {
  flex: 0 0 auto;
}

.sect-role-tier-subcounts i {
  color: #557d75;
  font-style: normal;
}

.sect-role-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 5px;
  padding: 0 6px 6px;
}

.sect-role-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 5px 7px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  color: #6f938b;
  font-size: 11px;
  text-align: center;
}

.sect-member-node {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 5px 6px;
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 5px;
  background: rgba(4, 32, 27, 0.72);
  color: inherit;
  text-align: left;
}

.sect-member-node.is-selected {
  border-color: rgba(255, 226, 122, 0.72);
  background: rgba(72, 58, 12, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 226, 122, 0.12), 0 0 12px rgba(255, 226, 122, 0.1);
}

.sect-member-node-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(82, 234, 216, 0.28);
  border-radius: 50%;
  background: rgba(6, 48, 41, 0.92);
  color: #ffe27a;
  font-size: 11px;
  font-weight: 900;
}

.sect-member-node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sect-member-node-main,
.sect-member-node-side {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sect-member-node-main strong,
.sect-member-node-main small,
.sect-member-node-side b,
.sect-member-node-side small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-member-node-main small,
.sect-member-node-side {
  color: #9fcfc3;
  font-size: 10px;
}

.sect-member-node-side {
  max-width: 88px;
  text-align: right;
}

.sect-member-node-side b {
  color: #d8fff7;
  font-size: 10px;
}

.sect-member-management {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
  padding: 7px;
  border: 1px solid rgba(255, 226, 122, 0.34);
  border-radius: 5px;
  background: rgba(37, 31, 9, 0.48);
}

.sect-member-management-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.sect-member-management-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sect-member-management-head small {
  min-width: 0;
  overflow: hidden;
  color: #9fcfc3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-member-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.sect-member-management-group {
  display: flex;
  align-items: end;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 4px;
  background: rgba(3, 24, 20, 0.58);
}

.sect-member-management-group label {
  display: grid;
  grid-template-columns: auto minmax(92px, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1 1 150px;
}

.sect-member-discipline {
  display: grid;
  grid-template-columns: minmax(125px, 1fr) auto auto;
  align-items: end;
}

.sect-member-control-label {
  align-self: center;
  color: #9fcfc3;
  font-size: 11px;
  white-space: nowrap;
}

.sect-member-management-group select,
.sect-member-management-group button,
.sect-member-management-head button {
  height: 28px;
  min-height: 28px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.sect-member-transfer {
  border-color: rgba(255, 97, 97, 0.32);
}

.sect-member-selection-hint {
  margin: 2px 0 0;
  padding: 6px 8px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  color: #7fa89f;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 760px) {
  .governance-quality-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .governance-quality-summary article:nth-child(4) {
    border-right: 0;
  }

  .governance-admin-row {
    grid-template-columns: minmax(80px, 1.35fr) repeat(5, minmax(39px, .68fr));
    gap: 3px;
    padding-inline: 2px;
  }

  .governance-admin-secondary {
    display: none !important;
  }

  .governance-admin-row b {
    font-size: 10px;
  }

  .governance-admin-row small,
  .governance-admin-labels {
    font-size: 9px;
  }

  .governance-admin-details {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 4px;
    color: #86b1a7;
    font-size: 9px;
  }

  .governance-admin-details summary {
    margin: 0;
    color: #d7ede8;
    font-size: 9px;
    white-space: nowrap;
  }

  .governance-admin-details:not([open]) > span {
    display: none;
  }

  .sect-member-hierarchy {
    padding-left: 12px;
  }

  .sect-member-hierarchy::before {
    left: 4px;
  }

  .sect-role-tier::before {
    left: -8px;
    width: 8px;
  }

  .sect-role-tier-summary {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 5px;
  }

  .sect-role-tier-summary small {
    grid-column: 2 / -1;
    padding-right: 18px;
  }

  .sect-role-members {
    grid-template-columns: 1fr;
  }

  .sect-member-node-side {
    max-width: 76px;
  }

  .sect-member-management-grid {
    grid-template-columns: 1fr;
  }

  .sect-member-management-group {
    flex-wrap: wrap;
  }

  .sect-member-discipline {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto auto;
  }

  .sect-member-discipline label {
    grid-template-columns: auto minmax(68px, 1fr);
  }

  .sect-member-management-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.private-panel {
  display: grid;
  gap: 12px;
}

.private-unread-source {
  margin: 0;
  padding: 5px 8px;
  overflow: hidden;
  color: #ffd6d6;
  border-left: 2px solid #ff5f6d;
  background: rgba(255, 95, 109, 0.08);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.world-event-strip {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 214, 102, 0.32);
  border-radius: 5px;
  color: #dffcf5;
  background: rgba(24, 52, 47, 0.72);
  text-align: left;
}

.world-event-strip span,
.world-event-strip small { color: #9bcfc3; }
.world-event-strip strong { overflow: hidden; color: #ffe08a; text-overflow: ellipsis; white-space: nowrap; }

.world-event-panel,
.world-event-admin {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.world-event-panel > header,
.world-event-action,
.world-event-history > div {
  border: 1px solid rgba(92, 230, 209, 0.18);
  border-radius: 5px;
  background: rgba(3, 16, 14, 0.48);
  padding: 8px;
}

.world-event-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.world-event-panel > header div { display: grid; gap: 2px; min-width: 0; }
.world-event-panel > header small { color: #92bfb5; }
.world-event-result { color: #ffe08a; }

.heavenly-weekly-panel {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255, 214, 102, 0.22);
  border-radius: 5px;
  background: rgba(21, 28, 22, 0.64);
}

.heavenly-weekly-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
}

.heavenly-weekly-head > div { display: grid; gap: 1px; min-width: 0; }
.heavenly-weekly-head > div strong { color: #ffe08a; }
.heavenly-weekly-head > div small { color: #91beb4; }
.heavenly-weekly-head label { display: flex; align-items: center; gap: 5px; color: #a9d4ca; white-space: nowrap; }
.heavenly-weekly-head select { width: 150px; height: 28px; min-height: 28px; padding-block: 2px; }

.heavenly-weekly-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.heavenly-weekly-tabs button {
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid rgba(92, 230, 209, 0.16);
  border-radius: 4px;
  color: #a8d5cb;
  background: rgba(4, 31, 27, 0.62);
}

.heavenly-weekly-tabs button.active {
  border-color: rgba(255, 214, 102, 0.62);
  color: #fff1b7;
  background: rgba(92, 72, 16, 0.46);
}

.heavenly-weekly-ranking { display: grid; gap: 3px; min-width: 0; }

.heavenly-weekly-row {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 38px minmax(125px, 1.4fr) minmax(92px, .85fr) minmax(90px, .9fr) 48px 74px;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border: 1px solid rgba(92, 230, 209, 0.13);
  border-radius: 4px;
  color: #d9f3ed;
  background: rgba(5, 28, 24, 0.64);
  text-align: left;
}

.heavenly-weekly-row.is-viewer {
  border-color: rgba(255, 214, 102, 0.58);
  background: rgba(67, 55, 16, 0.42);
}

.heavenly-weekly-labels { min-height: 22px; color: #7faea4; font-size: 10px; pointer-events: none; }
.heavenly-weekly-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heavenly-weekly-row > b { color: #ffe08a; }
.heavenly-weekly-identity { display: flex; align-items: baseline; gap: 5px; }
.heavenly-weekly-identity small { overflow: hidden; color: #86b5ab; text-overflow: ellipsis; white-space: nowrap; }
.heavenly-weekly-count { color: #8fbeb4; text-align: right; }
.heavenly-weekly-value { color: #72dcc9; text-align: right; }
.heavenly-weekly-viewer { margin: 0; color: #ffe08a; font-size: 11px; text-align: right; }

.world-event-choice,
.world-event-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.world-event-choice button { min-height: 32px; }
.world-event-stats span { display: grid; padding: 5px; color: #9bcfc3; border-left: 2px solid rgba(255, 214, 102, 0.55); }
.world-event-stats strong { color: #eefcf9; }

.world-event-discourse {
  display: grid;
  gap: 7px;
}

.world-event-discourse-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.world-event-discourse-summary span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 5px 6px;
  border-left: 2px solid rgba(255, 214, 102, 0.55);
  color: #8fbcb3;
}

.world-event-discourse-summary strong {
  overflow: hidden;
  color: #eefcf9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-event-discourse-rule {
  margin: 0;
  color: #9bcfc3;
  font-size: 11px;
}

.world-event-discourse-ranking {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.world-event-discourse-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 48px 42px 54px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 27px;
  padding: 3px 6px;
  border: 1px solid rgba(92, 230, 209, 0.13);
  border-radius: 4px;
  background: rgba(5, 28, 24, 0.62);
}

.world-event-discourse-row.is-viewer {
  border-color: rgba(255, 214, 102, 0.5);
  background: rgba(65, 54, 15, 0.32);
}

.world-event-discourse-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-event-discourse-row b { color: #ffe08a; }
.world-event-discourse-row span { color: #b8dbd4; text-align: right; }
.world-event-discourse-row em { color: #72dcc9; font-size: 10px; font-style: normal; text-align: right; }

.world-event-discourse-result {
  padding: 5px 6px;
  border: 1px solid rgba(255, 214, 102, 0.2);
  border-radius: 5px;
}

.world-event-discourse-result > div { margin-top: 5px; }

.world-event-tribulation {
  display: grid;
  gap: 7px;
}

.world-event-tribulation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.world-event-tribulation-summary span {
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  border-left: 2px solid rgba(122, 181, 255, 0.58);
  color: #9fc3d9;
}

.world-event-tribulation-summary strong { color: #f2fbff; }
.world-event-tribulation-rule { margin: 0; color: #9bcfc3; font-size: 11px; }

.world-event-tribulation-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.world-event-tribulation-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 58px 68px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 50px;
  padding: 5px 6px;
  border: 1px solid rgba(122, 181, 255, 0.25);
  border-radius: 5px;
  background: rgba(7, 27, 39, 0.7);
}

.world-event-tribulation-row.is-closed { opacity: 0.78; }

.world-event-tribulation-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 122, 0.35);
  border-radius: 50%;
  background: rgba(7, 45, 54, 0.9);
}

.world-event-tribulation-avatar img { width: 100%; height: 100%; object-fit: cover; }
.world-event-tribulation-identity { display: grid; gap: 2px; min-width: 0; }
.world-event-tribulation-identity strong,
.world-event-tribulation-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-event-tribulation-identity small { color: #9fc3d9; }
.world-event-tribulation-progress { display: grid; gap: 1px; text-align: center; }
.world-event-tribulation-progress strong { color: #ffe08a; }
.world-event-tribulation-progress small { color: #8fbcb3; font-size: 10px; }
.world-event-tribulation-action { display: grid; align-items: center; }
.world-event-tribulation-action .btn { width: 100%; min-height: 28px; padding: 3px 6px; }
.world-event-tribulation-status { color: #9fc3d9; text-align: center; }
.world-event-tribulation-status.is-complete { color: #ffe08a; }
.world-event-tribulation-status.is-witnessed { color: #72dcc9; }

.world-event-history > div { display: grid; gap: 5px; margin-top: 6px; }
.world-event-history p { min-width: 0; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.world-event-history p > span { min-width: 0; display: grid; gap: 2px; }
.world-event-history small { color: #8dbbb2; }

.world-event-schedule-form {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(190px, 1.35fr) 80px minmax(180px, 1.5fr) auto;
  gap: 6px;
  align-items: end;
}

@media (max-width: 760px) {
  .world-event-choice,
  .world-event-stats { grid-template-columns: 1fr; }
  .world-event-discourse-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-event-discourse-row { grid-template-columns: 24px minmax(0, 1fr) 42px 36px 48px; gap: 3px; padding-inline: 4px; }
  .world-event-tribulation-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-event-tribulation-row { grid-template-columns: 32px minmax(0, 1fr) 48px 58px; gap: 4px; padding-inline: 4px; }
  .world-event-tribulation-avatar { width: 30px; height: 30px; }
  .heavenly-weekly-head { align-items: center; }
  .heavenly-weekly-head select { width: 126px; }
  .heavenly-weekly-row { grid-template-columns: 32px minmax(0, 1fr) minmax(72px, .8fr) 60px; gap: 4px; padding-inline: 4px; }
  .heavenly-weekly-sect,
  .heavenly-weekly-count { display: none; }
  .heavenly-weekly-identity { display: grid; gap: 0; }
  .heavenly-weekly-labels span:nth-of-type(3),
  .heavenly-weekly-labels span:nth-of-type(4) { display: none; }
  .world-event-schedule-form { grid-template-columns: 1fr; }
  .world-event-schedule-form > label,
  .world-event-schedule-form input,
  .world-event-schedule-form select,
  .world-event-schedule-form button { width: 100%; max-width: 100%; }
}

.private-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  border-left-width: 3px;
}

.private-row > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.private-row time {
  color: #9fcfc3;
  font-size: 12px;
}

.private-row small,
.private-row p {
  grid-column: 1 / -1;
}

.private-row p {
  margin-right: 34px;
}

.private-row .nav-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.title-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.title-row input[name="title"] {
  min-width: 0;
}

.sect-admin-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(360px, 1.25fr);
  gap: 8px;
  margin: 8px 0;
}

.sect-condition-box {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 9px 9px;
  border: 1px solid rgba(92, 230, 209, 0.22);
  border-radius: 7px;
  background: rgba(3, 21, 18, 0.44);
}

.sect-condition-box > strong {
  color: #ffe27a;
  font-size: 12px;
  line-height: 1.2;
}

.sect-title-form,
.sect-notice-form,
.sect-settings-form {
  align-items: end;
  margin: 0;
}

.sect-title-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sect-notice-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sect-settings-form {
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.2fr) auto;
}

.sect-history-box,
.sect-blacklist-box {
  display: grid;
  gap: 6px;
  margin: 7px 0;
}

.sect-history-card,
.sect-blacklist-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.sect-history-card small,
.sect-blacklist-card small {
  grid-column: 1 / -1;
}

.sect-blacklist-form {
  grid-template-columns: minmax(90px, 0.45fr) minmax(180px, 1fr) auto;
  align-items: end;
  margin: 0;
}

.sect-title-form label,
.sect-notice-form label,
.sect-settings-form label,
.sect-blacklist-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #cceee7;
  font-size: 12px;
}

.sect-title-form button,
.sect-notice-form button,
.sect-settings-form button,
.sect-blacklist-form button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .sect-admin-row,
  .sect-settings-form {
    grid-template-columns: 1fr;
  }

  .member-row {
    grid-template-columns: 1fr;
  }

  .member-controls {
    justify-items: stretch;
    min-width: 0;
  }

  .member-action-line {
    justify-content: flex-start;
  }
}

.compact-title-list {
  max-height: 220px;
}

.organization-title-add-form {
  grid-template-columns: auto minmax(180px, 260px) auto;
  align-items: center;
  margin-bottom: 7px;
}

.organization-title-add-form h4 {
  grid-column: auto;
  margin: 0;
  white-space: nowrap;
}

.organization-title-add-form label {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.organization-title-add-form button {
  grid-column: auto;
}

.title-chip-board {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-height: 150px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 6px;
  background: rgba(2, 18, 15, 0.38);
}

.title-chip {
  display: inline-grid;
  grid-template-columns: minmax(58px, 92px) auto auto;
  align-items: center;
  gap: 3px;
  width: auto;
  min-width: 0;
  border: 1px solid rgba(255, 226, 122, 0.22);
  border-radius: 999px;
  background: rgba(45, 34, 9, 0.42);
  padding: 3px 4px 3px 7px;
}

.title-chip input[name="title"] {
  width: 100%;
  min-width: 0;
  height: 24px;
  border: 0;
  background: transparent;
  color: #ffe27a;
  font-size: 12px;
  font-weight: 800;
  padding: 0;
}

.title-chip input[name="title"]:focus {
  box-shadow: none;
}

.title-chip button {
  min-height: 22px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 2px 6px;
}

.pinned-notices {
  border-bottom: 1px solid rgba(92, 230, 209, 0.16);
  padding: 10px 4px 12px;
}

.pinned-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pinned-title strong {
  color: #ffe27a;
}

.pinned-title span {
  color: #9fcfc3;
  font-size: 12px;
}

.pinned-list {
  display: grid;
  gap: 7px;
}

.pinned-notice {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 226, 122, 0.28);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(70, 53, 10, 0.24);
}

.pinned-notice span {
  font-weight: 800;
}

.pinned-notice p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-notice time {
  color: #9fcfc3;
  font-size: 12px;
}

.flash-tiandao {
  color: #ffeeb1;
  animation: flashGold 1.6s ease-in-out infinite;
}

.flash-punishment {
  border-color: rgba(255, 97, 97, 0.48);
  color: #ffc1c1;
  background: rgba(92, 16, 16, 0.28);
  animation: flashRed 1.25s ease-in-out infinite;
}

.flash-reward {
  border-color: rgba(88, 166, 255, 0.5);
  color: #cfe6ff;
  background: rgba(22, 49, 88, 0.28);
  animation: flashBlue 1.5s ease-in-out infinite;
}

.flash-blessing {
  border-color: rgba(188, 140, 255, 0.52);
  color: #e3d1ff;
  background: rgba(62, 36, 92, 0.3);
  animation: flashPurple 1.5s ease-in-out infinite;
}

@keyframes flashGold {
  50% { box-shadow: 0 0 18px rgba(255, 226, 122, 0.46); border-color: rgba(255, 226, 122, 0.72); }
}

@keyframes flashRed {
  50% { box-shadow: 0 0 18px rgba(255, 97, 97, 0.5); border-color: rgba(255, 97, 97, 0.8); }
}

@keyframes flashBlue {
  50% { box-shadow: 0 0 18px rgba(88, 166, 255, 0.5); border-color: rgba(88, 166, 255, 0.82); }
}

@keyframes flashPurple {
  50% { box-shadow: 0 0 18px rgba(188, 140, 255, 0.5); border-color: rgba(188, 140, 255, 0.82); }
}

@keyframes messageFlash {
  0% {
    box-shadow: 0 0 0 rgba(255, 226, 122, 0);
  }
  35% {
    border-color: rgba(255, 226, 122, 0.82);
    box-shadow: 0 0 22px rgba(255, 226, 122, 0.34);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 226, 122, 0);
  }
}

@keyframes recordingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(255, 97, 97, 0.24);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 24px rgba(255, 97, 97, 0.46);
  }
}

@keyframes mentionBadgePulse {
  50% {
    filter: brightness(1.18) saturate(1.2);
    box-shadow: 0 0 20px rgba(255, 226, 122, 0.34), 0 0 24px rgba(188, 140, 255, 0.28);
  }
}

@keyframes supremeRealmGlow {
  to { background-position: 300% 0; }
}

@keyframes supremeRealmBreath {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.16) inset,
      0 0 14px rgba(255, 77, 206, 0.22),
      0 0 26px rgba(82, 234, 216, 0.18),
      0 0 42px rgba(255, 226, 122, 0.1);
  }
  48%, 54% {
    transform: translateY(-0.5px) scale(1.028);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.3) inset,
      0 0 18px rgba(255, 77, 206, 0.48),
      0 0 36px rgba(82, 234, 216, 0.4),
      0 0 58px rgba(255, 226, 122, 0.24);
  }
}

@keyframes supremeRealmAuraBreath {
  0%, 100% {
    opacity: 0.34;
    filter: blur(7px) saturate(1.05);
    transform: scale(0.96);
  }
  50% {
    opacity: 0.82;
    filter: blur(10px) saturate(1.35);
    transform: scale(1.08);
  }
}

@keyframes supremeRealmInnerBreath {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.48; }
}

@keyframes supremeRealmTextBreath {
  0%, 100% {
    filter: brightness(1.04) saturate(1.08);
    text-shadow:
      0 0 7px rgba(255, 255, 255, 0.56),
      0 0 14px rgba(255, 223, 93, 0.44),
      0 0 24px rgba(82, 234, 216, 0.36),
      0 0 34px rgba(188, 140, 255, 0.3);
  }
  50% {
    filter: brightness(1.34) saturate(1.34);
    text-shadow:
      0 0 11px rgba(255, 255, 255, 0.88),
      0 0 22px rgba(255, 223, 93, 0.74),
      0 0 34px rgba(82, 234, 216, 0.66),
      0 0 48px rgba(188, 140, 255, 0.58);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.56);
}

.modal-card {
  width: min(920px, 96vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(92, 230, 209, 0.32);
  border-radius: 8px;
  background: rgba(5, 24, 20, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.18);
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
}

.modal-list {
  margin-top: 12px;
  max-height: 52vh;
  overflow: auto;
}

.modal-form {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(92, 230, 209, 0.16);
  border-radius: 6px;
  background: rgba(6, 31, 26, 0.76);
  padding: 12px;
}

.no-margin {
  margin-top: 0;
}

.leaderboard-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.leaderboard-table {
  --leaderboard-columns: 34px minmax(84px, 1fr) minmax(105px, 1.2fr) minmax(72px, 0.8fr) 74px minmax(110px, 1.1fr);
  min-width: 520px;
}

.leaderboard-table-head,
.leaderboard-row {
  display: grid;
  grid-template-columns: var(--leaderboard-columns);
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

.leaderboard-table-head {
  padding: 3px 7px 5px;
  color: #8fcfc3;
  font-size: 10px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.16);
}

.leaderboard-list {
  gap: 4px;
  padding-top: 4px;
}

.modal-leaderboard .leaderboard-row {
  width: 100%;
  min-height: 34px;
  padding: 4px 7px;
  text-align: left;
}

.leaderboard-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row .leaderboard-cell-rank {
  grid-row: auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 226, 122, 0.16);
  color: #ffe27a;
  font-size: 11px;
}

.modal-card.modal-dailyRoutine {
  width: min(720px, 96vw);
}

.daily-routine-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.daily-routine-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(92, 230, 209, 0.18);
  border-radius: 6px;
  background: rgba(92, 230, 209, 0.12);
}

.daily-routine-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
  background: rgba(5, 24, 20, 0.94);
}

.daily-routine-summary small,
.daily-routine-task small,
.daily-routine-completion small {
  color: #8fcfc3;
}

.daily-routine-summary strong {
  font-size: 14px;
}

.daily-routine-restriction {
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid #ff6b6b;
  color: #ffd1d1;
  background: rgba(134, 24, 35, 0.24);
}

.daily-routine-tasks {
  display: grid;
  gap: 0;
  border-block: 1px solid rgba(92, 230, 209, 0.16);
}

.daily-routine-task {
  display: grid;
  grid-template-columns: 22px minmax(180px, 1fr) 58px 70px 66px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(92, 230, 209, 0.12);
}

.daily-routine-task:last-child {
  border-bottom: 0;
}

.daily-routine-task.is-claimed {
  opacity: 0.72;
}

.daily-routine-mark {
  color: #61ead4;
  text-align: center;
}

.daily-routine-copy,
.daily-routine-progress {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.daily-routine-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-routine-progress,
.daily-routine-reward {
  text-align: center;
  white-space: nowrap;
}

.daily-routine-reward {
  color: #ffe27a;
  font-weight: 700;
}

.daily-routine-completion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 78px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 226, 122, 0.28);
  border-radius: 6px;
  background: rgba(255, 226, 122, 0.06);
}

.daily-routine-completion > span {
  display: grid;
  gap: 2px;
}

.daily-routine-completion > b {
  color: #ffe27a;
  text-align: center;
}

.daily-routine-achievements h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.daily-routine-achievements > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.daily-routine-achievements span {
  padding: 3px 6px;
  border: 1px solid rgba(143, 207, 195, 0.18);
  border-radius: 4px;
  color: #799c95;
  font-size: 11px;
}

.daily-routine-achievements span.is-unlocked {
  border-color: rgba(255, 226, 122, 0.34);
  color: #ffe27a;
  background: rgba(255, 226, 122, 0.07);
}

.daily-routine-footnote {
  margin: 0;
  font-size: 11px;
}

@media (max-width: 560px) {
  .modal-card.modal-dailyRoutine .modal-body {
    padding: 10px;
  }

  .daily-routine-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-routine-task {
    grid-template-columns: 20px minmax(0, 1fr) 62px;
    gap: 5px 7px;
    padding: 7px 1px;
  }

  .daily-routine-task .daily-routine-progress {
    grid-column: 2;
    display: flex;
    gap: 6px;
  }

  .daily-routine-task .daily-routine-reward {
    grid-column: 2;
    grid-row: 3;
    text-align: left;
  }

  .daily-routine-task .btn {
    grid-column: 3;
    grid-row: 1 / span 3;
    align-self: center;
    min-height: 34px;
  }

  .daily-routine-copy small {
    white-space: normal;
  }

  .daily-routine-completion {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .daily-routine-completion .btn {
    grid-column: 1 / -1;
  }
}

.leaderboard-cell-realm,
.leaderboard-cell-cultivation,
.leaderboard-cell-uid,
.leaderboard-cell-organization {
  font-size: 11px;
}

.leaderboard-cell-organization .org-badge {
  max-width: 100%;
  margin-top: 0;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .app-shell {
    height: 100vh;
    height: 100dvh;
  }

  .workspace {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .chat {
    min-height: 0;
    height: auto;
  }
}

/* Compact layout pass: keep the same structure, but make the chat feel denser. */
body {
  font-size: 13px;
}

.app-shell {
  gap: 8px;
  padding: 10px;
}

.workspace {
  grid-template-columns: 238px minmax(520px, 1fr) 292px;
  gap: 8px;
}

.topbar {
  padding: 8px 10px;
}

.topbar h1 {
  font-size: 18px;
}

.side,
.chat {
  padding: 8px;
}

.block {
  margin-top: 8px;
  padding: 8px;
}

.block h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.profile {
  padding: 8px 0 10px;
}

.avatar {
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  font-size: 22px;
}

.user-name {
  font-size: 18px;
}

.status-pill,
.realm,
.muted,
.meta,
.message-meta,
.small,
.tag,
.badge {
  font-size: 11px;
}

.realm-line,
.stat-row,
.profile-meta,
.friend-card,
.mini-row,
.form-row {
  gap: 5px;
}

.stat-row,
.mini-row {
  margin-top: 5px;
}

.chat-header {
  padding: 2px 2px 8px;
}

.channel-tabs {
  gap: 5px;
}

.channel-tab {
  padding: 5px 8px;
  min-height: 30px;
}

.message-search {
  padding: 5px 2px 2px;
}

.messages {
  padding: 5px 4px;
}

.message {
  margin-bottom: 4px;
  padding: 0;
}

.message-bubble {
  padding: 5px 8px;
}

.message-meta {
  gap: 3px 5px;
  margin-bottom: 2px;
}

.message p {
  line-height: 1.24;
}

.pinned-board {
  gap: 5px;
  padding: 6px;
  margin-bottom: 6px;
}

.pinned-item {
  padding: 5px 7px;
}

.composer {
  grid-template-columns: 34px minmax(0, 1fr) 80px;
  gap: 6px;
  padding-top: 7px;
}

.composer-private {
  grid-template-columns: 34px minmax(0, 1fr) 80px 72px;
}

.composer input,
.emoji-toggle,
.voice-toggle {
  min-height: 34px;
}

.btn,
.auth-tabs button,
.composer button,
.mini-form button,
.tiandao-form button,
.modal-form button {
  gap: 5px;
  padding: 6px 9px;
}

input,
select,
textarea {
  padding: 7px 9px;
}

.item,
.friend-card,
.request-card,
.report-card {
  padding: 6px 7px;
}

.friend-card {
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 2px 6px;
}

.scroll-list {
  max-height: 212px;
}

.compact-list {
  max-height: 160px;
}

.contact-hover {
  max-height: 210px;
}

.modal-header,
.modal-body {
  padding: 10px 12px;
}

.modal-form {
  gap: 8px;
  padding: 9px;
}

.modal-list {
  margin-top: 8px;
}

/* Density baseline v2: every new feature should inherit this compact admin-console feel. */
body {
  font-size: 12px;
  line-height: 1.32;
}

h1,
h2,
h3,
h4,
p {
  margin-bottom: 5px;
}

label {
  gap: 4px;
  font-size: 12px;
}

input,
select,
textarea {
  min-height: 30px;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 12px;
}

textarea {
  line-height: 1.28;
}

.btn,
.auth-tabs button,
.composer button,
.mini-form button,
.tiandao-form button,
.modal-form button,
.report-form button,
.quick-admin button,
.user-action-buttons button {
  width: auto;
  align-self: center;
  min-height: 28px;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.modal-form > button,
.privacy-form > button,
.font-settings-form > button,
.report-form > button,
.tiandao-card-form > button,
.tiandao-form > button {
  justify-self: start;
}

.tiandao-form button {
  grid-column: auto;
}

.app-shell {
  gap: 6px;
  padding: 7px;
}

.workspace {
  grid-template-columns: 224px minmax(520px, 1fr) 276px;
  gap: 6px;
}

.topbar {
  padding: 6px 8px;
}

.topbar h1 {
  font-size: 16px;
}

.top-actions {
  gap: 6px;
}

.side,
.chat {
  padding: 6px;
}

.block,
.item,
.friend-card,
.request-card,
.report-card,
.blacklist-row,
.sect-notice-box,
.sect-condition-box,
.tiandao-card-form,
.user-action-card,
.user-risk-panel,
.report-form,
.report-evidence,
.modal-form {
  border-radius: 5px;
  padding: 6px 7px;
}

.block,
.profile,
.sect-members,
.private-panel,
.blacklist-list,
.tiandao-console,
.tiandao-grid,
.tiandao-card-form,
.report-form,
.modal-form,
.list {
  gap: 5px;
}

.block {
  margin-top: 6px;
}

.block h3,
.modal-form h3,
.tiandao-section h3,
.tiandao-section h4,
.report-form h4,
.sect-members h4 {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.2;
}

.profile {
  padding: 6px 0 7px;
}

.avatar {
  width: 46px;
  height: 46px;
  margin-bottom: 5px;
  font-size: 19px;
}

.user-name {
  font-size: 16px;
}

.profile-badges {
  gap: 4px;
  min-height: 20px;
  margin-top: 5px;
}

.stat-row,
.mini-row,
.realm-line,
.profile-meta,
.hover-grid,
.user-action-grid,
.quick-admin,
.member-action-line {
  gap: 3px 5px;
}

.section-title-row {
  gap: 6px;
  margin: 6px 0 5px;
}

.channel-meta,
.anti-fraud-banner,
.pinned-board {
  gap: 4px;
  padding: 5px 6px;
  margin-bottom: 5px;
}

.channel-tabs {
  gap: 3px;
  padding: 2px;
}

.channel-tabs button {
  min-width: 46px;
  padding: 4px 7px;
  font-size: 12px;
}

.messages {
  padding: 4px 3px;
}

.message {
  max-width: calc(100% - 18px);
  margin-bottom: 3px;
  padding: 0;
}

.message-bubble {
  padding: 4px 7px;
}

.message-system-clean {
  padding: 4px 8px;
}

.message-meta {
  gap: 2px 5px;
  margin-bottom: 1px;
  font-size: 11px;
}

.message p {
  margin: 0;
  line-height: 1.2;
  font-size: 13px;
}

.message-actions {
  gap: 3px;
}

.message-actions button {
  font-size: 10px;
}

.message-read-state {
  color: #7fb9ac;
  font-size: 10px;
  white-space: nowrap;
}

.message-recalled {
  color: #86a99f;
  font-style: italic;
}

.message-favorites-list {
  display: grid;
  gap: 6px;
}

.favorite-message-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
}

.favorite-message-card > div,
.favorite-message-card > p {
  min-width: 0;
}

.favorite-message-card small {
  display: block;
  margin-top: 2px;
}

.favorite-message-card p {
  grid-column: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

.favorite-message-card > button {
  grid-column: 2;
  grid-row: 1 / 3;
}

.private-row {
  display: grid;
  gap: 5px;
}

.private-row-main {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 7px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.private-row-main > small,
.private-row-main > p {
  grid-column: 1;
}

.conversation-special {
  border-color: rgba(255, 226, 122, 0.5);
  box-shadow: inset 2px 0 0 rgba(255, 226, 122, 0.78);
}

.conversation-preference-form {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(3, auto) auto;
  align-items: center;
  gap: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(92, 230, 209, 0.12);
}

.conversation-preference-form label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  white-space: nowrap;
}

.conversation-preference-form input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
}

.login-sessions-head,
.login-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-privacy .modal-body {
  display: grid;
  align-content: start;
  gap: 7px;
}

.modal-privacy .modal-body > * {
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.login-sessions-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style-position: inside;
}

.login-sessions-summary span {
  margin-left: auto;
  color: #9fcfc3;
  font-size: 12px;
}

.login-sessions-panel:not([open]) {
  padding-top: 7px;
  padding-bottom: 7px;
}

.login-sessions-panel[open] .login-sessions-summary {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(92, 230, 209, .16);
}

.login-session-list {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
}

.login-sessions-head h3 {
  margin: 0;
}

.login-session-row > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.login-session-row.current {
  border-color: rgba(82, 234, 216, 0.45);
}

.login-security-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.login-security-alert > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.login-security-alert.unread {
  border-color: rgba(255, 91, 91, .58);
  box-shadow: inset 2px 0 0 rgba(255, 91, 91, .78);
}

.login-security-alert.acknowledged {
  opacity: .7;
}

.login-security-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.login-security-alert-list {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 760px) {
  .login-security-alert {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .login-security-actions {
    margin-left: auto;
  }

  .conversation-preference-form {
    grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  }

  .conversation-preference-form > button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

.composer {
  grid-template-columns: 30px minmax(0, 1fr) 68px;
  gap: 5px;
  padding-top: 5px;
}

.composer-private {
  grid-template-columns: 30px minmax(0, 1fr) 68px 62px;
}

.composer input,
.emoji-toggle,
.voice-toggle,
.composer > button[type="submit"] {
  min-height: 30px;
}

.emoji-panel {
  gap: 5px;
  padding: 6px;
}

.emoji-tabs {
  gap: 4px;
}

.emoji-tabs button {
  min-height: 24px;
  padding: 2px 5px;
  font-size: 11px;
}

.emoji-grid {
  grid-template-columns: repeat(8, minmax(28px, 1fr));
  gap: 4px;
}

.emoji-option {
  min-height: 30px;
  font-size: 18px;
}

.composer-hint {
  min-height: 16px;
  gap: 8px;
  font-size: 11px;
  line-height: 1.2;
}

.clear-channel-btn {
  min-height: 20px;
  padding: 1px 6px;
  margin-left: 32px;
}

.modal-backdrop {
  padding: 12px;
}

.modal-card {
  width: min(1060px, 98vw);
  max-height: 94vh;
  border-radius: 6px;
}

.modal-leaderboard {
  width: min(540px, 92vw);
}

.modal-user {
  width: min(540px, 94vw);
}

.modal-leaderboard .modal-body {
  padding: 7px;
}

.modal-header {
  gap: 8px;
  padding: 7px 9px;
}

.modal-header h2 {
  font-size: 16px;
}

.modal-body {
  padding: 7px 9px;
}

.modal-list {
  margin-top: 5px;
  max-height: 64vh;
}

.privacy-form {
  gap: 6px;
}

.privacy-form label {
  gap: 4px;
}

.privacy-form label > small,
.privacy-form .toggle-row small,
.font-settings-form > small,
.blacklist-panel .muted {
  font-size: 11px;
  line-height: 1.22;
}

.privacy-form .toggle-row {
  gap: 6px;
}

.privacy-form .toggle-row span {
  gap: 5px;
}

.font-settings-form {
  margin-top: 7px;
}

.privacy-form .font-picker-row {
  grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
  gap: 5px;
}

.font-picker-row .btn {
  min-height: 28px;
  padding: 4px 7px;
}

.blacklist-panel {
  margin-top: 7px;
}

.mini-form {
  gap: 5px;
  margin-bottom: 6px;
}

.tiandao-section {
  gap: 6px;
  margin: 0;
  padding: 0;
}

.tiandao-summary {
  gap: 5px;
}

.tiandao-summary article {
  gap: 1px;
  padding: 5px 7px;
  border-radius: 5px;
}

.tiandao-summary b {
  font-size: 15px;
}

.tiandao-grid,
.tiandao-grid.two,
.tiandao-grid.three {
  gap: 6px;
}

.tiandao-card-form {
  gap: 5px;
}

.tiandao-lookup-form {
  grid-template-columns: auto auto minmax(110px, 150px) auto;
  align-items: center;
  margin-bottom: 0;
}

.tiandao-lookup-form h4 {
  grid-column: auto;
  margin: 0;
  align-self: center;
  white-space: nowrap;
}

.tiandao-lookup-form label {
  display: contents;
}

.tiandao-lookup-form input,
.tiandao-lookup-form button {
  align-self: center;
}

.tiandao-lookup-form button {
  grid-column: auto;
}

.tiandao-system-stack {
  gap: 6px;
}

#adminForm {
  grid-template-columns: minmax(140px, 1fr) 96px 112px auto;
}

#adminForm button {
  grid-column: auto;
  align-self: end;
}

#adminForm .compact-note {
  margin-top: -2px;
}

.tiandao-announcement-form {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 6px;
}

.tiandao-announcement-form h4 {
  grid-column: auto;
  margin: 0;
  align-self: center;
  white-space: nowrap;
}

.tiandao-announcement-form button {
  grid-column: auto;
  align-self: end;
}

.tiandao-announcement-form label {
  grid-column: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.tiandao-law-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.tiandao-card-form label,
.report-form label,
.sect-title-form label,
.sect-notice-form label,
.sect-settings-form label {
  gap: 3px;
  font-size: 11px;
}

.punishment-type-hint {
  margin: -1px 0 1px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 226, 122, 0.18);
  border-radius: 5px;
  background: rgba(70, 53, 10, 0.16);
  color: #b9d9cf;
  font-size: 11px;
  line-height: 1.22;
}

.user-action-card,
.user-risk-panel {
  gap: 6px;
}

.user-action-card {
  max-width: none;
}

.user-action-head {
  gap: 7px;
  padding: 8px;
  border-radius: 6px;
}

.user-action-grid,
.report-form,
.user-action-admin,
.admin-status-panel {
  padding: 8px;
  border-radius: 6px;
}

.user-action-buttons {
  gap: 5px;
}

.report-form textarea {
  min-height: 54px;
}

.report-evidence {
  gap: 3px;
}

.sect-head {
  gap: 7px;
  margin-bottom: 6px;
}

.sect-head h3 {
  margin-bottom: 2px;
  font-size: 14px;
}

.sect-notice-box {
  gap: 3px;
  margin-bottom: 6px;
}

.sect-admin-row {
  gap: 5px;
  margin: 5px 0;
}

.sect-condition-box {
  gap: 4px;
  margin-top: 5px;
}

.sect-settings-form {
  grid-template-columns: minmax(150px, 0.9fr) minmax(190px, 1.1fr) auto;
}

.sect-title-form button,
.sect-notice-form button,
.sect-settings-form button {
  min-height: 28px;
  padding: 4px 7px;
}

.sect-members {
  gap: 5px;
  margin-top: 7px;
}

.member-row {
  gap: 4px 7px;
  padding: 5px 6px;
}

.member-controls {
  gap: 4px;
  min-width: 250px;
}

.sect-role-form {
  gap: 4px;
}

.member-controls select,
.member-controls button {
  min-height: 26px;
  padding: 3px 6px;
  font-size: 11px;
}

.sect-disband-warning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  margin: 4px 0 6px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 97, 97, 0.38);
  border-left-width: 3px;
  border-radius: 6px;
  background: rgba(77, 14, 14, 0.36);
}

.sect-disband-warning strong {
  color: #ffb6a8;
  font-size: 12px;
}

.sect-disband-warning span {
  grid-column: 1;
  color: #d7b6af;
  font-size: 11px;
  line-height: 1.25;
}

.sect-disband-warning .btn {
  grid-row: 1 / 3;
  grid-column: 2;
  min-height: 26px;
  padding: 3px 7px;
}

/* Round63: red emphasis for critical Tiandao permissions and actions. */
.danger-text {
  color: #ff6b6b;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 77, 77, 0.24);
}

.permission-check.permission-critical span {
  color: #ff9a8f;
  font-weight: 900;
}

.permission-check.permission-critical input {
  accent-color: #ff6b6b;
}

.danger-outline {
  border-color: rgba(255, 97, 97, 0.62);
  color: #ffb6a8;
  background: rgba(77, 14, 14, 0.18);
}

.danger-outline:hover,
.danger-outline:focus-visible {
  border-color: rgba(255, 97, 97, 0.9);
  color: #ffe1dc;
  background: rgba(142, 28, 28, 0.34);
}

/* Round64: organization authority emphasis. */
.org-important-text {
  color: #ffcf7a !important;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 207, 122, 0.16);
}

.org-authority {
  border-color: rgba(255, 207, 122, 0.62) !important;
  color: #ffe6a8 !important;
  background: linear-gradient(180deg, rgba(120, 84, 18, 0.72), rgba(72, 49, 10, 0.72)) !important;
}

.org-warning-outline {
  border-color: rgba(255, 189, 89, 0.62) !important;
  color: #ffd59a !important;
  background: rgba(91, 55, 10, 0.22) !important;
}

.org-warning-outline:hover,
.org-warning-outline:focus-visible {
  border-color: rgba(255, 189, 89, 0.9) !important;
  color: #fff0d0 !important;
  background: rgba(126, 76, 13, 0.34) !important;
}

.org-safe-important {
  border-color: rgba(92, 230, 209, 0.68) !important;
  color: #dffff7 !important;
  background: linear-gradient(180deg, rgba(24, 117, 103, 0.82), rgba(10, 65, 57, 0.82)) !important;
}

.sect-members-head .danger,
.member-action-line .danger {
  box-shadow: 0 0 0 1px rgba(255, 97, 97, 0.2), 0 0 14px rgba(255, 97, 97, 0.12);
}

/* Round65: universal button hover/focus highlighting. */
button,
.btn,
.auth-tabs button,
.composer button,
.mini-form button,
.tiandao-form button {
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease, filter 0.14s ease;
}

button:not(:disabled):hover,
button:not(:disabled):focus-visible,
.btn:not(:disabled):hover,
.btn:not(:disabled):focus-visible {
  border-color: rgba(92, 230, 209, 0.78);
  color: #ffffff;
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(92, 230, 209, 0.22), 0 0 15px rgba(92, 230, 209, 0.22);
}

button.danger:not(:disabled):hover,
button.danger:not(:disabled):focus-visible,
.btn.danger:not(:disabled):hover,
.btn.danger:not(:disabled):focus-visible {
  border-color: rgba(255, 97, 97, 0.9);
  color: #fff4f1;
  filter: brightness(1.12);
  box-shadow: 0 0 0 1px rgba(255, 97, 97, 0.32), 0 0 18px rgba(255, 97, 97, 0.28);
}

button.primary:not(:disabled):hover,
button.primary:not(:disabled):focus-visible,
.btn.primary:not(:disabled):hover,
.btn.primary:not(:disabled):focus-visible,
.org-safe-important:not(:disabled):hover,
.org-safe-important:not(:disabled):focus-visible {
  border-color: rgba(107, 255, 228, 0.92) !important;
  box-shadow: 0 0 0 1px rgba(92, 230, 209, 0.28), 0 0 18px rgba(92, 230, 209, 0.3) !important;
}

.org-authority:not(:disabled):hover,
.org-authority:not(:disabled):focus-visible {
  border-color: rgba(255, 226, 122, 0.92) !important;
  color: #fff4cf !important;
  filter: brightness(1.14);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 226, 122, 0.26), 0 0 18px rgba(255, 207, 122, 0.26) !important;
}

button:disabled,
.btn:disabled {
  transform: none;
  box-shadow: none;
  filter: none;
}

.pinned-notices {
  padding: 5px 2px 6px;
}

.pinned-notice {
  grid-template-columns: 48px 1fr auto;
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
}

.pinned-notice time {
  font-size: 10px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .privacy-form .font-picker-row,
  .sect-settings-form,
  #adminForm,
  .tiandao-announcement-form,
  .tiandao-law-row {
    grid-template-columns: 1fr;
  }

  #adminForm button {
    grid-column: 1 / -1;
  }

  .tiandao-permission-form {
    grid-template-columns: 1fr;
  }

  .tiandao-grid.three {
    grid-template-columns: 1fr;
  }

  .member-controls {
    min-width: 0;
  }
}

/* Round65 final override: all clickable buttons glow on hover/focus. */
button:not(:disabled):hover,
button:not(:disabled):focus-visible,
.btn:not(:disabled):hover,
.btn:not(:disabled):focus-visible {
  border-color: rgba(92, 230, 209, 0.78) !important;
  color: #ffffff !important;
  filter: brightness(1.12) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 0 1px rgba(92, 230, 209, 0.22), 0 0 15px rgba(92, 230, 209, 0.22) !important;
}

button.danger:not(:disabled):hover,
button.danger:not(:disabled):focus-visible,
.btn.danger:not(:disabled):hover,
.btn.danger:not(:disabled):focus-visible {
  border-color: rgba(255, 97, 97, 0.92) !important;
  color: #fff4f1 !important;
  box-shadow: 0 0 0 1px rgba(255, 97, 97, 0.32), 0 0 18px rgba(255, 97, 97, 0.3) !important;
}

.danger-outline:not(:disabled):hover,
.danger-outline:not(:disabled):focus-visible {
  border-color: rgba(255, 97, 97, 0.92) !important;
  color: #ffe1dc !important;
  background: rgba(142, 28, 28, 0.34) !important;
  box-shadow: 0 0 0 1px rgba(255, 97, 97, 0.28), 0 0 18px rgba(255, 97, 97, 0.24) !important;
}

.org-authority:not(:disabled):hover,
.org-authority:not(:disabled):focus-visible,
.org-warning-outline:not(:disabled):hover,
.org-warning-outline:not(:disabled):focus-visible {
  border-color: rgba(255, 226, 122, 0.92) !important;
  color: #fff4cf !important;
  box-shadow: 0 0 0 1px rgba(255, 226, 122, 0.28), 0 0 18px rgba(255, 207, 122, 0.28) !important;
}

/* Round52: compact personal center and avatar layout. */
.profile.profile-inline {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
}

.profile.profile-inline .avatar {
  margin: 0;
}

.profile-main {
  min-width: 0;
}

.profile-main h2,
.profile-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile.profile-inline .profile-badges {
  justify-content: flex-start;
}

.avatar {
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.account-form {
  margin-bottom: 7px;
}

.account-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) auto minmax(170px, auto);
  align-items: end;
  gap: 6px;
}

.account-row label {
  min-width: 0;
}

.account-row input[type="file"] {
  width: 100%;
  min-height: 28px;
  padding: 3px 6px;
}

.account-avatar {
  width: 42px;
  height: 42px;
  margin: 0;
  font-size: 17px;
}

.password-row {
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
}

.password-row input {
  min-height: 28px;
  padding: 4px 7px;
}

.account-row .btn {
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
}

.account-row small {
  align-self: center;
  font-size: 11px;
  line-height: 1.2;
}

.side-feature-panel {
  margin-top: 6px;
  padding: 6px 7px;
}

.side-feature-grid {
  gap: 5px;
}

.side-feature-grid .btn {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}

/* Round61: align organization admin form controls and buttons. */
.sect-title-form,
.sect-notice-form,
.sect-settings-form {
  align-items: end;
}

.sect-title-form label,
.sect-notice-form label,
.sect-settings-form label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

.sect-title-form select,
.sect-title-form input,
.sect-notice-form select,
.sect-notice-form input,
.sect-settings-form select,
.sect-settings-form input,
.sect-title-form button,
.sect-notice-form button,
.sect-settings-form button {
  min-height: 28px;
  height: 28px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.sect-title-form button,
.sect-notice-form button,
.sect-settings-form button {
  align-self: end;
  padding-left: 7px;
  padding-right: 7px;
}

@media (max-width: 1180px) {
  .account-row,
  .password-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .avatar-form .account-row {
    grid-template-columns: 42px minmax(160px, 1fr) auto;
  }

  .avatar-form .account-row small {
    grid-column: 1 / -1;
  }
}

/* Round83: keep the private voice button aligned with the composer controls. */
.composer-private {
  grid-template-columns: 30px minmax(0, 1fr) 68px 78px;
  align-items: center;
}

.composer-private > button[type="submit"] {
  grid-column: 3;
}

.composer-private .voice-toggle {
  grid-column: 4;
  display: inline-grid !important;
  place-items: center;
}

.composer input,
.emoji-toggle,
.composer > button[type="submit"],
.voice-toggle {
  height: 32px;
  min-height: 32px;
  align-self: center;
}

.voice-toggle {
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
}

.voice-toggle::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

/* Round84: hard override for the private composer control order. */
.composer:not(.composer-private) {
  grid-template-columns: 30px minmax(0, 1fr) 68px !important;
  align-items: center !important;
}

.composer:not(.composer-private) .emoji-toggle {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.composer:not(.composer-private) input[name="content"] {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.composer:not(.composer-private) > button[type="submit"] {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.composer.composer-private {
  grid-template-columns: 30px minmax(0, 1fr) 68px 84px !important;
  align-items: center !important;
}

.composer.composer-private .emoji-toggle {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.composer.composer-private input[name="content"] {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.composer.composer-private > button[type="submit"] {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.composer.composer-private .voice-toggle {
  grid-column: 4 !important;
  grid-row: 1 !important;
  display: inline-flex !important;
}

.composer:not(.composer-private) .emoji-toggle,
.composer:not(.composer-private) input[name="content"],
.composer:not(.composer-private) > button[type="submit"],
.composer.composer-private .emoji-toggle,
.composer.composer-private input[name="content"],
.composer.composer-private > button[type="submit"],
.composer.composer-private .voice-toggle {
  box-sizing: border-box !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.composer.composer-private .voice-toggle {
  justify-content: center !important;
  align-items: center !important;
  padding: 0 6px !important;
  line-height: 1 !important;
}

/* Round86: compact organization logs and admin filters. */
.sect-log-box {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.sect-log-card {
  border-left: 2px solid rgba(250, 204, 21, 0.62);
}

.sect-log-card p {
  margin: 2px 0 0;
  line-height: 1.35;
}

.sect-economy {
  display: grid;
  gap: 6px;
  margin: 6px 0;
  padding: 7px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.28);
}

.sect-economy-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.sect-economy-summary b {
  color: #facc15;
}

.sect-facility-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.sect-facility {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 5px;
}

.sect-facility-effect {
  grid-column: 1 / -1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.sect-facility > span:first-of-type {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.sect-facility small {
  white-space: nowrap;
}

.sect-facility .btn {
  min-height: 25px;
  padding: 2px 6px;
}

.sect-contribution-ledger summary {
  cursor: pointer;
  color: #f8e7a1;
  font-weight: 700;
}

.sect-contribution-ledger .list {
  margin-top: 5px;
}

.sect-ledger-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) auto minmax(180px, 1.6fr);
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.sect-ledger-row small {
  text-align: right;
}

.sect-role-policy-box,
.sect-role-log-box {
  margin: 6px 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
}

.sect-role-policy-box > summary,
.sect-role-log-box > summary {
  cursor: pointer;
  padding: 6px 7px;
  color: #f8e7a1;
  font-weight: 700;
}

.sect-role-policy-grid {
  display: grid;
  gap: 2px;
  padding: 0 6px 6px;
}

.sect-role-policy-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) 70px minmax(220px, 2.3fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sect-role-policy-row.is-current {
  border-left: 2px solid #facc15;
  background: rgba(250, 204, 21, 0.07);
}

.sect-role-policy-row span {
  min-width: 0;
  line-height: 1.35;
}

.sect-role-log-box .list {
  padding: 0 6px 6px;
}

.sect-role-log-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(150px, 1fr) minmax(240px, 2fr);
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sect-role-log-row small {
  text-align: right;
}

.diplomacy-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.sect-diplomacy {
  margin: 6px 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
}

.sect-diplomacy > summary,
.sect-diplomacy-history > summary {
  cursor: pointer;
  padding: 6px 7px;
  color: #f8e7a1;
  font-weight: 700;
}

.sect-diplomacy-form {
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.3fr) auto auto auto;
  padding: 0 7px 6px;
}

.sect-diplomacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 7px 6px;
}

.sect-diplomacy-grid section {
  min-width: 0;
}

.sect-diplomacy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sect-diplomacy-history {
  margin: 0 7px 7px;
}

.sect-takeover {
  margin: 6px 0;
  border: 1px solid rgba(190, 142, 44, .38);
  background: rgba(255, 248, 229, .45);
}

.sect-merge-panel {
  margin: 6px 0;
  border: 1px solid rgba(239, 68, 68, .3);
  background: rgba(67, 18, 18, .16);
}

.sect-merge-panel > summary {
  position: relative;
  padding: 7px 9px;
  color: #ffd6d6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sect-merge-alert {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 5px;
  color: #fff;
  font-size: 10px;
  border-radius: 3px;
  background: #b42318;
}

.sect-merge-body {
  display: grid;
  gap: 5px;
  padding: 0 8px 8px;
}

.sect-merge-form {
  display: grid;
  grid-template-columns: minmax(170px, .8fr) minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 5px;
}

.sect-merge-form label {
  min-width: 0;
}

.sect-merge-form select,
.sect-merge-form input,
.sect-merge-form button {
  box-sizing: border-box;
  width: 100%;
  height: 30px;
  min-height: 30px;
  margin: 0;
}

.sect-merge-form button {
  align-self: end;
}

.sect-merge-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) auto;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border-left: 3px solid #d8a62b;
  background: rgba(216, 166, 43, .08);
}

.sect-merge-flow > div:first-child {
  display: grid;
  min-width: 0;
}

.sect-merge-flow small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-merge-flow p,
.sect-merge-rule {
  margin: 0;
  font-size: 11px;
}

.sect-merge-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.sect-merge-rule {
  padding: 4px 6px;
  color: #d4b9b9;
  border: 1px solid rgba(239, 68, 68, .12);
}

.sect-merge-history {
  display: grid;
  gap: 1px;
}

.sect-merge-history > p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 3px 2px;
  border-top: 1px solid rgba(239, 68, 68, .1);
}

.sect-merge-history > p span {
  display: grid;
  min-width: 0;
}

.sect-merge-history small {
  color: var(--muted);
  font-size: 10px;
}

.sect-merge-history b {
  flex: 0 0 auto;
  font-size: 11px;
}

.sect-yearbook {
  margin: 6px 0;
  border: 1px solid rgba(81, 196, 176, .28);
  background: rgba(4, 28, 24, .24);
}

.sect-yearbook > summary {
  padding: 7px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.sect-yearbook-body {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.sect-yearbook-picker {
  display: grid;
  grid-template-columns: minmax(130px, 200px) auto minmax(150px, 1fr);
  align-items: end;
  gap: 5px;
}

.sect-yearbook-picker > span {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
}

.sect-yearbook-picker select,
.sect-yearbook-picker > button {
  box-sizing: border-box;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  margin: 0;
}

.sect-yearbook-picker > button {
  align-self: end;
}

.sect-yearbook-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.sect-yearbook-metrics span,
.sect-yearbook-facilities span {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid rgba(92, 230, 209, .12);
  font-size: 11px;
}

.sect-yearbook-facilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 4px;
}

.sect-yearbook-facilities small {
  color: var(--muted);
  white-space: nowrap;
}

.sect-yearbook-warning {
  margin: 0;
  padding: 5px 7px;
  border-left: 3px solid #d8a62b;
  background: rgba(216, 166, 43, .08);
  color: #ffe58a;
  font-size: 11px;
}

.sect-yearbook-events {
  display: grid;
  gap: 3px;
}

.sect-yearbook-events > div {
  display: grid;
  grid-template-columns: 125px minmax(95px, auto) minmax(0, 1fr);
  gap: 6px;
  padding: 3px 5px;
  background: rgba(2, 18, 15, .3);
  font-size: 11px;
}

.sect-yearbook-events time,
.sect-yearbook-events small {
  color: var(--muted);
}

.sect-takeover > summary {
  position: relative;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.sect-takeover-body {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.sect-takeover-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
}

.sect-takeover-form,
.takeover-review-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: end;
  gap: 5px;
}

.takeover-objection {
  margin: 0;
  padding: 5px 7px;
  border-left: 3px solid #b42318;
  background: rgba(180, 35, 24, .06);
  font-size: 12px;
}

.takeover-review {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.takeover-review h4 {
  margin: 0 0 6px;
  color: #b42318;
}

.takeover-review-card {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, .7fr) auto;
  margin-top: 5px;
  padding: 6px;
  border: 1px solid var(--line);
}

.takeover-review-card > span,
.takeover-review-card > small {
  grid-column: 1 / -1;
}

.tiandao-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.tiandao-filter-row .mini-form {
  margin: 0;
}

@media (max-width: 760px) {
  .sect-diplomacy-form,
  .sect-diplomacy-grid {
    grid-template-columns: 1fr;
  }

  .sect-diplomacy-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sect-diplomacy-row small {
    grid-column: 1 / -1;
  }

  .sect-role-policy-row,
  .sect-role-log-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sect-role-policy-row span,
  .sect-role-log-row small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .sect-facility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sect-facility {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sect-facility > .muted {
    grid-column: 1 / -1;
  }

  .sect-facility .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .sect-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sect-ledger-row small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .tiandao-filter-row {
    grid-template-columns: 1fr;
  }

  .sect-takeover-form,
  .takeover-review-card {
    grid-template-columns: 1fr;
  }

  .sect-merge-form,
  .sect-merge-flow {
    grid-template-columns: 1fr;
  }

  .sect-merge-actions {
    justify-content: flex-start;
  }

  .sect-yearbook-picker {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sect-yearbook-picker > span {
    grid-column: 1 / -1;
  }

  .sect-yearbook-metrics,
  .sect-yearbook-facilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sect-yearbook-facilities small {
    grid-column: 1 / -1;
  }

  .sect-yearbook-events > div {
    grid-template-columns: 1fr auto;
  }

  .sect-yearbook-events > div small {
    grid-column: 1 / -1;
  }
}

/* Mobile application layout: keep chat usable instead of stacking desktop panels blindly. */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    display: block;
    overflow: visible;
    padding: 6px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
  }

  .topbar > div:first-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .topbar .eyebrow {
    margin: 0;
    font-size: 10px;
    white-space: nowrap;
  }

  .topbar h1 {
    min-width: 0;
    margin: 0;
    font-size: 14px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .topbar .top-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 4px 5px;
    font-size: 11px;
  }

  .workspace {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-top: 6px;
    overflow: visible;
  }

  .side,
  .chat {
    width: 100%;
    max-height: none;
    min-width: 0;
    overflow: visible;
  }

  .workspace > .side:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .profile.profile-inline {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 3px 0 5px;
  }

  .profile.profile-inline .avatar {
    width: 42px;
    height: 42px;
  }

  .profile-main h2 {
    margin: 0 0 2px;
    font-size: 16px;
  }

  .profile-main p {
    margin: 0;
    font-size: 11px;
  }

  .profile.profile-inline .profile-badges {
    min-height: 0;
    margin-top: 3px;
  }

  .workspace > .side:first-child .kv {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px 5px;
    margin-top: 0;
    padding: 6px;
  }

  .workspace > .side:first-child .kv span {
    grid-row: 1;
    font-size: 10px;
  }

  .workspace > .side:first-child .kv strong {
    grid-row: 2;
    min-width: 0;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .workspace > .side:first-child .kv > * {
    min-width: 0;
  }

  .workspace > .side:first-child .kv span:nth-of-type(1),
  .workspace > .side:first-child .kv strong:nth-of-type(1) { grid-column: 1; }
  .workspace > .side:first-child .kv span:nth-of-type(2),
  .workspace > .side:first-child .kv strong:nth-of-type(2) { grid-column: 2; }
  .workspace > .side:first-child .kv span:nth-of-type(3),
  .workspace > .side:first-child .kv strong:nth-of-type(3) { grid-column: 3; }
  .workspace > .side:first-child .kv span:nth-of-type(4),
  .workspace > .side:first-child .kv strong:nth-of-type(4) { grid-column: 4; }

  .workspace > .side:first-child .kv .progress {
    grid-column: 1 / -1;
    grid-row: 3;
    height: 5px;
    margin-top: 3px;
  }

  .workspace > .side:first-child .kv > small {
    grid-column: 1 / -1;
    grid-row: 4;
    font-size: 10px;
  }

  .side-feature-panel {
    margin-top: 0;
  }

  .chat {
    height: min(680px, 78dvh);
    min-height: 540px;
    display: grid;
    overflow: hidden;
  }

  .chat-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
    padding: 2px 2px 6px;
  }

  .chat-header h2 {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
  }

  .chat-header > .top-actions {
    width: 100%;
    min-width: 0;
    display: block;
  }

  .chat-header .channel-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-header .channel-tabs button {
    width: 100%;
    min-width: 0;
    padding: 4px 6px;
    font-size: 11px;
  }

  .message-search {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 5px 2px 3px;
  }

  .pinned-board {
    max-height: 118px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .messages-wrap,
  .messages {
    min-height: 0;
  }

  .composer:not(.composer-private) {
    grid-template-columns: 30px minmax(0, 1fr) 58px !important;
  }

  .composer.composer-private {
    grid-template-columns: 30px minmax(0, 1fr) 58px 70px !important;
  }

  .composer input[name="content"] {
    width: 100%;
    min-width: 0;
    padding: 5px 7px;
    font-size: 12px;
  }

  .composer > button[type="submit"],
  .composer .voice-toggle {
    padding-inline: 5px !important;
    font-size: 12px;
  }

  .composer-hint {
    gap: 5px;
  }

  .composer-hint-left {
    min-width: 0;
    overflow: hidden;
  }

  .composer-hint-left > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .clear-channel-btn {
    flex: 0 0 auto;
    margin-left: 8px;
  }

  .workspace > .side:last-child {
    max-height: none;
  }
}

.mentorship-panel {
  display: grid;
  gap: 7px;
}

.mentorship-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.mentorship-summary span,
.mentorship-relation,
.mentorship-request,
.mentorship-lineage {
  border: 1px solid rgba(92, 230, 209, .16);
  background: rgba(2, 18, 15, .38);
  padding: 6px 7px;
}

.mentorship-summary span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.mentorship-panel section,
.mentorship-panel details {
  display: grid;
  gap: 4px;
}

.mentorship-panel h4,
.mentorship-panel p {
  margin: 0;
}

.mentorship-relation,
.mentorship-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
}

.mentorship-relation > span,
.mentorship-request > span {
  display: grid;
  min-width: 0;
}

.mentorship-request > small {
  grid-column: 1;
}

.mentorship-panel details > summary {
  cursor: pointer;
  color: #f8e7a1;
  font-weight: 700;
}

.mentorship-tree {
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 0;
  padding: 2px 8px 8px;
  overflow: hidden;
}

.mentorship-level {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.mentorship-level-master,
.mentorship-level-self {
  padding-bottom: 20px;
}

.mentorship-level-master::after,
.mentorship-level-self::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 0;
  height: 20px;
  border-left: 1px solid rgba(82, 234, 216, 0.5);
}

.mentorship-level-apprentices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: min(100%, 920px);
  padding-top: 18px;
  border-top: 1px solid rgba(82, 234, 216, 0.5);
}

.mentorship-node {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  width: min(100%, 230px);
  min-width: 0;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(92, 230, 209, 0.24);
  border-radius: 6px;
  background: rgba(3, 24, 21, 0.96);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
}

.mentorship-level-apprentices .mentorship-node::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -19px;
  height: 18px;
  border-left: 1px solid rgba(82, 234, 216, 0.5);
}

.mentorship-node-master {
  border-color: rgba(255, 226, 122, 0.42);
  background: rgba(52, 43, 12, 0.72);
}

.mentorship-node-self {
  width: min(100%, 250px);
  border-color: rgba(82, 234, 216, 0.68);
  background: rgba(8, 62, 53, 0.9);
  box-shadow: 0 0 18px rgba(82, 234, 216, 0.15);
}

.mentorship-node-apprentice {
  border-color: rgba(108, 166, 255, 0.34);
  background: rgba(10, 31, 53, 0.84);
}

.mentorship-node-role {
  justify-self: start;
  color: #f8e7a1;
  font-size: 10px;
  font-weight: 800;
}

.mentorship-node-profile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.mentorship-node-profile:disabled {
  opacity: 1;
}

.mentorship-node-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 122, 0.32);
  border-radius: 50%;
  background: rgba(5, 42, 36, 0.9);
  color: #ffe27a;
  font-weight: 900;
}

.mentorship-node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mentorship-node-identity {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mentorship-node-identity strong,
.mentorship-node-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mentorship-node-identity small {
  color: #9fcfc3;
  font-size: 10px;
}

.mentorship-node-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.mentorship-node-actions .btn {
  min-height: 24px;
  padding: 2px 5px;
  font-size: 10px;
}

.mentorship-node-empty {
  align-content: center;
  min-height: 58px;
  border-style: dashed;
  color: #7fa89f;
  text-align: center;
}

.mentorship-node-empty .mentorship-node-role {
  justify-self: center;
}

.mentorship-requests,
.mentorship-lineage-history {
  border: 1px solid rgba(92, 230, 209, 0.14);
  border-radius: 6px;
  padding: 5px 6px;
}

.mentorship-lineage {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.realm-cosmetics-entry {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.realm-cosmetics-entry h3,
.realm-cosmetics-entry span {
  margin: 0;
}

.realm-cosmetics-panel {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 6px;
  align-items: end;
}

.realm-cosmetics-summary {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border: 1px solid rgba(92, 230, 209, .18);
}

.realm-cosmetics-panel label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.realm-signature {
  margin: 3px 0 0;
  color: #a8c9c2;
  font-size: 12px;
}

.realm-privilege-admin {
  margin-top: 7px;
  border-top: 1px solid rgba(92, 230, 209, .18);
  padding-top: 6px;
}

.realm-privilege-admin > summary {
  cursor: pointer;
  color: #f8e7a1;
  font-weight: 700;
}

.realm-privilege-admin-list {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.realm-privilege-admin-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 110px 70px auto minmax(180px, 1.4fr);
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid rgba(92, 230, 209, .14);
}

.realm-privilege-admin-row > small {
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treasure-hunt-panel {
  display: grid;
  gap: 7px;
}

.treasure-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.treasure-summary span,
.treasure-action,
.treasure-probabilities,
.treasure-history {
  border: 1px solid rgba(92, 230, 209, .17);
  padding: 6px 7px;
}

.treasure-summary span,
.treasure-action,
.treasure-history-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aura-environment-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 3px 7px;
  border: 1px solid rgba(92, 230, 209, .18);
  border-left-width: 3px;
  font-size: 11px;
}

.aura-environment-strip span,
.aura-environment-strip small { color: #9fcfc3; }
.aura-environment-strip small { text-align: right; }
.aura-depleted { border-left-color: #87928f; }
.aura-stable { border-left-color: #52ead8; }
.aura-active { border-left-color: #75e68f; }
.aura-surge { border-left-color: #ffd66e; }
.aura-heavenly { border-left-color: #d6a4ff; box-shadow: inset 3px 0 10px rgba(208, 142, 255, .1); }

.aura-admin-panel {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(92, 230, 209, .16);
}

.aura-schedule-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(190px, 1.35fr) 100px minmax(180px, 1.4fr) auto;
  gap: 5px;
}

.aura-history > summary {
  cursor: pointer;
  color: #f8e7a1;
  font-weight: 700;
}

.aura-history > div {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.aura-history article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-top: 1px solid rgba(92, 230, 209, .1);
}

.aura-history article span { display: grid; gap: 2px; }

.treasure-action > div {
  display: grid;
  gap: 2px;
}

.treasure-action small,
.treasure-item small,
.treasure-item p,
.treasure-history time {
  color: #9fcfc3;
  font-size: 11px;
}

.treasure-probabilities > summary,
.treasure-history > summary {
  cursor: pointer;
  color: #f8e7a1;
  font-weight: 700;
}

.treasure-probabilities > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 5px;
}

.treasure-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.treasure-item {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(148, 178, 170, .2);
  background: rgba(2, 18, 15, .4);
}

.treasure-item p,
.treasure-item strong {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.treasure-item.locked {
  opacity: 1;
  filter: none;
}

.treasure-item.rarity-rare { border-color: rgba(73, 166, 255, .6); color: #90caff; }
.treasure-item.rarity-epic { border-color: rgba(199, 132, 255, .65); color: #d7a7ff; }
.treasure-item.rarity-legendary { border-color: rgba(255, 220, 105, .75); color: #ffe184; box-shadow: inset 0 0 12px rgba(255, 215, 93, .08); }

.treasure-history-list {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.treasure-history-list > div {
  padding-top: 3px;
  border-top: 1px solid rgba(92, 230, 209, .1);
}

.realm-title {
  border: 1px solid currentColor;
  padding: 0 4px;
  font-style: normal;
  font-size: 11px;
  line-height: 17px;
}

.realm-title-jade { color: #72e6c2; }
.realm-title-violet { color: #d6a4ff; }
.realm-title-gold { color: #ffe184; text-shadow: 0 0 7px rgba(255, 218, 92, .42); }

.message-bubble.realm-bubble-core {
  border-color: rgba(78, 220, 195, .7);
  background: rgba(5, 38, 32, .86);
  box-shadow: inset 3px 0 0 rgba(255, 213, 94, .6);
}

.message-bubble.realm-bubble-nascent {
  border-color: rgba(199, 137, 255, .72);
  background: rgba(30, 15, 48, .88);
  box-shadow: inset 3px 0 0 rgba(120, 226, 255, .55), 0 0 9px rgba(167, 100, 255, .12);
}

.message-bubble.realm-bubble-immortal {
  border-color: rgba(255, 226, 133, .82);
  background: rgba(42, 36, 14, .88);
  box-shadow: inset 3px 0 0 rgba(232, 249, 255, .72), 0 0 10px rgba(255, 220, 108, .18);
  animation: realm-cosmetic-breathe 3.6s ease-in-out infinite;
}

.realm-sect-badge-spirit {
  color: #a7f6e7;
  border-color: rgba(121, 240, 218, .7);
  text-shadow: 0 0 6px rgba(90, 231, 205, .42);
}

.realm-voice-transmission {
  border-left: 2px solid #d7a6ff;
  background: rgba(44, 21, 62, .52);
  box-shadow: inset 0 0 10px rgba(181, 112, 255, .12);
}

@keyframes realm-cosmetic-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .message-bubble.realm-bubble-immortal { animation: none; }
}

/* Interface density and mobile single-region navigation. */
.density-compact {
  --interface-density: compact;
}

.interface-density-form {
  grid-template-columns: auto minmax(190px, 1fr) auto minmax(220px, 1.2fr);
  align-items: center;
}

.interface-density-form h3,
.interface-density-form small {
  margin: 0;
}

.density-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 4px;
}

.density-segments label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(92, 230, 209, 0.26);
  border-radius: 5px;
  background: rgba(2, 18, 15, 0.5);
  cursor: pointer;
}

.density-segments input {
  width: 14px;
  min-height: 14px;
}

.density-standard.app-shell {
  gap: 8px;
  padding: 9px;
}

.density-standard .workspace {
  grid-template-columns: 252px minmax(520px, 1fr) 310px;
  gap: 8px;
}

.density-standard .side,
.density-standard .chat {
  padding: 8px;
}

.density-standard .message p {
  font-size: 14px;
  line-height: 1.3;
}

.density-standard .message-bubble,
.density-standard .block,
.density-standard .item {
  padding-top: 7px;
  padding-bottom: 7px;
}

.density-standard .btn,
.density-standard input,
.density-standard select,
.density-standard .composer > button {
  min-height: 32px;
}

.mobile-organization,
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body {
    min-width: 0;
  }

  .layout-mobile.app-shell {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) calc(52px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
    padding: 4px;
    overflow: hidden;
  }

  .layout-mobile .topbar {
    display: flex;
    min-height: 36px;
    padding: 5px 7px;
  }

  .layout-mobile .topbar > div:first-child {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }

  .layout-mobile .topbar .top-actions {
    display: none;
  }

  .layout-mobile .workspace {
    min-height: 0;
    display: block;
    margin: 0;
    overflow: hidden;
  }

  .layout-mobile .workspace > .workspace-me,
  .layout-mobile .workspace > .workspace-chat,
  .layout-mobile .workspace > .workspace-contacts,
  .layout-mobile .workspace > .mobile-organization {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .layout-mobile.mobile-view-contacts .workspace > .workspace-contacts,
  .layout-mobile.mobile-view-organization .workspace > .mobile-organization,
  .layout-mobile.mobile-view-me .workspace > .workspace-me {
    display: grid;
  }

  .layout-mobile.mobile-view-chat .workspace > .workspace-chat {
    display: flex;
    flex-direction: column;
  }

  .layout-mobile .workspace-chat {
    height: 100%;
    min-height: 0;
  }

  .layout-mobile .workspace-contacts,
  .layout-mobile .workspace-me,
  .layout-mobile .mobile-organization {
    align-content: start;
    padding: 6px;
    border: 1px solid rgba(92, 230, 209, 0.28);
    border-radius: 6px;
    background: rgba(5, 24, 20, 0.88);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .layout-mobile .workspace-me {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout-mobile .workspace-me .kv {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .layout-mobile .chat {
    height: 100%;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
  }

  .layout-mobile .chat > * {
    flex: 0 0 auto;
    min-width: 0;
  }

  .layout-mobile .messages-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }

  .layout-mobile .messages {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .layout-mobile .composer {
    position: relative;
    inset: auto;
    z-index: 2;
    background: rgba(5, 24, 20, 0.98);
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 44px;
    align-content: start;
    gap: 3px;
    min-height: calc(52px + env(safe-area-inset-bottom, 0px));
    padding: 3px 3px calc(3px + env(safe-area-inset-bottom, 0px));
    border: 1px solid rgba(92, 230, 209, 0.28);
    border-radius: 6px;
    background: rgba(4, 20, 17, 0.98);
  }

  .mobile-bottom-nav button {
    position: relative;
    min-width: 0;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #9fcfc3;
    font-size: 12px;
  }

  .mobile-bottom-nav button[aria-current="page"] {
    border-color: rgba(92, 230, 209, 0.54);
    background: rgba(20, 91, 80, 0.72);
    color: #effffb;
  }

  .mobile-organization > .sect-panel,
  .mobile-organization > .sect-list {
    min-width: 0;
  }

  .interface-density-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .interface-density-form h3,
  .interface-density-form small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) and (max-height: 560px) {
  .layout-mobile:has(.composer input[name="content"]:focus) {
    grid-template-rows: minmax(0, 1fr) calc(52px + env(safe-area-inset-bottom, 0px));
  }

  .layout-mobile .message-search,
  .layout-mobile .aura-environment-strip,
  .layout-mobile .world-event-strip,
  .layout-mobile .anti-fraud-banner,
  .layout-mobile .pinned-notices {
    display: none;
  }

  .layout-mobile:has(.composer input[name="content"]:focus) .topbar {
    display: none;
  }

  .layout-mobile:has(.composer input[name="content"]:focus) .chat-header > div:first-child {
    display: none;
  }

  .layout-mobile:has(.composer input[name="content"]:focus) .chat-header {
    gap: 2px;
    padding-bottom: 3px;
  }
}

@media (max-width: 760px) {
  .modal-card {
    box-sizing: border-box;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .mentorship-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mentorship-summary span {
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 5px 3px;
    text-align: center;
  }

  .mentorship-tree {
    padding-inline: 0;
  }

  .mentorship-level-apprentices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .mentorship-level-apprentices .mentorship-node-empty {
    grid-column: 1 / -1;
  }

  .mentorship-node {
    width: 100%;
    padding: 5px;
  }

  .mentorship-node-master,
  .mentorship-node-self {
    width: min(100%, 250px);
  }

  .mentorship-node-profile {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 5px;
  }

  .mentorship-node-avatar {
    width: 30px;
    height: 30px;
  }

  .realm-cosmetics-panel,
  .realm-cosmetics-entry,
  .realm-privilege-admin-row {
    grid-template-columns: 1fr;
  }

  .treasure-summary {
    grid-template-columns: 1fr;
  }

  .aura-schedule-form {
    grid-template-columns: 1fr;
  }

  .tiandao-console,
  .tiandao-console > *,
  .tiandao-section > *,
  .aura-admin-panel,
  .aura-schedule-form {
    min-width: 0;
    max-width: 100%;
  }

  .aura-schedule-form > label,
  .aura-schedule-form input,
  .aura-schedule-form select,
  .aura-schedule-form button {
    width: 100%;
    max-width: 100%;
  }

  .treasure-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasure-action {
    align-items: stretch;
  }

  .realm-privilege-admin-row > small {
    white-space: normal;
  }

  .realm-cosmetics-entry .btn {
    justify-self: stretch;
  }

  .mentorship-relation,
  .mentorship-request {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .mentorship-relation > span,
  .mentorship-request > span,
  .mentorship-request > small {
    grid-column: 1 / -1;
  }
}

.schedule-start-control {
  display: grid;
  grid-template-columns: auto minmax(94px, auto) minmax(0, 1fr);
  align-items: end;
  gap: 4px;
  min-width: 0;
}

.schedule-start-label {
  grid-column: 1 / -1;
  color: #9fcfc3;
  font-size: 11px;
  line-height: 1.2;
}

.schedule-mode-switch,
.schedule-time-fields {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.schedule-mode-switch button,
.schedule-time-fields button,
.schedule-time-fields input {
  box-sizing: border-box;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  margin: 0;
}

.schedule-mode-switch button {
  min-width: 45px;
  padding: 4px 8px;
  color: #9fcfc3;
  border-color: rgba(92, 230, 209, .28);
  background: rgba(7, 28, 28, .62);
}

.schedule-mode-switch button.active {
  color: #effffb;
  border-color: rgba(92, 230, 209, .7);
  background: rgba(20, 91, 80, .78);
  box-shadow: 0 0 8px rgba(92, 230, 209, .16);
}

.schedule-time-fields[hidden] {
  display: none;
}

.schedule-time-fields input {
  min-width: 165px;
  width: 100%;
}

.schedule-time-fields button {
  flex: 0 0 auto;
  padding: 4px 8px;
}

@media (max-width: 430px) {
  .schedule-start-control {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .schedule-mode-switch {
    align-self: stretch;
  }

  .schedule-time-fields {
    grid-column: 1 / -1;
  }

  .world-event-schedule-form .schedule-mode-switch button,
  .aura-schedule-form .schedule-mode-switch button,
  .world-event-schedule-form .schedule-time-fields button,
  .aura-schedule-form .schedule-time-fields button {
    width: auto;
  }
}

.profile-identity-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 0 0 2px;
}

.profile-identity-line > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity-line .realm-title {
  flex: 0 0 auto;
}

.profile-signature {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 1px 0 0;
  padding: 4px 6px 0;
  overflow: hidden;
  color: #b7d8cf;
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-top: 1px solid rgba(92, 230, 209, .1);
}

.profile-archive {
  margin-top: 6px;
  padding: 6px 7px;
}

.profile-archive h3 {
  margin: 0 0 5px;
  font-size: 13px;
}

.profile-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(92, 230, 209, .16);
  border-left: 1px solid rgba(92, 230, 209, .16);
}

.profile-archive-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 28px;
  margin: 0;
  padding: 3px 5px;
  text-align: left;
  border: 0;
  border-right: 1px solid rgba(92, 230, 209, .16);
  border-bottom: 1px solid rgba(92, 230, 209, .16);
  border-radius: 0;
  background: rgba(4, 24, 21, .42);
}

.profile-archive-item span {
  color: #8dbbb2;
  font-size: 10px;
  white-space: nowrap;
}

.profile-archive-item strong {
  min-width: 0;
  overflow: hidden;
  color: #f3df9b;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-archive-item:hover,
.profile-archive-item:focus-visible {
  position: relative;
  z-index: 1;
  color: #effffb;
  background: rgba(20, 91, 80, .56);
  box-shadow: inset 0 0 0 1px rgba(92, 230, 209, .42), 0 0 10px rgba(92, 230, 209, .12);
  outline: none;
}

@media (max-width: 430px) {
  .profile-archive {
    margin-top: 0;
  }

  .profile-archive-item {
    min-height: 30px;
  }

  .profile-archive-item strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.modal-treasureHunt .modal-card {
  width: min(1060px, calc(100vw - 24px));
}

.treasure-hunt-panel {
  gap: 6px;
}

.treasure-observatory {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-bottom: 1px solid rgba(243, 207, 114, .32);
  background: #031612;
}

.treasure-observatory > img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.treasure-observatory > div {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: grid;
  gap: 1px;
  max-width: calc(100% - 20px);
  color: #eefcf9;
  text-shadow: 0 1px 5px #000, 0 0 12px #000;
}

.treasure-observatory span,
.treasure-observatory small {
  color: #bfe9df;
  font-size: 10px;
}

.treasure-observatory strong {
  color: #ffe184;
  font-size: 16px;
}

.treasure-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.treasure-summary span {
  min-width: 0;
  font-size: 11px;
}

.treasure-summary b {
  color: #f3cf72;
  white-space: nowrap;
}

.treasure-result-reveal {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 78px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(92, 230, 209, .2);
  background: rgba(3, 22, 18, .82);
}

.treasure-result-reveal > div:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.treasure-result-image,
.treasure-result-signal {
  width: 66px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(92, 230, 209, .26);
  background: rgba(2, 12, 11, .72);
}

.treasure-result-signal {
  display: grid;
  place-items: center;
  color: #52ead8;
  font-size: 30px;
}

.treasure-result-artwork,
.treasure-artwork,
.treasure-showcase-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.treasure-result-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.treasure-result-flags span,
.treasure-resonance,
.treasure-set-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 1px 4px;
  border: 1px solid rgba(243, 207, 114, .28);
  color: #f3cf72;
  font-size: 10px;
}

.treasure-result-reveal.is-revealing::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -18%;
  width: 18%;
  border-right: 1px solid rgba(224, 255, 248, .9);
  background: rgba(82, 234, 216, .16);
  box-shadow: 8px 0 18px rgba(82, 234, 216, .24);
  pointer-events: none;
  animation: treasure-scan-reveal .72s ease-out both;
}

@keyframes treasure-scan-reveal {
  from { transform: translateX(0); }
  to { transform: translateX(660%); }
}

.treasure-showcase-section h4,
.treasure-hunt-panel > section > h4 {
  margin: 2px 0 4px;
}

.treasure-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.treasure-showcase-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(92, 230, 209, .16);
  background: rgba(2, 18, 15, .46);
}

.treasure-showcase-item img,
.treasure-showcase-item .treasure-image-missing {
  width: 34px;
  height: 34px;
}

.treasure-showcase-item b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treasure-set-archive > summary {
  cursor: pointer;
  color: #f8e7a1;
  font-weight: 700;
}

.treasure-set-archive > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 5px;
}

.treasure-set-archive article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 6px;
  min-width: 0;
  padding: 5px;
  border-left: 2px solid rgba(92, 230, 209, .25);
  background: rgba(2, 18, 15, .42);
}

.treasure-set-archive article.complete {
  border-left-color: #f3cf72;
}

.treasure-set-archive article span,
.treasure-set-archive article p {
  display: grid;
  min-width: 0;
  margin: 0;
}

.treasure-set-archive article p {
  grid-column: 1 / -1;
  color: #b7d8cf;
  font-size: 10px;
  line-height: 1.35;
}

.treasure-set-archive article em {
  grid-column: 1 / -1;
  color: #ffe184;
  font-size: 10px;
}

.treasure-catalog {
  align-items: stretch;
}

.treasure-item {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  padding: 0 0 5px;
  overflow: hidden;
  border-radius: 5px;
}

.treasure-item-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #051d18;
}

.treasure-item.locked .treasure-artwork {
  filter: grayscale(1) brightness(.2) contrast(1.2);
}

.treasure-featured-mark {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 4px;
  color: #171203;
  background: #f3cf72;
  font-size: 9px;
  font-weight: 800;
}

.treasure-item-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0 6px;
}

.treasure-item-copy p {
  min-height: 2.7em;
  line-height: 1.35;
}

.treasure-showcase-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
}

.treasure-showcase-control select,
.treasure-showcase-control button {
  height: 26px;
  min-height: 26px;
  padding: 3px 5px;
  font-size: 10px;
}

.treasure-image-missing {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(82, 234, 216, .08);
}

.profile-layer .treasure-showcase {
  flex: 1 0 100%;
}

@media (max-width: 760px) {
  .treasure-observatory,
  .treasure-observatory > img {
    min-height: 96px;
    height: 96px;
  }

  .treasure-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasure-summary span:last-child {
    grid-column: 1 / -1;
  }

  .treasure-result-reveal {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .treasure-result-reveal > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .treasure-result-image,
  .treasure-result-signal {
    width: 58px;
  }

  .treasure-set-archive > div {
    grid-template-columns: 1fr;
  }

  .treasure-showcase-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .treasure-showcase-item img,
  .treasure-showcase-item .treasure-image-missing {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .treasure-result-reveal.is-revealing::after {
    display: none;
    animation: none;
  }
}

/* Compact organization rows keep their local 30px alignment contract. */
.sect-blacklist-form,
.sect-diplomacy-form {
  align-items: end;
}

.sect-blacklist-form > label,
.sect-diplomacy-form > label {
  align-self: end;
  min-width: 0;
  margin: 0;
}

.sect-blacklist-form > label > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.sect-blacklist-form > label > select,
.sect-blacklist-form > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.sect-blacklist-form > select,
.sect-blacklist-form > button,
.sect-diplomacy-form > label > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.sect-diplomacy-form > label > select,
.sect-diplomacy-form > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.sect-diplomacy-form > select,
.sect-diplomacy-form > button {
  box-sizing: border-box !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.sect-blacklist-form > button,
.sect-diplomacy-form > button {
  align-self: end !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  line-height: 1.2 !important;
}

/* Tiandao category layout and control alignment. Keep this after density rules. */
.modal-tiandao,
.modal-tiandao .modal-body,
.tiandao-console,
.tiandao-section,
.tiandao-section > *,
.tiandao-grid,
.grant-grid,
.tiandao-law-row,
.tiandao-card-form {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.modal-tiandao,
.modal-tiandao .modal-body {
  overflow-x: hidden;
}

.modal-tiandao [data-tiandao-panel] .modal-list {
  max-height: none;
  overflow: visible;
}

[data-tiandao-tabs] {
  box-sizing: border-box;
}

[data-tiandao-tab]:hover,
[data-tiandao-tab]:focus-visible {
  transform: none !important;
  box-shadow: inset 0 0 0 1px rgba(92, 230, 209, 0.16) !important;
}

.tiandao-form {
  align-items: end;
}

.tiandao-form > label {
  align-self: end;
  min-width: 0;
  margin: 0;
}

.tiandao-form > label > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.tiandao-form > label > select,
.tiandao-form > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.tiandao-form > select,
.tiandao-form > button {
  box-sizing: border-box !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.tiandao-form > button {
  align-self: end !important;
  width: auto;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  line-height: 1.2 !important;
}

/* Tiandao review action rows share the compact 30px control baseline. */
.appeal-review-form > input:not([type="hidden"]),
.appeal-review-form > select,
.appeal-review-form > button,
.high-risk-review-form > input:not([type="hidden"]),
.high-risk-review-form > select,
.high-risk-review-form > button,
.takeover-review-card > input:not([type="hidden"]),
.takeover-review-card > select,
.takeover-review-card > button {
  box-sizing: border-box !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-self: end !important;
}

.tiandao-lookup-form input[name="uid"] {
  width: 150px;
  max-width: 100%;
}

.tiandao-law-row .danger,
.high-risk-approval-panel .danger {
  border-color: rgba(255, 97, 97, 0.72) !important;
  background: rgba(104, 20, 24, 0.74) !important;
  color: #ffd2d2 !important;
}

@media (max-width: 760px) {
  [data-tiandao-tab] {
    flex: 0 0 64px;
    min-width: 64px;
  }

  .tiandao-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tiandao-lookup-form,
  .tiandao-law-row,
  .grant-grid,
  .tiandao-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiandao-lookup-form input[name="uid"] {
    justify-self: start;
  }
}

/* Organization member controls intentionally use the denser 28px baseline. */
.sect-member-management .sect-member-management-group > label,
.sect-member-management .sect-member-management-group > button {
  align-self: end !important;
}

.sect-member-management .sect-member-management-group select,
.sect-member-management .sect-member-management-group button,
.sect-member-management .sect-member-management-head button {
  box-sizing: border-box !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Compact application confirmation layer */
.app-dialog-open {
  overflow: hidden;
}

.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, .68);
}

.app-dialog-card {
  width: min(420px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 24px));
  overflow: auto;
  border: 1px solid rgba(92, 230, 209, .42);
  border-radius: 6px;
  background: #071d19;
  box-shadow: 0 16px 56px rgba(0, 0, 0, .62);
}

.app-dialog-card.app-dialog-danger,
.app-dialog-card.app-dialog-critical {
  border-color: rgba(255, 79, 91, .72);
}

.app-dialog-card > header,
.app-dialog-card > footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}

.app-dialog-card > header {
  border-bottom: 1px solid rgba(92, 230, 209, .18);
}

.app-dialog-critical > header {
  border-bottom-color: rgba(255, 79, 91, .34);
}

.app-dialog-card h2,
.app-dialog-card p {
  margin: 0;
}

.app-dialog-card h2 {
  font-size: 15px;
}

.app-dialog-danger h2,
.app-dialog-critical h2 {
  color: #ff8e96;
}

.app-dialog-content {
  display: grid;
  gap: 7px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.app-dialog-content label {
  display: grid;
  gap: 4px;
  color: #b7d8cf;
  font-size: 11px;
}

.app-dialog-content input {
  box-sizing: border-box;
  width: 100%;
  height: 30px;
}

.app-dialog-error {
  min-height: 16px;
  color: #ff9ba2;
  font-size: 11px;
}

.app-dialog-card > footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(92, 230, 209, .18);
}

@media (max-width: 760px) {
  .app-dialog-card {
    width: min(366px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-dialog-backdrop,
  .app-dialog-card {
    scroll-behavior: auto;
    animation: none;
    transition: none;
  }
}
