.community-root,
.community-library {
  max-width: 1400px;
  margin: 1.5rem auto;
  color: inherit;
}
.communal-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.16em;
  margin-right: 0.4em;
}
.community-model-card strong,
.community-developer > span,
.community-feed-item button,
.community-threads button {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}
.community-author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: #d9edf5;
  font-size: 0.83rem;
}
.community-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.5);
  background: #16546a;
  color: #e5fbff;
  font-size: 0.65rem;
  font-weight: 700;
  object-fit: cover;
}
.community-avatar-large {
  width: 3rem;
  height: 3rem;
  font-size: 0.9rem;
  border-color: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.12);
}
.community-discussion-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}
.community-share {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 12px;
  background: rgba(7, 28, 47, 0.65);
}
.community-share label {
  font-weight: 650;
}
.community-share textarea {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  padding: 0.7rem;
  border: 1px solid rgba(125, 211, 252, 0.5);
  border-radius: 8px;
  background: #091f35;
  color: #effbff;
}
.community-share-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.community-share [data-share-count][data-over-limit="true"] {
  color: #ffb5aa;
}
.community-share button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.community-root h1,
.community-root h2,
.community-library h2 {
  margin: 0 0 1rem;
}
.community-top,
.community-main,
.community-sidebar,
.community-detail,
.community-library {
  padding: 1.25rem;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(15, 37, 64, 0.88),
    rgba(17, 56, 76, 0.72)
  );
  color: #e7f7fc;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.community-top {
  border-color: rgba(45, 212, 191, 0.6);
  background:
    radial-gradient(
      circle at 12% 0%,
      rgba(45, 212, 191, 0.28),
      transparent 42%
    ),
    radial-gradient(
      circle at 95% 100%,
      rgba(125, 211, 252, 0.2),
      transparent 50%
    ),
    linear-gradient(135deg, #103a52, #0b4051 52%, #112e4c);
}
.community-sidebar {
  border-color: rgba(125, 211, 252, 0.48);
  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(125, 211, 252, 0.2),
      transparent 45%
    ),
    linear-gradient(160deg, #123550, #0e344e 58%, #0d4a51);
}
.community-top .community-model-card {
  background: rgba(5, 28, 46, 0.78);
  border-color: rgba(125, 211, 252, 0.4);
}
.community-top-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}
.community-model-card,
.community-developer,
.community-feed-item,
.community-threads button {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  width: 100%;
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 12px;
  background: rgba(9, 32, 53, 0.72);
  color: #edfaff;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.community-model-card:hover,
.community-developer:hover,
.community-feed-item button:hover {
  border-color: #2dd4bf;
}
.community-model-card small {
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.community-badge {
  display: inline-block;
  align-self: flex-start;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: #125061;
  color: #7dd3fc;
  font-size: 0.78rem;
}
.community-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}
.community-main,
.community-sidebar {
  min-width: 0;
}
.community-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.community-see-more {
  margin-left: auto;
  color: #7dd3fc;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.community-see-more:hover {
  text-decoration: underline;
}
.community-feed-item {
  margin-bottom: 0.7rem;
}
.community-feed-item button {
  border: 0;
  padding: 0;
  background: none;
  color: #2dd4bf;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.community-feed-item p {
  margin: 0.3rem 0 0;
  line-height: 1.5;
}
.community-developer {
  margin-bottom: 0.5rem;
}
.community-developer-podium {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  background: linear-gradient(
    120deg,
    rgba(45, 212, 191, 0.16),
    rgba(9, 32, 53, 0.85)
  );
  border-color: rgba(45, 212, 191, 0.55);
}
.community-developer-podium .community-rank-number {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: #2dd4bf;
  color: #06263a;
  font-weight: 800;
}
.community-developer-podium:nth-of-type(2) .community-rank-number {
  background: #7dd3fc;
}
.community-developer-podium:nth-of-type(3) .community-rank-number {
  background: #a4e9e4;
}
.community-developer-podium .community-author {
  font-size: 0.9rem;
  font-weight: 700;
}
.community-developer-podium small {
  grid-column: 2;
}
.community-tips {
  margin: 1.5rem 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(125, 211, 252, 0.25);
}
.community-tips .community-heading > .communal-icon {
  width: 1.35rem;
  height: 1.35rem;
  color: #7dd3fc;
}
.community-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.community-tip {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 12px;
  background: rgba(6, 33, 52, 0.72);
}
.community-tip small {
  color: #7dd3fc;
}
.community-tip h3 {
  margin: 0.45rem 0;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}
.community-tip p {
  margin: 0 0 0.8rem;
  line-height: 1.5;
  color: #d4e8f0;
}
.community-tip a {
  color: #2dd4bf;
  text-decoration: none;
  font-weight: 700;
}
.community-tip a:hover {
  text-decoration: underline;
}
.community-news,
.community-recent-models {
  margin: 0 0 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(125, 211, 252, 0.25);
}
.community-news-grid,
.community-recent-models-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.community-news-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 12px;
  background: rgba(6, 33, 52, 0.72);
}
.community-news-card > img,
.community-news-card > video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d4051;
}
.community-news-placeholder { display:grid; place-items:center; width:100%; aspect-ratio:16/9; background:linear-gradient(135deg,#0e5360,#15324d); color:#7dd3fc; }
.community-news-placeholder .communal-icon { width:2.5rem; height:2.5rem; }
.community-news-detail { max-width:900px; margin:auto; overflow-wrap:anywhere; }
.community-news-detail-media { display:block; width:100%; max-height:520px; object-fit:contain; margin:1rem 0; border:0; border-radius:12px; background:#09253b; aspect-ratio:16/9; }
.community-news-body { white-space:pre-wrap; line-height:1.7; margin:1.5rem 0; }
.community-news-summary { font-size:1.1rem; color:#b8e2e7; }
.community-news-card > img[src$="communal-icon.svg"] {
  object-fit: contain;
  padding: 1.2rem;
  background: linear-gradient(135deg, #145b66, #173b61);
}
.community-news-copy {
  padding: 1rem;
}
.community-news-copy h3 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}
.community-news-copy p {
  margin: 0 0 0.8rem;
  color: #d4e8f0;
  line-height: 1.5;
}
.community-news-copy a {
  color: #2dd4bf;
  font-weight: 700;
  text-decoration: none;
}
.community-news-copy a:hover {
  text-decoration: underline;
}
.community-recent-models .community-model-card {
  width: 100%;
}
.community-ad-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 10rem;
  padding: 1.25rem;
  margin-top: auto;
  border: 1px dashed rgba(125, 211, 252, 0.6);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 88% 50%,
      rgba(45, 212, 191, 0.16),
      transparent 40%
    ),
    linear-gradient(125deg, #0b2942, #113e57);
}
.community-ad-label {
  align-self: flex-start;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(125, 211, 252, 0.5);
  color: #7dd3fc;
  font-size: 0.72rem;
  white-space: nowrap;
}
.community-ad-slot h2 {
  margin: 0 0 0.45rem;
}
.community-ad-slot p {
  margin: 0;
  color: #cce1ed;
  line-height: 1.45;
}
.community-ad-mark {
  opacity: 0.45;
  color: #2dd4bf;
}
.community-ad-mark .communal-icon {
  width: 2.2rem;
  height: 2.2rem;
}
.community-root
  button:not(.community-model-card):not(.community-developer):not(
    .community-feed-item button
  ):not(.community-threads button),
.community-library button,
.community-dialog button {
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #2dd4bf;
  background: #0e555d;
  color: #fff;
  cursor: pointer;
}
.community-root button:focus-visible,
.community-library button:focus-visible,
.community-dialog :focus-visible {
  outline: 3px solid #7dd3fc;
  outline-offset: 3px;
}
.community-detail {
  margin-top: 1rem;
}
.community-detail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
  padding: 1rem;
  background: #092337;
  border-radius: 8px;
}
.community-detail form,
.community-dialog form {
  display: grid;
  gap: 0.7rem;
  max-width: 600px;
}
.community-detail input,
.community-detail select,
.community-detail textarea,
.community-dialog input,
.community-dialog select,
.community-dialog textarea {
  display: block;
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #7dd3fc;
  background: #092337;
  color: #fff;
}
.community-detail textarea,
.community-dialog textarea {
  min-height: 100px;
}
.community-threads {
  display: grid;
  gap: 0.5rem;
}
.community-reply {
  border-top: 1px solid #3c788a;
  padding: 0.8rem 0;
}
.community-dialog {
  width: min(550px, 94vw);
  border: 1px solid #2dd4bf;
  border-radius: 16px;
  background: #123047;
  color: #fff;
}
.community-dialog label {
  display: grid;
  gap: 0.3rem;
}
.community-owned > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem;
  border-bottom: 1px solid #3b7182;
}
.community-owned button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 1100px) {
  .community-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .community-tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .community-news-grid,
  .community-recent-models-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .community-tips-grid {
    grid-template-columns: 1fr;
  }
  .community-news-grid,
  .community-recent-models-grid {
    grid-template-columns: 1fr;
  }
  .community-ad-slot {
    flex-wrap: wrap;
  }
  .community-columns {
    grid-template-columns: 1fr;
  }
  .community-top-grid {
    grid-template-columns: 1fr;
  }
  .community-root,
  .community-library {
    padding: 0.7rem;
    margin: 0.5rem 0;
  }
  .community-top,
  .community-main,
  .community-sidebar,
  .community-detail {
    padding: 0.9rem;
  }
  .community-owned > div {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  body:has(.community-root) .toolbar {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    box-sizing: border-box;
    overflow-x: auto;
  }
  body:has(.community-root) .main {
    grid-template-columns: 0 minmax(0, 1fr);
  }
  body:has(.community-root) #canvasContent {
    min-width: 0;
    overflow-x: hidden;
  }
}
