:root {
  --community-accent: var(--page-accent, var(--primary, #8071c1));
  --community-bg: var(--page-bg, var(--bg-body, #f8f8fc));
  --community-card: var(--page-card, var(--bg-card, #fff));
  --community-text: var(--page-text, var(--text-main, #242538));
  --community-muted: var(--page-muted, var(--text-sub, #7d7e8d));
  --community-line: var(--page-line, var(--border-light, #e9e8ef));
}
[hidden] {
  display: none !important;
}
.community-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: #17152366;
  display: grid;
  place-items: center;
  padding: 20px;
  overscroll-behavior: contain;
}
.community-modal > section {
  width: min(100%, 560px);
  max-height: 85dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--community-card);
  color: var(--community-text);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 80px #0002;
  animation: community-appear 0.16s ease-out;
}
.community-modal header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.community-modal h2 {
  font-size: 19px;
  margin: 0;
}
.community-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--community-muted);
  margin: 16px 0;
}
.community-field :is(input, textarea, select) {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--community-line);
  border-radius: 12px;
  background: var(--community-bg);
  color: var(--community-text);
  font: inherit;
}
.community-field textarea {
  min-height: 90px;
  resize: vertical;
}
.community-modal button,
.community-actions button {
  font: inherit;
  border: 1px solid var(--community-line);
  border-radius: 12px;
  background: var(--community-card);
  color: var(--community-text);
  padding: 9px 15px;
  cursor: pointer;
}
.community-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.community-actions .primary,
.community-modal .primary {
  background: var(--community-accent);
  color: #fff;
  border-color: transparent;
}
.community-note {
  font-size: 13px;
  color: var(--community-muted);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.community-toast {
  position: fixed;
  z-index: 15000;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #292636ed;
  color: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  width: max-content;
  max-width: min(90vw, 520px);
  font-size: 14px;
  box-shadow: 0 8px 30px #0002;
}
.community-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0 !important;
  border-radius: 50% !important;
  padding: 5px !important;
  background: transparent !important;
  color: inherit;
  flex: none;
}
.icon-button svg,
.community-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--community-accent);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
@keyframes community-appear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .community-modal > section {
    animation: none;
  }
}
