/* The native online/today Widgets live here; colours follow the selected theme. */
.n-community {
  position: relative; display: inline-flex; flex: 0 0 auto; align-items: center;
  gap: 6px; min-width: 0; overflow: visible;
}
.n-community > .n-community-toggle {
  position: relative; display: inline-flex; flex: 0 0 42px; align-items: center;
  justify-content: center; width: 42px; height: 42px; min-width: 42px;
  margin: 0; padding: 0; border: 1px solid transparent; border-radius: 12px;
  color: var(--n-muted); background: transparent; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.n-community > .n-community-toggle:hover,
.n-community > .n-community-toggle[data-n-active="true"] {
  color: var(--n-text); background: var(--n-surface-2);
}
.n-community-toggle > svg, #n-community-panel svg {
  display: block; flex-shrink: 0; pointer-events: none;
}
.n-community-online-dot { color: var(--n-accent); fill: var(--n-surface); }
.n-community .n-community-count {
  position: absolute; top: 0; right: -1px; display: inline-flex;
  align-items: center; justify-content: center; min-width: 17px; height: 17px;
  margin: 0; padding: 0 4px; border: 2px solid var(--n-surface); border-radius: 9px;
  color: var(--n-accent-ink); background: var(--n-accent);
  font-family: inherit; font-size: 9px; font-weight: 650; line-height: 1;
  font-variant-numeric: tabular-nums;
}
#n-community-panel {
  position: fixed; z-index: 1040; top: var(--n-community-top, 66px);
  left: var(--n-community-left, 12px); display: flex; flex-direction: column;
  width: 372px; max-width: calc(100vw - 24px);
  max-height: var(--n-community-max-height, calc(100vh - 88px));
  margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--n-line);
  border-radius: 14px; color: var(--n-text); background: var(--n-surface);
  box-shadow: var(--n-shadow); font-family: inherit; line-height: 1.5;
  text-align: left; isolation: isolate;
}
#n-community-panel *, #n-community-panel *::before,
#n-community-panel *::after { box-sizing: border-box; }
#n-community-panel[hidden], #n-community-panel [hidden],
.n-community [data-n-community-count][hidden] { display: none !important; }
#n-community-panel .n-community-heading {
  display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 58px; padding: 8px 8px 6px 18px;
}
#n-community-panel .n-community-heading h2 {
  margin: 0; padding: 0; border: 0; color: var(--n-text);
  font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: 0;
}
#n-community-panel .n-community-close {
  display: inline-flex; flex: 0 0 42px; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin: 0; padding: 0; border: 0; border-radius: 10px;
  color: var(--n-muted); background: transparent; cursor: pointer;
}
#n-community-panel .n-community-close:hover {
  color: var(--n-text); background: var(--n-surface-2);
}
#n-community-panel .n-community-tabs {
  display: flex; flex: 0 0 auto; gap: 4px; min-width: 0; margin: 0;
  padding: 0 12px 10px; border-bottom: 1px solid var(--n-line);
}
#n-community-panel .n-community-tab {
  display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center;
  gap: 6px; min-width: 0; min-height: 42px; margin: 0; padding: 8px 7px;
  border: 0; border-radius: 9px; color: var(--n-muted); background: transparent;
  font-family: inherit; font-size: 12px; font-weight: 550; line-height: 1.4;
  white-space: normal; cursor: pointer;
}
#n-community-panel .n-community-tab:hover { color: var(--n-text); }
#n-community-panel .n-community-tab[aria-selected="true"] {
  color: var(--n-text); background: var(--n-surface-2);
}
#n-community-panel .n-community-tab-count {
  flex: 0 0 auto; color: var(--n-muted); font-size: 11px; font-weight: 500;
  line-height: 1.2; font-variant-numeric: tabular-nums;
}
#n-community-panel .n-community-scroll {
  flex: 1 1 auto; min-height: 0; max-height: calc(var(--n-community-max-height, 550px) - 164px); overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: var(--n-line) transparent; -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
}
#n-community-panel .n-community-view { min-width: 0; padding: 8px 12px 12px; }
#n-community-panel #online_users {
  display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0;
  margin: 0; padding: 0; color: var(--n-text); font-size: 13px; line-height: 1.5;
  overflow-wrap: anywhere;
}
#n-community-panel #online_users > a[href*="profile?id="] {
  position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 11px; row-gap: 0; align-items: center; width: 100%; height: auto;
  min-height: 66px; margin: 0; padding: 10px 11px; border: 1px solid var(--n-line); border-radius: 12px;
  color: var(--n-text); background: var(--n-surface-2); text-decoration: none;
}
#n-community-panel #online_users > a[href*="profile?id="]:hover { background: var(--n-surface-3, var(--n-accent-soft)); }
#n-community-panel #online_users > a[href*="profile?id="] > img {
  grid-column: 1; grid-row: 1 / span 2; position: static; float: none;
  display: block; width: 38px; height: 38px; margin: 0; border-radius: 50%; object-fit: cover;
}
#n-community-panel #online_users > a[href*="profile?id="] > span {
  grid-column: 2; display: block; float: none; width: auto; min-width: 0;
  margin: 0; padding: 0; font-size: 13px; font-weight: 550; line-height: 1.45;
  white-space: normal; overflow: visible; overflow-wrap: anywhere;
}
#n-community-panel #online_users > a[href*="profile?id="] > span:last-child {
  color: var(--n-muted); font-size: 12px; font-weight: 400;
}
/* Ancillary server information is kept inside the native Widget output. */
#n-community-panel #online_users .players,
#n-community-panel #online_users .servers-online-line {
  width: 100%; max-width: 100%; min-width: 0; margin-top: 12px; color: var(--n-muted);
}
#n-community-panel #online_users .progress {
  width: 100%; margin-top: 7px; overflow: hidden; border-radius: 6px;
  background: var(--n-surface-2);
}
#n-community-panel #online_users .progress-bar {
  color: var(--n-accent-ink); background-color: var(--n-accent);
}
#n-community-panel #load_last_online {
  display: flex; flex-wrap: wrap; gap: 7px; width: 100%; min-width: 0;
  margin: 0; padding: 6px 3px; font-size: 13px; line-height: 1.5;
  color: var(--n-text); overflow-wrap: anywhere;
}
#n-community-panel #load_last_online > a[id^="visit_user"] {
  display: inline-flex; align-items: center; max-width: 100%; min-height: 38px;
  margin: 0; padding: 8px 10px; border: 1px solid var(--n-line); border-radius: 9px;
  background: var(--n-surface-2); font-size: 13px; line-height: 1.5;
  white-space: normal; overflow-wrap: anywhere; text-decoration: none;
}
#n-community-panel #load_last_online > a[id^="visit_user"]:hover { border-color: var(--n-muted); }
#n-community-panel .n-community-empty {
  margin: 0; padding: 30px 12px; color: var(--n-muted); font-size: 13px;
  line-height: 1.6; text-align: center;
}
#n-community-panel .n-community-all {
  display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 48px; margin: 0; padding: 12px 18px;
  border-top: 1px solid var(--n-line); color: var(--n-text); background: transparent;
  font-size: 12px; font-weight: 550; line-height: 1.5; text-decoration: none;
}
#n-community-panel .n-community-all:hover { background: var(--n-surface-2); }
.n-community-toggle:focus-visible, #n-community-panel a:focus-visible,
#n-community-panel button:focus-visible, #n-community-panel [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--n-accent) !important; outline-offset: -2px;
}
#n-community-panel:focus { outline: none; }
#n-community-user-preview{position:fixed;z-index:1060;display:flex;flex-direction:column;gap:9px;width:164px;max-width:calc(100vw - 24px);padding:10px;border:1px solid var(--n-line);border-radius:16px;background:var(--n-surface);color:var(--n-text);box-shadow:var(--n-shadow);pointer-events:none!important;user-select:none;overflow:hidden}
#n-community-user-preview[hidden]{display:none!important}
#n-community-user-preview>img{display:block;width:100%;height:142px;border-radius:10px;object-fit:cover;margin:0}
#n-community-user-preview>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:0;padding:0 2px;font-family:inherit;font-size:13px;line-height:1.5;font-weight:650;overflow-wrap:anywhere}
@media (max-width: 575.98px) {
  .n-community { gap: 0; }
  .n-community > .n-community-toggle-today { display: none; }
  #n-community-panel { width: calc(100vw - 24px); }
  #n-community-panel .n-community-tabs { padding-right: 10px; padding-left: 10px; }
  #n-community-panel .n-community-tab { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .n-community > .n-community-toggle { transition: none; }
}
