:root {
  --bg: #101010;
  --box: #303030;
  --box2: #282828;
  --field: #404040;
  --line: #505050;
  --white: #fff;
  --gray: #fff6;
  --drawer-bg: #181818;
  --drawer-text: #ffffffe0;
  --drawer-muted: #ffffff99;
  --drawer-hover: #282828;
  --toolbar: #202020;
  --toolbar-border: #ffffff14;
  --soft-bg: rgba(255,255,255,.04);
  --soft-bg-2: rgba(255,255,255,.03);
  --soft-hover: rgba(255,255,255,.08);
  --menu-bg: #181818;
  --control-bg: #202020;
  --control-bg-2: #151515;
  --avatar-bg: #303030;
  --media-bg: #111;
  --shadow: 0 2px 4px -1px #0008, 0 4px 5px #0006, 0 1px 10px #0006;
  --accent: #448aff;
  --accent-soft: #b3c0f8;
  --danger: #ff4757;
  --green: #4caf50;
  --yellow: #ffc107;
}

body.theme-light {
  --bg: #f4f6f8;
  --box: #ffffff;
  --box2: #f0f2f5;
  --field: #ffffff;
  --line: #d4d9e0;
  --white: #1d1f23;
  --gray: #5f6672;
  --drawer-bg: #ffffff;
  --drawer-text: #1d1f23;
  --drawer-muted: #6b7280;
  --drawer-hover: #e9eef8;
  --toolbar: #ffffff;
  --toolbar-border: #dfe4ea;
  --soft-bg: rgba(20,31,46,.045);
  --soft-bg-2: rgba(20,31,46,.035);
  --soft-hover: rgba(35,95,184,.09);
  --menu-bg: #ffffff;
  --control-bg: #f8fafc;
  --control-bg-2: #eef2f6;
  --avatar-bg: #e2e8f0;
  --media-bg: #eef2f6;
  --shadow: 0 1px 0 #dfe4ea;
  --accent-soft: #235fb8;
}

body.theme-light .inline-action.active,
body.theme-light .editor-context-menu button.active {
  color: #fff;
}

body.theme-light .comment-menu,
body.theme-light .editor-context-menu,
body.theme-light .person-picker__menu {
  box-shadow: 0 1px 0 #dfe4ea;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: Roboto, "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
img { display: block; }

.row { display: flex; flex-direction: row; }
.col { display: flex; flex-direction: column; }
.flex { flex: 1; }
.ai-center { align-items: center; }
.jc-center { justify-content: center; }
.bb { box-sizing: border-box; }
.br4 { border-radius: 4px; }
.br8 { border-radius: 8px; }
.w100 { width: 100%; }
.gray { color: var(--gray); }
.box { background-color: var(--box); overflow: hidden; }
.box2 { background-color: var(--box2); overflow: hidden; }
.a {
  color: var(--accent);
  text-decoration: none;
  outline: 0;
}
.a:hover { color: var(--accent-soft); transition: all .2s; }

.mdui-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
.py32 { padding-top: 32px; padding-bottom: 32px; }

.drawer {
  position: fixed;
  z-index: 20;
  top: 64px;
  bottom: 0;
  left: 0;
  width: 240px;
  background: var(--drawer-bg);
  color: var(--drawer-text);
  box-shadow: var(--shadow);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .2s cubic-bezier(.4,0,.2,1);
}
body.nav-open .drawer { transform: translateX(0); }
html.nav-open-initial .drawer { transform: translateX(0); }
html.nav-open-initial .drawer,
html.nav-open-initial .main > .mdui-container {
  transition: none !important;
}

.brand {
  height: 64px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--toolbar-border);
}
.drawer .brand { display: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}
.brand strong, .brand span { display: block; }
.brand span { color: var(--drawer-muted); font-size: 12px; }

.nav { padding: 8px 0; }
.nav a {
  height: 48px;
  padding: 0 16px;
  display: flex;
  gap: 32px;
  align-items: center;
  color: var(--drawer-text);
  text-decoration: none;
  font-size: 14px;
}
.nav a i { color: var(--drawer-muted); }
.nav a:hover, .nav a.active {
  background: var(--drawer-hover);
  color: var(--accent-soft);
}
.nav a.active i { color: var(--accent-soft); }
body.is-logged-in .nav a[href="./login.html"] { display: none; }
body:not(.is-admin) [data-admin-link],
body:not(.is-admin) .admin-only { display: none; }
body:not(.is-superadmin) .superadmin-only { display: none; }

.drawer-note {
  margin: 16px;
  padding: 16px;
  color: var(--gray);
  font-size: 13px;
}
.drawer-note p { margin: 8px 0 0; }

.main {
  min-height: 100vh;
  margin-left: 0;
  padding-top: 64px;
}
.main > .mdui-container {
  transform-origin: top right;
  transition:
    transform .2s cubic-bezier(.4,0,.2,1),
    filter .2s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
body.nav-open .main > .mdui-container {
  transform: translateX(96px) scale(.92);
  filter: drop-shadow(0 18px 32px #0009);
}
html.nav-open-initial .main > .mdui-container {
  transform: translateX(96px) scale(.92);
  filter: drop-shadow(0 18px 32px #0009);
}
body.theme-light.nav-open .main > .mdui-container,
html.nav-open-initial body.theme-light .main > .mdui-container {
  filter: none;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 0 16px;
  color: var(--white);
  background: var(--toolbar);
  border-bottom: 1px solid var(--toolbar-border);
  box-shadow: var(--shadow);
}
.top-logo {
  min-width: 118px;
  font-size: 20px;
  white-space: nowrap;
}
.top-logo.styled-logo {
  min-width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .3px;
}
.top-logo.styled-logo span {
  color: var(--white);
}
.top-logo.styled-logo b {
  padding: 5px 8px 6px;
  border-radius: 4px;
  color: #101010;
  background: #ff9800;
  font-size: 20px;
  font-weight: 900;
}
.top-logo.styled-logo em {
  margin-left: 4px;
  color: var(--gray);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}
.top-logo.page-logo {
  min-width: auto;
  display: inline-flex;
  align-items: center;
}
.top-logo.page-logo b {
  padding: 5px 8px 6px;
  border-radius: 4px;
  color: #101010;
  background: #ff9800;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.login-register-tip {
  margin-left: auto;
  color: var(--gray);
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}
.login-register-tip a {
  color: var(--accent);
  text-decoration: none;
}
.login-register-tip a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}
.panel-title a {
  color: var(--accent);
  text-decoration: none;
}
.panel-title a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}
.search {
  flex: 1;
  height: 40px;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--toolbar-border);
  background: var(--field);
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
}
.search input::placeholder { color: var(--gray); }
.top-action {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--white);
  background: var(--box);
  cursor: pointer;
}
.top-action.danger { background: rgba(255,71,87,.9); }
.top-action i { font-size: 18px; }
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 112px;
  padding: 0 16px;
  text-decoration: none;
}

.mobile-tabbar {
  display: none;
}

.mobile-tabbar__item {
  color: inherit;
  text-decoration: none;
}
.language-switcher {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  font-size: 13px;
}
.language-switcher .material-icons { font-size: 18px; }
.language-switcher select {
  min-width: 108px;
  padding: 6px 24px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--white);
  background: var(--box);
}
.theme-light .language-switcher select { color: var(--black); }
@media (max-width: 700px) {
  .language-switcher select { min-width: 92px; font-size: 12px; }
  .language-switcher { gap: 3px; }
}

.zhuzhiliao-pet {
  position: fixed;
  inset: 0;
  z-index: 65;
  width: 100vw;
  height: 100vh;
  user-select: none;
  pointer-events: none;
  touch-action: none;
  background: transparent;
}
body.zhuzhiliao-dragging,
body.zhuzhiliao-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
.zhuzhiliao-pet[hidden] {
  display: none;
}
.zhuzhiliao-pet__shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.zhuzhiliao-pet__hit {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  background: transparent;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  outline: 0;
  transform: none;
}
.zhuzhiliao-pet__hit:active {
  cursor: grabbing;
}
.zhuzhiliao-pet__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.zhuzhiliao-pet__bar {
  display: none;
}
.zhuzhiliao-pet__grip {
  display: none;
}
.zhuzhiliao-pet__name {
  display: none;
}
.zhuzhiliao-pet__bubble {
  display: none;
}
.zhuzhiliao-pet.active .zhuzhiliao-pet__bubble {
  display: none;
}

.hero {
  position: relative;
  min-height: 0;
  padding: 0;
  background: var(--media-bg);
  overflow: hidden;
}
.hero-title-image {
  width: 100%;
  height: auto;
  max-height: min(420px, 42vw);
  object-fit: contain;
  background: var(--media-bg);
}
.hero-copy, .stats { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 8px;
  color: #fffc;
  font-size: 12px;
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.1;
}
.hero p:last-child {
  margin: 12px 0 0;
  color: #fffc;
  font-size: 18px;
}
.stats {
  display: flex;
  gap: 8px;
}
.stats div {
  min-width: 88px;
  padding: 12px;
  border-radius: 4px;
  background: #00000040;
}
.stats b { display: block; font-size: 28px; line-height: 1; }
.stats span { color: #fffc; font-size: 13px; }

.section { padding-top: 32px; }
.first-section { padding-top: 0; }
.section-title, .panel-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.section-title h2, .panel-title h2 {
  flex: 1;
  margin: 0;
  font-size: 24px;
  font-weight: 400;
}
.app-title::before {
  content: "";
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background-color: var(--accent);
}
.section-title span, .panel-title span { color: var(--gray); font-size: 14px; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.home-main {
  min-width: 0;
}
.home-subtitle {
  margin-top: 28px;
}
.notice-panel {
  position: sticky;
  top: 84px;
  padding: 18px;
  background: var(--box2);
}
.notice-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.notice-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.notice-panel p {
  margin: 0;
  color: var(--white);
  line-height: 1.8;
}
.zhuzhiliao-dock {
  position: relative;
  min-height: 156px;
  margin-top: auto;
  border: 4px solid rgba(255,255,255,.68);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.24),
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 0 0 1px rgba(0,0,0,.18);
  overflow: hidden;
}
.zhuzhiliao-dock[hidden] {
  display: none;
}
.zhuzhiliao-dock::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255,255,255,.28);
  border-radius: 9px;
}
.zhuzhiliao-dock::after {
  content: "";
  position: absolute;
  inset: 18px 18px 16px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22);
  opacity: 1;
}
.zhuzhiliao-dock__dot {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 0 0 1px rgba(0,0,0,.28);
}
.zhuzhiliao-dock span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: var(--gray);
  font-size: 12px;
  letter-spacing: .12em;
}
.searchbar {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 4px;
  color: var(--gray);
  background: var(--field);
}
.searchbar i {
  flex: 0 0 auto;
  margin-left: 12px;
  font-size: 22px;
}
.searchbar input {
  height: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 12px 0 0;
  background: transparent;
}
.searchbar:focus-within {
  border-color: #fff;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.featured-card {
  color: inherit;
  text-decoration: none;
  min-height: 240px;
  position: relative;
  border: 2px solid #fff0;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background: #282828;
  transition: border .2s cubic-bezier(.4,0,.2,1);
}
body.theme-light .featured-card {
  background: #eef2f6;
}
.featured-card:hover { border: 2px solid #fffc; }
.featured-bg {
  position: absolute;
  inset: 0;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
}
.featured-card .person-body {
  position: relative;
  z-index: 1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.recent-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border: 2px solid #fff0;
  border-radius: 8px;
  background: var(--box);
  cursor: pointer;
  overflow: hidden;
  transition: border .2s cubic-bezier(.4,0,.2,1);
}
.recent-card:hover { border: 2px solid #fffc; }
.recent-cover {
  position: relative;
  height: 142px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  background: var(--media-bg);
  overflow: hidden;
}
.recent-cover:has(.recent-cover-tile:nth-child(3)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
}
.recent-cover-tile {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background-color: var(--accent);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
  font-size: 34px;
  font-weight: 700;
}
body.theme-light .recent-cover,
body.theme-light .person-banner,
body.theme-light .dialog .person-banner {
  background: #eef2f6;
}
.recent-cover .cred {
  position: absolute;
  right: 8px;
  bottom: 8px;
}
.recent-body { padding: 12px; }
.recent-body .incident-flags {
  margin-bottom: 7px;
}
.recent-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.recent-body p {
  margin: 0;
  color: var(--gray);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.person-card {
  color: inherit;
  text-decoration: none;
  min-height: 176px;
  display: flex;
  align-items: stretch;
  padding: 18px;
  border: 2px solid #fff0;
  border-radius: 8px;
  background: var(--box);
  cursor: pointer;
  overflow: hidden;
  transition: border .2s cubic-bezier(.4,0,.2,1);
}
.person-card:hover { border: 2px solid #fffc; }
.person-banner {
  flex: 0 0 160px;
  width: 160px;
  min-height: 118px;
  border-radius: 4px;
  background: #222;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
}
.person-card-avatar {
  flex-basis: 118px;
  width: 118px;
  height: 118px;
  min-height: 118px;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background-color: var(--accent);
  font-size: 34px;
  font-weight: 700;
  overflow: hidden;
}
.person-card-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50%;
}
.person-body {
  min-width: 0;
  flex: 1;
  align-self: stretch;
  padding: 10px 12px 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.avatar {
  display: none;
}
.person-card h3, .featured-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 400;
}
.person-card p {
  margin: 8px 0 0;
  color: var(--gray);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.muted { color: var(--gray); }
.tags, .accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tag, .account-pill, .cred {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  background: #fff3;
  font-size: 12px;
  line-height: 1.4;
}
.incident-flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tag.flag {
  flex: 0 0 auto;
}
.tag.flag.pinned { background: #d93025; }
.tag.flag.recommended {
  color: #101010;
  background: #ffc107;
}
.tag.flag.entertainment {
  color: #101010;
  background: #ff9800;
}
.tag.flag.edit {
  background: #448aff;
}
.tag.flag.truthy {
  color: #101010;
  background: #4caf50;
}
.tag.flag.falsy {
  background: #b00020;
}
body.theme-light .tag:not(.flag),
body.theme-light .tag-input__pill {
  color: #1d1f23;
  background: rgba(20,31,46,.1);
  border: 1px solid rgba(20,31,46,.12);
}
body.theme-light .tag-input__pill button {
  color: #4b5563;
}
.account-pill.qq { background: #d93025; }
.account-pill.bilibili { background: #fb7299; }
.account-pill.douyin { background: #111; }
.account-pill.gas { background: #1976d2; }
.cred.confirmed { background: #4caf50; }
.cred.disputed { color: #101010; background: #ffc107; }
.cred.cleared { background: #448aff; }
.cred.unverified { background: #666; }

.timeline {
  display: grid;
  gap: 8px;
}
.timeline-item {
  padding: 16px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  border-radius: 8px;
  background: var(--box);
}
.timeline-cover {
  min-height: 132px;
  height: 100%;
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-radius: 6px;
  background: var(--media-bg);
  overflow: hidden;
  text-decoration: none;
}
.timeline-content {
  min-width: 0;
}
.timeline-cover:has(.recent-cover-tile:nth-child(3)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
}
.timeline-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.timeline-head h3,
.incident-detail .timeline-head h1 {
  flex: 1 1 100%;
  width: 100%;
}
.timeline-head .incident-flags {
  min-width: 0;
  flex: 1 1 auto;
}
.edit-link {
  flex: 0 0 auto;
  font-size: 14px;
}
.text-danger {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}
.text-danger:hover { color: #ff7b86; }
.timeline h3 {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 400;
}
.timeline p {
  margin: 8px 0 0;
  color: var(--gray);
}
.evidence {
  margin-top: 12px;
  padding: 12px;
  white-space: pre-wrap;
  color: var(--gray);
  background: var(--soft-bg);
  border-radius: 4px;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.image-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--box2);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.rule-grid div {
  min-height: 92px;
  padding: 16px;
  color: var(--gray);
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.action-card {
  min-height: 160px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--box);
}
.action-card:hover {
  border-color: #fffc;
}
.action-card i {
  color: var(--accent);
  font-size: 34px;
}
.action-card b {
  font-size: 20px;
}
.action-card span {
  color: var(--gray);
}

.foot {
  margin-top: 32px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--box);
}
.foot h1 {
  margin: 0;
  color: var(--white);
  font-size: 16px;
  line-height: 30px;
}
.foot p {
  margin: 0;
  color: var(--gray);
  font-size: 10px;
  line-height: 20px;
}
.foot a {
  color: var(--accent);
  text-decoration: none;
}
.foot a:hover { color: var(--accent-soft); transition: all .4s; }

input, select, textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 4px;
  outline: none;
  padding: 12px;
  color: var(--white);
  background: var(--field);
}
input:focus, select:focus, textarea:focus {
  border: 2px solid #fff;
  transition: all .4s;
}
select[multiple] {
  min-height: 132px;
}
textarea { resize: vertical; }
.list-controls {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 18px;
}
.sort-control {
  width: min(100%, 172px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--toolbar-border);
  border-radius: 8px;
  color: var(--gray);
  background: var(--box);
}
.sort-control i {
  font-size: 20px;
}
.sort-control select {
  height: 34px;
  padding: 4px 2px;
  border: 0;
  color: var(--white);
  background: transparent;
}
.sort-control select:focus {
  border: 0;
}
.picker-label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--gray);
  font-size: 14px;
}
.person-picker {
  position: relative;
}
.person-picker__button {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 4px;
  color: var(--white);
  background: var(--field);
  cursor: pointer;
  text-align: left;
}
.person-picker__button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-picker__button i {
  color: var(--gray);
  transition: transform .2s;
}
.person-picker.open .person-picker__button {
  border-color: #fff;
}
.person-picker.open .person-picker__button i {
  transform: rotate(180deg);
}
.person-picker__menu {
  display: none;
  position: absolute;
  z-index: 15;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--box2);
  box-shadow: var(--shadow);
  overflow: auto;
}
.person-picker.open .person-picker__menu {
  display: grid;
  gap: 4px;
}
.person-picker__option {
  margin: 0;
  padding: 10px;
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
  border-radius: 4px;
  color: var(--white) !important;
  cursor: pointer;
}
.person-picker__option:hover {
  background: var(--soft-hover);
}
.person-picker__option input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}
.person-picker__empty {
  padding: 14px;
  color: var(--gray);
  text-align: center;
}
.person-picker__values {
  display: none;
}
.editor-label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--gray);
  font-size: 14px;
}
.editor-shell {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--field);
}
.editor-toolbar {
  min-height: 46px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-bg);
}
.editor-toolbar button {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--white);
  background: var(--control-bg);
  cursor: pointer;
}
.editor-toolbar button:hover {
  border-color: var(--accent);
  background: rgba(68,138,255,.14);
}
.editor-toolbar i {
  font-size: 20px;
}
.editor-toolbar input[type="file"] {
  display: none;
}
.rich-editor {
  min-height: 320px;
  padding: 18px;
  color: var(--white);
  line-height: 1.8;
  outline: none;
}
.rich-editor.compact {
  min-height: 220px;
}
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--gray);
}
.rich-editor.drag-over {
  background: rgba(68,138,255,.1);
}
.editor-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 188px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: var(--menu-bg);
  box-shadow: var(--shadow);
}
.editor-context-title {
  padding: 4px 6px 8px;
  color: var(--gray);
  font-size: 12px;
}
.context-row,
.context-number-row,
.context-stepper {
  display: flex;
  gap: 6px;
}
.context-number-row {
  margin-top: 6px;
  align-items: center;
}
.editor-context-menu button {
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--white);
  background: var(--control-bg-2);
  cursor: pointer;
}
.editor-context-menu button:hover {
  border-color: var(--accent);
  background: rgba(68,138,255,.14);
}
.editor-context-menu button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.editor-context-menu button.active:hover {
  background: #2f7df0;
}
.editor-context-menu i {
  font-size: 20px;
}
.context-stepper {
  align-items: center;
}
.editor-context-menu input {
  width: 74px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  color: var(--white);
  background: var(--control-bg-2);
}
.context-number-row span {
  color: var(--gray);
  font-size: 12px;
}
.rich-editor p,
.incident-content p {
  margin: 0 0 12px;
}
.rich-editor h1,
.rich-editor h2,
.rich-editor h3,
.rich-editor h4,
.rich-editor h5,
.rich-editor h6,
.incident-content h1,
.incident-content h2,
.incident-content h3,
.incident-content h4,
.incident-content h5,
.incident-content h6 {
  margin: 18px 0 10px;
  color: var(--white);
  line-height: 1.28;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.rich-editor h1,
.incident-content h1 { font-size: 28px; }
.rich-editor h2,
.incident-content h2 {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 24px;
}
.rich-editor h3,
.incident-content h3 { font-size: 20px; }
.rich-editor h4,
.incident-content h4 { font-size: 18px; }
.rich-editor h5,
.incident-content h5,
.rich-editor h6,
.incident-content h6 { font-size: 16px; }
.rich-editor ul,
.rich-editor ol,
.incident-content ul,
.incident-content ol {
  margin: 10px 0 14px;
  padding-left: 24px;
}
.rich-editor li,
.incident-content li {
  margin: 4px 0;
}
.rich-editor code,
.incident-content code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #ffcf9e;
  background: var(--control-bg-2);
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em;
}
.rich-editor pre,
.incident-content pre {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control-bg-2);
  overflow: auto;
}
.rich-editor pre code,
.incident-content pre code {
  padding: 0;
  color: var(--white);
  background: transparent;
  white-space: pre;
}
.rich-editor hr,
.incident-content hr {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: var(--line);
}
.rich-editor table,
.incident-content table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}
.rich-editor th,
.rich-editor td,
.incident-content th,
.incident-content td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.rich-editor th,
.incident-content th {
  background: var(--soft-bg);
  font-weight: 700;
}
.rich-editor a,
.incident-content a {
  color: #64b5f6;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
.rich-editor a:hover,
.incident-content a:hover {
  color: #90caf9;
}
.rich-editor img,
.incident-content img {
  display: block;
  width: min(100%, 420px);
  max-width: 100%;
  height: auto;
  margin: 14px 0;
  border-radius: 6px;
  background: var(--media-bg);
}
.rich-editor blockquote,
.incident-content blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  color: var(--gray);
  background: var(--soft-bg);
}
.incident-content {
  margin-top: 10px;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.incident-summary {
  margin: 10px 0 8px;
  color: var(--white);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.incident-actions,
.detail-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inline-action {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gray);
  background: var(--soft-bg);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.inline-action i {
  font-size: 17px;
}
.inline-action:hover,
.inline-action.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(68,138,255,.18);
}
.inline-action.active {
  background: var(--accent);
}
.inline-action.truth-vote.falsy.active {
  border-color: #b00020;
  background: #b00020;
}
.inline-action.danger {
  color: #ff8a93;
}
.inline-action.danger:hover {
  color: #fff;
  border-color: var(--danger);
  background: rgba(255,71,87,.2);
}
.detail-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
}
.incident-detail {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px;
}
.incident-detail h1 {
  flex: 1;
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.incident-detail-content {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.incident-result {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--soft-bg);
}
.comments-section {
  max-width: 980px;
  margin: 16px auto 0;
  padding: 22px;
}
.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.comments-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}
.comment-list {
  display: grid;
  gap: 12px;
}
.comment-item {
  scroll-margin-top: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-bg-2);
}
.comment-item.comment-highlight {
  border-color: var(--accent);
  background: rgba(68,138,255,.14);
}
.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--avatar-bg);
}
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.comment-body {
  position: relative;
  min-width: 0;
}
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray);
  font-size: 13px;
}
.comment-meta b {
  color: var(--white);
  font-weight: 500;
}
.comment-more-button {
  width: 30px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--gray);
  background: transparent;
  cursor: pointer;
}
.comment-more-button:hover {
  color: var(--white);
  background: var(--soft-hover);
}
.comment-more-button i {
  font-size: 20px;
}
.comment-body p {
  margin: 8px 0 0;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.comment-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.comment-footnote {
  min-width: 0;
  color: var(--gray);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.comment-menu {
  position: absolute;
  right: 0;
  top: 32px;
  z-index: 8;
  min-width: 132px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--menu-bg);
  box-shadow: var(--shadow);
}
.comment-author-link {
  max-width: min(48vw, 360px);
  display: inline-block;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}
.comment-menu.open {
  display: grid;
  gap: 4px;
}
.comment-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.comment-menu button:hover {
  background: var(--soft-hover);
}
.comment-menu button.danger {
  color: #ff8a93;
}
.comment-menu button i {
  font-size: 18px;
}
.reply-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.reply-box {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-bg-2);
}
.reply-list.is-collapsed .reply-box {
  display: none;
}
.comment-item.is-reply {
  padding: 10px 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: transparent;
}
.comment-item.is-reply + .comment-item.is-reply {
  border-top: 1px solid var(--line);
}
.comment-item.is-reply .comment-avatar {
  width: 34px;
  height: 34px;
}
.comment-item.is-reply .comment-footer {
  margin-top: 6px;
}
.reply-expand {
  width: max-content;
}
.comment-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}
.reply-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.comment-form textarea {
  width: 100%;
  resize: vertical;
}
.reply-form textarea {
  width: 100%;
  resize: vertical;
}
.login-required {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gray);
  background: var(--soft-bg-2);
}
.person-bio-content img {
  max-width: min(100%, 520px);
  max-height: 420px;
}
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.upload-card {
  min-height: 132px;
  margin-top: 14px;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: var(--gray);
  background: var(--soft-bg-2);
  cursor: pointer;
  text-align: center;
  transition: border .2s, background .2s, color .2s;
}
.upload-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.upload-card.has-preview .upload-preview {
  opacity: 1;
}
.upload-card.has-preview {
  color: #fff;
  text-shadow: 0 1px 2px #000c;
}
.upload-card.has-preview i,
.upload-card.has-preview b,
.upload-card.has-preview span {
  position: relative;
  z-index: 1;
}
.upload-grid .upload-card {
  margin-top: 0;
}
.upload-card input[type="file"] {
  display: none;
}
.upload-card i {
  color: var(--accent);
  font-size: 34px;
}
.upload-card b {
  color: var(--white);
  font-size: 15px;
}
.upload-card span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.upload-card:hover,
.upload-card.drag-over {
  border-color: var(--accent);
  background: rgba(68,138,255,.12);
  color: var(--white);
}
.upload-card.has-file {
  border-style: solid;
  border-color: var(--accent);
}
.upload-card.wide {
  min-height: 150px;
}
.form-panel {
  padding: 24px;
}
.form-page {
  max-width: 920px;
  margin: 0 auto;
}
.form-panel label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--gray);
  font-size: 14px;
}
.tag-input-label {
  align-items: stretch;
}
.tag-input {
  min-height: 44px;
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--white);
  background: var(--field);
  cursor: text;
}
.tag-input:focus-within {
  border-color: var(--accent);
}
.tag-input__list {
  display: contents;
}
.tag-input__pill {
  min-height: 28px;
  max-width: 100%;
  padding: 3px 4px 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  color: #fff;
  background: #fff3;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.tag-input__pill button {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.tag-input__pill button:hover {
  background: rgba(255,255,255,.14);
}
.tag-input__pill i {
  font-size: 16px;
}
.tag-input input[data-tag-entry] {
  width: auto;
  min-width: 160px;
  flex: 1 1 180px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  color: var(--white);
  background: transparent;
  outline: none;
}
.tag-input input[data-tag-entry]:focus {
  border: 0;
}
.gas-search {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.gas-search__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.gas-search__bar button {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #1976d2;
  cursor: pointer;
}
.gas-search__bar button:disabled {
  opacity: .65;
  cursor: wait;
}
.gas-search__bar i {
  font-size: 20px;
}
.gas-search__results {
  display: grid;
  gap: 8px;
}
.gas-search__message {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--gray);
  background: var(--soft-bg);
}
.gas-result {
  width: 100%;
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: var(--field);
  cursor: pointer;
  text-align: left;
}
.gas-result:hover,
.gas-result.selected {
  border-color: #1976d2;
}
.gas-result__avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1976d2;
  overflow: hidden;
  font-weight: 700;
}
.gas-result__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gas-result__body {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.gas-result__body b,
.gas-result__body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gas-result__body small {
  color: var(--gray);
  font-size: 12px;
}
.gas-result__use {
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  background: #1976d2;
  font-size: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.form-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.form-row.single {
  grid-template-columns: minmax(0, 1fr);
}
.switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.flag-picker {
  margin-top: 14px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--field);
}
.flag-picker summary {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--white);
  cursor: pointer;
  list-style: none;
}
.flag-picker summary::-webkit-details-marker {
  display: none;
}
.flag-picker summary i {
  transition: transform .16s ease;
}
.flag-picker[open] summary i {
  transform: rotate(180deg);
}
.flag-picker__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.flag-picker__panel label {
  margin: 0;
  min-width: 0;
  padding: 10px;
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 8px !important;
  border-radius: 4px;
  color: var(--white) !important;
  background: var(--soft-bg);
}
.flag-picker__panel input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}
.form-panel .switch-row {
  min-height: 64px;
  margin-top: 0;
  padding: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--field);
}
.switch-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.switch-row b {
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}
.switch-row small {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.4;
}
.switch-row input {
  width: 42px;
  height: 22px;
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #555;
  cursor: pointer;
}
.switch-row input::before {
  content: "";
  width: 18px;
  height: 18px;
  margin: 2px;
  display: block;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
.switch-row input:checked {
  background: var(--accent);
}
.switch-row input:checked::before {
  transform: translateX(20px);
}
.primary-button {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}
.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 14px;
}
.auth-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--box);
}
.auth-card h3 {
  margin: 0;
  font-size: 20px;
}
.auth-card p {
  margin: 8px 0 0;
  color: var(--gray);
}
.profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.profile-head.compact {
  flex: 1;
}
.profile-head.compact p {
  margin: 2px 0 0;
}
.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--avatar-bg);
  border: 1px solid var(--line);
  font-weight: 700;
  overflow: hidden;
}
.profile-avatar.small {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  font-size: 14px;
}
.profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50%;
}
.audit-meta {
  color: var(--gray);
  font-size: 13px;
}
.history-box {
  margin-top: 12px;
  color: var(--gray);
}
.history-box summary {
  cursor: pointer;
  color: var(--white);
}
.history-list {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--soft-bg);
}
.history-list p {
  margin: 4px 0;
  font-size: 13px;
}
.review-item b {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}
.review-item .pending {
  background: #d97706;
  color: #fff;
}
.review-detail {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.review-title-row,
.review-person-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.review-title-row h4,
.review-person-head h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}
.review-person-head {
  justify-content: flex-start;
}
.review-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  background-color: var(--avatar-bg);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 500;
  color: #fff;
}
.review-banner {
  min-height: 140px;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  background-color: var(--media-bg);
}
.review-fields {
  display: grid;
  gap: 8px;
}
.review-field {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--soft-bg-2);
}
.review-field span {
  color: var(--gray);
  font-size: 12px;
}
.review-field b {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.review-section-title {
  color: var(--gray);
  font-size: 12px;
  letter-spacing: 0;
}
.review-accounts .account-row {
  align-items: center;
}
.role-switch {
  width: min(280px, 100%);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--gray);
  font-size: 14px;
}
.role-switch select {
  height: 40px;
  padding: 0 10px;
}

.dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: 86vh;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--white);
  background: var(--box2);
  overflow: auto;
}
.dialog::backdrop { background: rgba(0,0,0,.62); }
.editor-dialog { width: min(920px, calc(100vw - 32px)); }
.editor-tabs {
  display: flex;
  padding: 0 56px 0 8px;
  height: 48px;
  align-items: end;
  background: var(--control-bg);
}
.editor-tab {
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--gray);
  background: transparent;
  cursor: pointer;
}
.editor-tab.active {
  color: var(--white);
  border-bottom-color: var(--accent);
}
.close-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--soft-hover);
  font-size: 24px;
  cursor: pointer;
}
.dialog-inner { padding: 24px; }
.dialog .person-banner {
  width: 100%;
  height: 180px;
  flex: none;
  border-radius: 0;
}
.dialog .avatar {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin-top: -64px;
  margin-bottom: 12px;
  border: 4px solid var(--box2);
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 28px;
  font-weight: 700;
}
.hidden { display: none !important; }
.empty {
  padding: 32px;
  border-radius: 8px;
  text-align: center;
  color: var(--gray);
  background: var(--box);
}

.settings-dialog { width: min(520px, calc(100vw - 32px)); }
.settings-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}
.setting-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 8px;
  background: var(--box);
}

.history-entry {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.history-entry:first-child { border-top: 0; }
.history-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.history-entry-head p { margin: 0; }
.history-changes {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.history-change {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  font-size: 13px;
}
.history-change > i { font-size: 18px; color: var(--gray); }
.history-before, .history-after {
  padding: 6px 8px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.history-before { background: rgba(255, 71, 87, .1); }
.history-after { background: rgba(46, 204, 113, .1); }
.history-no-change { color: var(--gray); font-size: 13px; }
.trash-item { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 700px) {
  .history-entry-head { align-items: flex-start; flex-direction: column; }
  .history-change { grid-template-columns: 72px minmax(0, 1fr); }
  .history-change > i { display: none; }
  .history-after { grid-column: 2; }
}
.setting-link {
  color: var(--white);
  text-decoration: none;
}
.setting-link i {
  color: var(--gray);
}
.mobile-only-setting {
  display: none;
}
.space-head {
  position: relative;
  overflow: hidden;
  background: var(--box2);
}
.space-banner {
  height: 240px;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--media-bg);
  background-image: none;
}
body.theme-light .space-banner {
  background-color: var(--media-bg);
  background-image: none;
}
.space-profile {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 2;
  display: flex;
  gap: 16px;
  align-items: center;
}
.space-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.space-edit,
.space-delete {
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  border-radius: 4px;
  color: #fff;
  background: #00000066;
  text-decoration: none;
  cursor: pointer;
}
.space-edit:hover,
.space-delete:hover {
  color: #fff;
  background: #00000099;
}
.space-delete {
  background: rgba(255,71,87,.82);
}
.space-avatar {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  color: var(--white);
  background: var(--avatar-bg);
  border: 3px solid var(--box2);
  font-size: 28px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 6px 18px #00000024;
}
.space-avatar img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50%;
}
.space-profile h1 {
  margin: 0;
  font-size: 24px;
}
.space-profile p {
  margin: 4px 0 0;
  color: var(--gray);
}

body.theme-light .space-avatar {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--white);
  box-shadow: 0 0 0 1px #dfe4ea;
}

body.theme-light .space-profile h1,
body.theme-light .space-profile p {
  text-shadow: 0 1px 2px #ffffffb8;
}
body.theme-light .upload-card.has-preview {
  text-shadow: none;
}
body.theme-light .mobile-tabbar {
  box-shadow: none;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
.detail-panel {
  padding: 24px;
}
.account-list {
  display: grid;
  gap: 8px;
}
.account-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 4px;
  background: var(--box);
}
.account-row .account-pill {
  min-width: 54px;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
}
.account-link,
.account-empty {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--soft-bg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-link {
  color: var(--white);
  text-decoration: none;
}
.account-link.compact {
  font-size: 12px;
}
.account-link.tiny {
  font-size: 11px;
  letter-spacing: 0;
}
.account-link:hover {
  background: var(--soft-hover);
}
.account-empty {
  color: var(--gray);
}
.account-row small {
  grid-column: 2;
  color: var(--gray);
}
.setting-row span {
  display: grid;
  gap: 4px;
}
.setting-row small {
  color: var(--gray);
}
.setting-row input {
  width: 44px;
  height: 24px;
  accent-color: var(--accent);
}

@media (max-width: 1024px) {
  .top-logo { min-width: auto; }
  .top-logo.styled-logo em { display: none; }
  .featured-grid, .recent-grid, .people-grid, .rule-grid { grid-template-columns: 1fr 1fr; }
  .home-layout { grid-template-columns: 1fr; }
  .notice-panel { position: static; }
  .notice-copy { gap: 8px; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .list-controls {
    justify-content: stretch;
  }
  .sort-control {
    width: 100%;
  }
  .desktop-only-mobile-hidden {
    display: none;
  }
  .mobile-only-setting {
    display: flex;
  }
  body {
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
  }
  .main {
    padding-top: 56px;
    padding-bottom: 12px;
  }
  .topbar {
    height: 56px;
    gap: 8px;
    padding: 0 8px;
  }
  .icon-button {
    display: none;
  }
  .top-logo {
    display: block;
    min-width: 0;
    max-width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
  }
  .login-register-tip {
    margin-left: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
  }
  .search {
    height: 36px;
    min-width: 0;
    max-width: none;
    padding: 0 10px;
  }
  .search input { font-size: 14px; }
  .drawer {
    display: none;
  }
  body.nav-open .main > .mdui-container {
    transform: none;
  }
  .mobile-tabbar {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(50px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--toolbar);
    border-top: 1px solid var(--toolbar-border);
    box-shadow: 0 -1px 4px #0005;
  }
  .mobile-tabbar__item {
    min-width: 0;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--gray);
    font-size: 12px;
    line-height: 1;
  }
  .mobile-tabbar__item i {
    height: 24px;
    font-size: 24px;
    line-height: 24px;
  }
  .mobile-tabbar__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-tabbar__item.active {
    color: #2293fa;
  }
  .mdui-container {
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }
  .py32 {
    padding-top: 8px;
    padding-bottom: 24px;
  }
  .section { padding-top: 20px; }
  .section-title, .panel-title {
    margin-bottom: 10px;
    gap: 8px;
  }
  .section-title h2, .panel-title h2 {
    font-size: 20px;
  }
  .app-title::before {
    width: 4px;
    height: 22px;
  }
  .hero {
    border-radius: 8px;
  }
  .hero-title-image {
    max-height: 34vw;
  }
  .stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .stats div {
    min-width: 0;
    padding: 10px;
  }
  .stats b { font-size: 22px; }
  .featured-grid,
  .recent-grid,
  .people-grid,
  .rule-grid,
  .action-grid,
  .form-row,
  .switch-grid,
  .upload-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .flag-picker__panel {
    grid-template-columns: 1fr;
  }
  .upload-card {
    min-height: 112px;
    padding: 14px;
  }
  .featured-card,
  .featured-card .person-body {
    min-height: 168px;
  }
  .featured-card .person-body {
    padding: 16px;
  }
  .recent-body {
    padding: 10px 12px 12px;
  }
  .recent-cover {
    height: 126px;
  }
  .recent-body h3,
  .person-card h3,
  .featured-card h3 {
    font-size: 17px;
  }
  .person-card {
    min-height: 156px;
    padding: 12px;
    align-items: stretch;
    border-radius: 8px;
  }
  .person-banner {
    flex: 0 0 120px;
    width: 120px;
    min-height: 96px;
  }
  .person-card-avatar {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
    min-height: 96px;
    border-radius: 50%;
  }
  .person-body {
    padding: 8px 8px 8px 14px;
  }
  .person-card p {
    margin-top: 6px;
    font-size: 13px;
  }
  .tags, .accounts {
    gap: 4px;
    margin-top: 6px;
  }
  .tag, .account-pill, .cred {
    font-size: 11px;
    padding: 2px 5px;
  }
  .timeline-item {
    padding: 12px;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
  }
  .timeline-cover {
    min-height: 96px;
  }
  .timeline-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .timeline-head h3,
  .incident-detail .timeline-head h1 {
    flex: 1 1 100%;
    width: 100%;
  }
  .timeline-head .incident-flags {
    order: 2;
    width: 100%;
  }
  .timeline-item > p,
  .timeline-content > p {
    font-size: 13px;
    line-height: 1.55;
  }
  .incident-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .incident-actions {
    gap: 6px;
  }
  .incident-actions .detail-link {
    flex-basis: 100%;
  }
  .timeline h3 {
    font-size: 17px;
  }
  .form-page,
  .settings-page {
    max-width: none;
  }
  .form-panel,
  .detail-panel,
  .settings-page {
    padding: 16px;
  }
  .space-head {
    border-radius: 8px;
  }
  .space-banner {
    height: 180px;
  }
  .space-profile { left: 16px; right: 16px; bottom: 18px; }
  .space-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
  .space-profile h1 {
    font-size: 22px;
  }
  .space-actions {
    top: 10px;
    right: 10px;
  }
  .space-edit,
  .space-delete {
    padding: 6px 10px;
    font-size: 13px;
  }
  .account-row { grid-template-columns: max-content 1fr; }
  .account-row small { grid-column: 1; }
  .foot {
    margin-top: 20px;
    padding: 16px;
  }
  .zhuzhiliao-pet { display: none !important; }
}

@media (pointer: coarse) {
  .zhuzhiliao-pet { display: none !important; }
}
