.community-page { max-width: 1320px; margin-inline: auto; }
.community-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 8px;
  border: 1px solid var(--graphite-hairline);
  border-radius: 13px;
  background: var(--graphite-stage);
}
.community-tabs, .community-search, .community-pagination {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.community-tabs .btn {
  border-color: transparent;
  background: transparent;
  color: var(--graphite-muted);
  box-shadow: none;
}
.community-tabs .btn:hover { background: #ffffff0b; color: var(--graphite-ink); }
.community-tabs .btn.is-active {
  border-color: var(--graphite-hairline);
  background: var(--graphite-raised);
  color: var(--graphite-ink);
}
.community-search input {
  min-width: 0;
  width: clamp(180px, 22vw, 270px);
  padding: 11px 12px;
  border: 1px solid var(--graphite-hairline);
  border-radius: 9px;
  background: var(--graphite-bg);
  color: var(--graphite-ink);
  font-size: 13px;
}
.community-search input::placeholder { color: var(--graphite-muted); }
.community-search input:focus-visible, .community-config summary:focus-visible {
  outline: 2px solid var(--graphite-accent);
  outline-offset: 2px;
}
.community-note, .community-status {
  margin: 16px 0;
  color: var(--graphite-muted);
  font-size: 13px;
  line-height: 1.55;
}
.community-status:empty { display: none; }
.community-status:not(:empty) {
  padding: 20px 24px;
  border: 1px dashed var(--graphite-line);
  border-radius: 13px;
}
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 275px), 1fr));
  align-items: start;
  gap: clamp(14px, 2vw, 21px);
}
.community-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: clamp(14px, 1.75vw, 20px);
  border: 1px solid var(--graphite-hairline);
  border-radius: 16px;
  background: var(--graphite-stage);
  transition: border-color .25s, background .25s;
}
.community-card:is(:hover, :focus-within) { border-color: #ffffff3b; background: var(--graphite-panel); }
.community-card.is-official { border-color: color-mix(in srgb, var(--graphite-accent) 48%, var(--graphite-hairline)); }
.community-card.is-official header { color: var(--graphite-accent); }
.community-card header, .community-byline, .community-card-actions { display: flex; align-items: center; gap: 9px; }
.community-card header { color: var(--graphite-muted); font-size: 12px; overflow-wrap: anywhere; }
.community-card-icon {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--graphite-hairline);
  border-radius: 8px;
  background: var(--graphite-raised);
  color: var(--graphite-accent);
}
.community-card-icon svg { width: 16px; height: 16px; }
.community-card h2 {
  color: var(--graphite-ink);
  font-size: 19px;
  letter-spacing: -.035em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.community-card p { color: var(--graphite-muted); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-preview {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 2.5;
  overflow: clip;
  border: 1px solid var(--graphite-hairline);
  border-radius: 10px;
  background:
    radial-gradient(circle, #c3c6ce43 1px, transparent 1.3px) 0 0 / 14px 14px,
    var(--graphite-bg);
  transition: border-color .25s;
}
.community-card:is(:hover, :focus-within) .community-preview { border-color: var(--graphite-line); }
.community-preview i, .community-preview b { position: absolute; left: var(--node-x); top: var(--node-y); }
.community-preview i {
  width: var(--wire-length);
  border-top: 1px solid #b6b9cbb3;
  transform: rotate(var(--wire-angle));
  transform-origin: left center;
}
.community-preview i.is-data { border-top: 1px dashed #91c1c1c2; }
.community-preview b {
  width: 14px;
  height: 10px;
  translate: -50% -50%;
  border: 1px solid #aeb1b9;
  border-radius: 3px;
  background: #41444a;
}
.community-preview b.is-selected {
  border-color: #e2d5ee;
  background: #ad9ac0;
  box-shadow: 0 0 0 3px #ad9ac035;
}
.community-byline {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--graphite-hairline);
  color: var(--graphite-muted);
  font-size: 12px;
}
.community-byline span { overflow-wrap: anywhere; }
.community-byline time { flex: none; }
.community-config {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--graphite-hairline);
  border-radius: 8px;
  background: var(--graphite-bg);
  color: var(--graphite-muted);
  font-size: 12px;
}
.community-config summary { border-radius: 3px; color: var(--graphite-ink); cursor: pointer; }
.community-config pre {
  overflow: auto;
  max-height: 180px;
  margin: 8px 0 0;
  color: var(--graphite-ink);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.community-template-stats { display: flex; flex-wrap: wrap; gap: 6px; color: var(--graphite-muted); font-size: 12px; }
.community-template-stats > span {
  padding: 4px 7px;
  border: 1px solid var(--graphite-hairline);
  border-radius: 5px;
  background: #ffffff05;
}
.community-node-list, .community-wire-list ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.community-node-list { max-height: 260px; overflow: auto; scrollbar-gutter: stable; }
.community-node-list li, .community-wire-list li { padding: 5px 7px; border-radius: 5px; background: #ffffff08; overflow-wrap: anywhere; }
.community-node-list small { margin-inline-start: 5px; color: var(--graphite-muted); }
.community-node-number, .community-edge-nodes { margin-inline-end: 4px; color: var(--graphite-accent); font-variant-numeric: tabular-nums; }
.community-wire-list { margin-top: 8px; }
.community-wire-list ul { max-height: 185px; overflow: auto; }
.community-card-actions { justify-content: space-between; }
.community-delete { color: #e2b7b7; }
.community-pagination { justify-content: center; margin-top: 20px; color: var(--graphite-muted); font-size: 12px; }
.community-pagination[hidden] { display: none; }

.graph-node-share {
  display: grid;
  flex: none;
  width: 25px;
  height: 25px;
  padding: 0;
  place-items: center;
  border-radius: 7px;
  background: #ffffff09;
  color: var(--graphite-muted);
}
.graph-node-share svg { width: 15px; height: 15px; }
.graph-node-share:hover, .graph-node-share:focus-visible { background: #ffffff1a; color: var(--graphite-ink); }
.community-publisher {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(17px, 3vw, 26px);
  border: 1px solid var(--graphite-line);
  border-radius: 19px;
  background: var(--graphite-stage);
  color: var(--graphite-ink);
  box-shadow: 0 24px 70px #0009;
}
.community-publisher::backdrop { background: #111215bb; backdrop-filter: blur(5px); }
.community-publisher-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.community-publisher h2 { font-size: 22px; letter-spacing: -.035em; }
.community-publisher p { margin-block: 9px; color: var(--graphite-muted); font-size: 13px; line-height: 1.5; }
.community-publisher p:empty { display: none; }
.community-publisher .field { margin-top: 12px; }
.community-publisher .field textarea { resize: vertical; }
.community-publisher .community-privacy p { font-size: 12px; }
.community-publisher-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 640px) {
  .community-search { width: 100%; }
  .community-search input { width: 100%; }
  .community-tabs { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .community-card, .community-preview { transition: none; }
}
.community-pro-lock {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 16px;
  max-width: 760px;
  padding: clamp(20px,4vw,36px);
  border: 1px solid #c497ed38;
  border-radius: 17px;
  background: radial-gradient(ellipse at 92% 6%, #ac75db2d, transparent 63%), var(--graphite-panel);
}
.community-pro-lock h1 { margin: 0 0 8px; font-size: clamp(23px,3vw,36px); letter-spacing: -.05em; }
.community-pro-lock p { color: var(--graphite-muted); font-size: 13px; }
.community-pro-lock ul { display: grid; gap: 8px; margin: 16px 0 20px; padding: 0; list-style: none; }
.community-pro-lock li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.community-pro-lock li .icon { width: 15px; height: 15px; color: #dec2fc; }
@media (max-width: 520px) { .community-pro-lock { grid-template-columns: 1fr; } }
