/* Public member identity uses the forum avatar treatment throughout the Wiki. */
.ci-portal .wp-avatar { display:block; border-radius:50%; object-fit:cover; background:#292931; }
.ci-portal .cp-site-header .wp-header-member {
  display:inline-flex; align-items:center; gap:8px; min-width:0; max-width:12rem;
  min-height:40px; padding:3px 8px; border:0; background:transparent; text-align:start;
  text-transform:none; letter-spacing:normal;
}
.ci-portal .cp-site-header .wp-avatar-small { width:30px; height:30px; flex:none; }
.wp-header-name { display:grid; min-width:0; font:600 14px/1.2 system-ui,"Microsoft YaHei",sans-serif; color:#eeeef1; overflow-wrap:anywhere; }
.wp-header-name small { margin-top:2px; color:#b2b1bc; font:400 11px/1.2 system-ui,sans-serif; }
.wp-login { display:block; font:400 16px/1.55 system-ui,"Microsoft YaHei",sans-serif; color:#dedee3; }
.ci-portal .wiki-comments h2 { margin:0 0 14px; font-size:19px; font-weight:600; }
.wp-action,.wiki-comments button { display:inline-flex; align-items:center; box-sizing:border-box; min-height:40px; padding:7px 13px; border:1px solid #50505c; border-radius:6px; background:#24252c; color:#f1f1f4; font:500 14px/1.4 system-ui,"Microsoft YaHei",sans-serif; text-decoration:none; cursor:pointer; }

/* Forum profile.php components, using scoped rules from forum css/profile.css. */
body.ci-portal[data-page="profile"] > .cp-main { width:100%; max-width:none; margin:0; padding:0; }
.ci-portal .wp-profile {
  font:400 16px/normal "Segoe UI","Microsoft YaHei",sans-serif;
  color:#c9c9c9; background:#121212;
}
.wp-profile,.wp-profile *, .wp-profile *::before,.wp-profile *::after { box-sizing:border-box; }
.wp-profile :where(h1,h2,p,ul,li) { margin:0; padding:0; }
.ci-portal .wp-profile a { color:inherit; text-decoration:none; }
.ci-portal .wp-profile .profile-banner { height: clamp(280px, 26vw, 480px); background-size: cover; background-color: #1a1a1a; background-repeat: no-repeat; position: relative; flex-shrink: 0; }
.ci-portal .wp-profile .banner-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, #121212 100%); }
.ci-portal .wp-profile .profile-main { flex: 1; max-width: 1200px; width: 100%; margin: -60px auto 0; padding: 0 20px 40px; position: relative; z-index: 10; }
.ci-portal .wp-profile .profile-container { display: flex; gap: 24px; }
.ci-portal .wp-profile .profile-sidebar { width: 300px; flex-shrink: 0; }
.ci-portal .wp-profile .user-card { background: #1a1a1a; border: 1px solid #2d2d2d; border-radius: 12px; padding: 24px; text-align: center; }
.ci-portal .wp-profile .avatar-wrapper { position: relative; display: inline-block; margin-bottom: 16px; }
.ci-portal .wp-profile .avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid #121212; object-fit: cover; }
.ci-portal .wp-profile .status-indicator { position: absolute; bottom: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #1a1a1a; }
.ci-portal .wp-profile .status-indicator.online { background: #10b981; }
.ci-portal .wp-profile .username { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.ci-portal .wp-profile .user-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.ci-portal .wp-profile .user-badge.admin { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.ci-portal .wp-profile .staff-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; background: rgba(239,68,68,0.2); color: #ef4444; margin-bottom: 16px; }
.ci-portal .wp-profile .user-stats { display: flex; justify-content: center; align-items: stretch; gap: 0; padding: 16px 0; border-top: 1px solid #2d2d2d; border-bottom: 1px solid #2d2d2d; margin: 16px 0; }
.ci-portal .wp-profile .stat { flex: 1; text-align: center; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.ci-portal .wp-profile .stat-value { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.2; }
.ci-portal .wp-profile .stat-label { font-size: 11px; color: #666; margin-top: 4px; }
.ci-portal .wp-profile .user-meta { text-align: left; margin-bottom: 20px; }
.ci-portal .wp-profile .meta-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; color: #888; border-bottom: 1px solid #222; }
.ci-portal .wp-profile .meta-item:last-child { border-bottom: none; }
.ci-portal .wp-profile .meta-item i { width: 16px; color: #666; }
.ci-portal .wp-profile .action-buttons { display: flex; gap: 10px; margin-top: 8px; }
.ci-portal .wp-profile .btn-edit { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; text-align: center; }
.ci-portal .wp-profile .btn-edit { background: #e84a7f; color: #fff; }
.ci-portal .wp-profile .btn-edit:hover { background: #d43d6f; }
.ci-portal .wp-profile .profile-content { flex: 1; min-width: 0; }
.ci-portal .wp-profile .content-block { background: #1a1a1a; border: 1px solid #2d2d2d; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.ci-portal .wp-profile .content-block h2 { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #2d2d2d; }
.ci-portal .wp-profile .content-block h2 i { margin-right: 8px; color: #e84a7f; }
.ci-portal .wp-profile .thread-list { display: flex; flex-direction: column; gap: 8px; }
.ci-portal .wp-profile .thread-item { display: block; padding: 12px; background: #222; border-radius: 8px; transition: background 0.2s; }
.ci-portal .wp-profile .thread-item:hover { background: #2a2a2a; }
.ci-portal .wp-profile .thread-title { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 6px; }
.ci-portal .wp-profile .thread-meta { display: flex; gap: 16px; font-size: 12px; color: #666; }
.ci-portal .wp-profile .thread-forum { color: #e84a7f; }
.ci-portal .wp-profile .signature-content { font-size: 13px; color: #888; font-style: italic; }
.wp-profile .profile-banner { overflow:hidden; }
.ci-portal .wp-profile .profile-banner.is-empty { height:140px; }
.wp-profile .banner-display-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.wp-profile .profile-content,.wp-profile .thread-meta { min-width:0; }
.wp-profile .thread-list { list-style:none; }
.wp-profile .thread-title { display:block; }
.wp-profile .thread-meta { align-items:center; flex-wrap:wrap; row-gap:3px; }
.wp-profile :is(.username,.thread-title,.thread-forum,.signature-content) { overflow-wrap:anywhere; }
.wp-profile .signature-content { white-space:pre-line; }
.wp-profile .wp-badges { line-height:normal; }
.wp-profile .user-stats .stat { min-width:0; }
.wp-profile .wp-writing-links { display:flex; justify-content:space-around; gap:8px; }
.wp-profile .wp-writing-links .meta-item { border-bottom:none; gap:4px; }
.wp-profile .wp-writing-links a:hover { color:#fff; }
.wp-profile .wp-empty { padding:12px; color:#a0a0a0; font-size:14px; }
.wp-profile :is(a,summary,button):focus-visible { outline:2px solid #c2c1c7; outline-offset:2px; }
@font-face { font-family:"CI Profile Icons"; src:url("/assets/fonts/fa-solid-900.woff2") format("woff2"); font-style:normal; font-weight:900; font-display:block; }
.wp-profile .fa-solid { font:900 1em/1 "CI Profile Icons"; display:inline-block; font-style:normal; }
.wp-profile .fa-file-lines::before { content:"\f15c"; }
.wp-profile .fa-file-pen::before { content:"\f31c"; }
.wp-profile .fa-comment::before { content:"\f075"; }
.wp-profile .fa-signature::before { content:"\f5b7"; }
.wp-profile .fa-pen::before { content:"\f304"; }
.wp-profile .fa-shield::before { content:"\f132"; }
@media (max-width:768px) {
  .ci-portal .wp-profile .profile-container { flex-direction:column; }
  .ci-portal .wp-profile .profile-sidebar { width:100%; }
  .ci-portal .wp-profile .profile-banner { height:clamp(200px, 45vw, 280px); }
  .ci-portal .wp-profile .profile-content { width:100%; }
  .ci-portal .wp-profile .stat-value { font-size:18px; }
}
@media (max-width:480px) {
  .ci-portal .wp-profile .profile-main { margin-top:-40px; padding:0 10px 30px; }
  .ci-portal .wp-profile .avatar { width:70px; height:70px; border-width:3px; }
  .ci-portal .wp-profile .avatar-wrapper { margin-bottom:12px; }
  .ci-portal .wp-profile .status-indicator { width:16px; height:16px; bottom:4px; right:4px; }
  .ci-portal .wp-profile .username { font-size:18px; margin-bottom:6px; }
  .ci-portal .wp-profile .user-badge { font-size:11px; padding:3px 10px; margin-bottom:8px; }
  .ci-portal .wp-profile .staff-badge { font-size:10px; padding:3px 10px; margin-bottom:12px; }
  .ci-portal .wp-profile .user-card { padding:16px 12px; border-radius:10px; }
  .ci-portal .wp-profile .user-stats { padding:12px 0; margin:12px 0; }
  .ci-portal .wp-profile .stat { padding:6px 8px; }
}
/* forum profile.php loads css/user-groups.css after css/profile.css, including its mobile rules. */
.ci-portal .wp-profile .user-badge.admin { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.ci-portal .wp-profile .staff-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; font-size: 10px; font-weight: 600; border-radius: 12px; background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.3); text-shadow: 0 0 6px rgba(6, 182, 212, 0.4); }
/* Sign-in form shares the community chrome and uses a quieter, single-column surface. */
.ci-portal .wp-login {
  box-sizing: border-box;
  inline-size: min(100%, 448px);
  max-inline-size: 100%;
  margin: clamp(28px, 7vh, 72px) auto 48px;
  padding: clamp(22px, 3vw, 32px);
  color: #ededf0;
  background: #191a1f;
  border: 1px solid #34353d;
  border-radius: 12px;
  font: 400 14px/1.55 system-ui, "Microsoft YaHei", sans-serif;
  text-align: start;
}
.ci-portal .wp-login h1 {
  margin: 0;
  color: #f4f4f6;
  font: 600 clamp(22px, 2.4vw, 28px)/1.3 system-ui, "Microsoft YaHei", sans-serif;
  letter-spacing: -.015em;
}
.wp-login > p, .wp-login .wp-login-context {
  margin: 8px 0 0;
  color: #bfc0ca;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.wp-login .wp-login-methods, .wp-login > .cp-auth-form,
.wp-login > .cp-auth-security { margin-block-start: 22px; }
.ci-portal .wp-login .wp-action, .ci-portal .wp-login .cp-auth-form > .cp-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  height: auto;
  padding: 9px 14px;
  border: 1px solid #73747e;
  border-radius: 6px;
  color: #fafafa !important;
  background: #383941;
  font: 500 14px/1.45 system-ui, "Microsoft YaHei", sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.wp-login > .wp-action { margin-block-start: 20px; }
.ci-portal .wp-login .cp-auth-form > .cp-button { margin-block-start: 14px; }
.wp-login .cp-auth-form > .cp-button svg { display: none; }
.ci-portal .wp-login :is(.wp-action, .cp-auth-form > .cp-button):hover:not(:disabled) {
  border-color: #a5a6af;
  background: #43444d;
}
.ci-portal .wp-login .cp-auth-form > .cp-button:disabled {
  opacity: 1;
  border-color: #393a43;
  color: #a3a4ae !important;
  background: #25262d;
  cursor: default;
}
.wp-login .wp-login-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  gap: 3px;
  border: 1px solid #36373f;
  border-radius: 8px;
  background: #131419;
}
.wp-login .wp-method {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #b6b7c0;
  text-decoration: none;
  text-align: center;
  font: 500 14px/1.45 system-ui, "Microsoft YaHei", sans-serif;
}
.wp-login .wp-method:hover { color: #eff0f4; }
.wp-login .wp-method[aria-current=page] { background: #2c2d35; color: #f1f1f4; }
.wp-login .wp-email-flow { margin-block-start: 20px; }
.ci-portal .wp-login .cp-auth-form { display: block; margin-inline: 0; }
.ci-portal .wp-login [hidden] { display: none !important; }
.ci-portal .wp-login .cp-auth-form > label {
  display: block;
  margin: 0 0 6px;
  color: #dddde3;
  font: 500 14px/1.45 system-ui, "Microsoft YaHei", sans-serif;
}
.ci-portal .wp-login .cp-auth-form input:not([type=checkbox]):not([type=hidden]) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #53545f;
  border-radius: 6px;
  background: #111217;
  color: #f3f3f5;
  font: 400 15px/1.5 system-ui, "Microsoft YaHei", sans-serif;
}
.ci-portal .wp-login .cp-auth-form input::placeholder { color: #91929e; }
.wp-login #cp-code { letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.wp-login #cp-code::placeholder { letter-spacing: normal; }
.ci-portal .wp-login .cp-auth-security { margin: 14px 0; }
.ci-portal .wp-login .cp-consent {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 5px 0;
  color: #c9cad2;
  font: 400 13px/1.55 system-ui, "Microsoft YaHei", sans-serif;
}
.ci-portal .wp-login .cp-consent input {
  flex: none;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  align-self: flex-start;
  margin-block-start: 3px;
  accent-color: #b7bbc8;
}
.wp-login .cp-consent a, .wp-login .wp-login-message a, .wp-login .wp-return,
.ci-portal .wp-login .cp-auth-secondary button {
  color: #d6d7df;
  text-decoration: underline;
  text-underline-offset: .2em;
  text-decoration-color: #737480;
}
.wp-login .wp-return { display: inline-flex; align-items: center; min-height: 40px; margin-block-start: 8px; font-size: 13px; }
.ci-portal .wp-login .cp-auth-secondary { display: flex; gap: 8px 16px; flex-wrap: wrap; justify-content: space-between; margin-top: 4px; }
.ci-portal .wp-login .cp-auth-secondary button { min-height: 36px; font: 400 13px/1.4 system-ui, sans-serif; }
.ci-portal .wp-login :is(#cp-code-destination, #cp-security-status, .cp-auth-note, .cp-auth-status, .wp-login-message) {
  color: #b7b8c3;
  font: 400 13px/1.55 system-ui, "Microsoft YaHei", sans-serif;
  overflow-wrap: anywhere;
}
.ci-portal .wp-login #cp-code-destination { margin: 0 0 8px; }
.ci-portal .wp-login :is(.cp-auth-note, .cp-auth-status, .wp-login-message) { margin: 10px 0 0; }
.ci-portal .wp-login :is(.cp-auth-note, .cp-auth-status, .wp-login-message):empty { display: none; }
.ci-portal .wp-login :is(.wp-login-message, .cp-auth-status[data-error=true]) { color: #edb7ac; }
.wp-login :is(a, summary, button, input):focus-visible { outline: 2px solid #bdc0cd; outline-offset: 3px; }
@media (max-width: 480px) {
  .ci-portal .wp-login { margin-block-start: 20px; padding: 20px 16px; border-radius: 8px; }
  .ci-portal .wp-login .cp-auth-form input:not([type=checkbox]):not([type=hidden]) { font-size: 16px; }
}
.ci-portal .wiki-comments { margin:26px 0 0; padding:24px 0 0; border-top:1px solid #aaa28e; color:#393731; font:400 15px/1.65 system-ui,"Microsoft YaHei",sans-serif; }
.wiki-comments-form,.wiki-comments-list { display:grid; gap:12px; }
.wiki-comments-form textarea { box-sizing:border-box; width:100%; min-height:76px; padding:9px 12px; resize:vertical; background:#faf5e8; color:#37352f; border:1px solid #a99f87; border-radius:6px; font:inherit; }
.wiki-comments button { min-height:36px; padding:5px 10px; background:#e9e1d0; border-color:#b5aa93; color:#39352d; }
.wiki-comments-list { list-style:none; padding:0; } .wiki-comment { border-block-start:1px solid #cec5b1; padding-block:10px; }
.wiki-comment-avatar { width:30px; height:30px; border-radius:50%; vertical-align:middle; object-fit:cover; }
.wiki-comment-author { font-weight:600; } .wiki-comment-time,.wiki-comments-status,.wiki-comments-empty { font-size:13px; color:#6e6758; }
.wiki-comment-body { white-space:pre-wrap; overflow-wrap:anywhere; margin-block:8px; }
.wiki-comments [hidden] { display:none!important; }
@media(max-width:520px){.ci-portal .cp-site-header .wp-header-member{gap:4px;padding-inline:2px;max-width:94px}.ci-portal .cp-site-header .wp-avatar-small{width:24px;height:24px}.wp-header-name{font-size:12px}.wp-header-name small{font-size:10px}.wp-login{margin-block-start:20px}}

.wiki-comment { display:grid; grid-template-columns:30px minmax(0,1fr); gap:10px; }
.wiki-comment-content { min-width:0; }
.wiki-comment-meta,.wiki-comments-actions { display:flex; align-items:baseline; gap:4px 10px; flex-wrap:wrap; }
.wiki-comment-uid { font-size:12px; color:#6e6758; }

body.ci-portal .cp-site-header .cp-header-end a.cp-account-link.wp-header-member { border:1px solid transparent; background:transparent; box-shadow:none; }
body.ci-portal .cp-site-header .cp-header-end a.cp-account-link.wp-header-member:hover { border-color:#484952; background:#1c1d22; }
