.community-workspace {
  padding: 0;
  overflow: hidden;
  background: #f7f8fa;
}

.community-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #151923 0%, #303848 100%);
}

.community-kicker {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.community-hero h1 {
  margin-bottom: 8px;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.community-hero p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  line-height: 1.6;
}

.community-hero-actions,
.community-toolbar-actions,
.community-persona-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-action-btn,
.community-generate-btn,
.community-notice-action {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.community-action-btn {
  min-height: 40px;
  padding: 0 17px;
  white-space: nowrap;
}

.community-action-btn:hover,
.community-generate-btn:hover,
.community-notice-action:hover {
  transform: translateY(-1px);
}

.community-action-btn:disabled,
.community-generate-btn:disabled,
.community-draft-option:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.community-action-primary {
  color: #fff;
  background: #ff2b2b;
  border-color: #ff2b2b;
}

.community-action-primary:hover {
  background: #e61919;
}

.community-action-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.community-action-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.community-persona-card {
  margin: 24px 28px 0;
  padding: 22px;
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.04);
}

.community-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.community-section-title {
  margin-bottom: 5px;
  color: #20242c;
  font-size: 0.94rem;
  font-weight: 800;
}

.community-section-head p {
  color: #7b8391;
  font-size: 0.8rem;
  line-height: 1.55;
}

.community-local-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: #6f55bd;
  background: #f2edff;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.community-persona-card textarea {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.86rem;
  line-height: 1.65;
}

.community-persona-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.community-muted {
  color: #8a929f;
  font-size: 0.76rem;
}

.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 14px;
}

.community-summary {
  color: #4d5562;
  font-size: 0.82rem;
  font-weight: 650;
}

.community-toolbar select {
  min-width: 112px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 0.78rem;
}

.community-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 28px 14px;
  padding: 13px 15px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  color: #3f5068;
  background: #f5f8fc;
  font-size: 0.8rem;
  line-height: 1.5;
}

.community-notice-success {
  color: #17633d;
  border-color: #bee7cf;
  background: #f0fbf5;
}

.community-notice-warning {
  color: #7d5907;
  border-color: #f0dda4;
  background: #fff9e8;
}

.community-notice-error {
  color: #9d2f2f;
  border-color: #f0c3c3;
  background: #fff3f3;
}

.community-notice-action {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #fff;
  background: #303848;
}

.community-loading,
.community-empty {
  margin: 0 28px 18px;
  padding: 36px 20px;
  border: 1px dashed #d8dce2;
  border-radius: 12px;
  color: #7d8591;
  background: #fff;
  text-align: center;
  font-size: 0.82rem;
}

.community-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.community-comment-list {
  display: grid;
  gap: 16px;
  padding: 0 28px 28px;
}

.community-comment-card {
  overflow: hidden;
  border: 1px solid #e0e4e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(16, 24, 40, 0.04);
}

.community-video-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-bottom: 1px solid #edf0f3;
  background: #fafbfc;
  font-size: 0.76rem;
}

.community-video-label {
  color: #9299a4;
  font-weight: 700;
}

.community-video-row a,
.community-video-row > span:last-child {
  overflow: hidden;
  color: #3c4654;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-video-row a:hover {
  color: #e31919;
  text-decoration: underline;
}

.community-comment-main {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 19px 20px 16px;
}

.community-avatar {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #8c96a7;
  font-size: 0.85rem;
  font-weight: 800;
}

.community-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-comment-body {
  min-width: 0;
  flex: 1;
}

.community-comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
}

.community-comment-meta strong {
  color: #262b33;
  font-size: 0.82rem;
}

.community-comment-meta span,
.community-comment-stats {
  color: #959ca6;
  font-size: 0.72rem;
}

.community-comment-meta .community-moderation-badge {
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
}

.community-moderation-badge-criticism {
  color: #6f5a1d !important;
  border-color: #eadca8 !important;
  background: #fff9df;
}

.community-moderation-badge-misunderstanding {
  color: #325f88 !important;
  border-color: #c9def0 !important;
  background: #eef7ff;
}

.community-moderation-badge-provocation {
  color: #87501f !important;
  border-color: #eccba9 !important;
  background: #fff3e7;
}

.community-moderation-badge-attack {
  color: #963f4f !important;
  border-color: #efc4cc !important;
  background: #fff0f3;
}

.community-moderation-badge-dangerous {
  color: #8f2633 !important;
  border-color: #e8aeb7 !important;
  background: #ffe8ec;
}

.community-comment-translation {
  margin-top: 11px;
  padding: 10px 12px;
  border-left: 3px solid #8d79cc;
  border-radius: 0 8px 8px 0;
  background: #f6f3ff;
}

.community-comment-translation span {
  display: block;
  margin-bottom: 4px;
  color: #7865b5;
  font-size: 0.67rem;
  font-weight: 800;
}

.community-comment-translation p {
  color: #4f5560;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.community-comment-text {
  color: #30363f;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.community-comment-stats {
  display: flex;
  gap: 12px;
  margin-top: 9px;
}

.community-draft-area {
  padding: 0 20px 18px 71px;
}

.community-moderation-notice {
  margin-bottom: 11px;
  padding: 11px 13px;
  border: 1px solid #e2e5ea;
  border-radius: 9px;
  background: #f7f8fa;
}

.community-moderation-notice strong,
.community-moderation-notice span,
.community-moderation-notice p {
  display: block;
}

.community-moderation-notice strong {
  margin-bottom: 4px;
  color: #3f4650;
  font-size: 0.76rem;
}

.community-moderation-notice span,
.community-moderation-notice p {
  color: #6d7480;
  font-size: 0.72rem;
  line-height: 1.5;
}

.community-moderation-notice p {
  margin-top: 5px;
}

.community-moderation-notice-info {
  border-color: #d2e1ee;
  background: #f2f8fd;
}

.community-moderation-notice-caution {
  border-color: #efd1a7;
  background: #fff8ed;
}

.community-moderation-notice-caution strong {
  color: #85531f;
}

.community-moderation-notice-dangerous {
  border-color: #edbac2;
  background: #fff0f2;
}

.community-moderation-notice-dangerous strong {
  color: #982f3e;
}

.community-generate-btn {
  padding: 9px 14px;
  color: #574298;
  border-color: #d9cdf7;
  background: #f7f4ff;
  font-size: 0.78rem;
}

.community-generate-btn:hover {
  background: #eee8ff;
}

.community-draft-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #69717e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.community-draft-label em {
  color: #9a6b23;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.community-draft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.community-draft-card {
  position: relative;
  min-width: 0;
}

.community-draft-option {
  width: 100%;
  height: 100%;
  min-height: 104px;
  padding: 12px 49px 12px 12px;
  border: 1px solid #e1e4e9;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.community-draft-option:hover {
  border-color: #b8add8;
  box-shadow: 0 4px 12px rgba(72, 52, 124, 0.08);
}

.community-draft-option.selected {
  border-color: #7f68c6;
  background: #f8f5ff;
  box-shadow: 0 0 0 2px rgba(127, 104, 198, 0.12);
}

.community-draft-option:disabled {
  cursor: wait;
  opacity: 0.65;
}

.community-draft-option span {
  display: block;
  margin-bottom: 7px;
  color: #806bbd;
  font-size: 0.67rem;
  font-weight: 800;
}

.community-copy-draft-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 4px 7px;
  color: #725caf;
  border: 1px solid #d8cff0;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

.community-copy-draft-btn:hover {
  color: #594292;
  border-color: #b9aadf;
  background: #f5f1ff;
}

.community-copy-draft-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.community-draft-option strong {
  display: block;
  color: #313641;
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.55;
  white-space: pre-wrap;
}

.community-draft-translation {
  display: block;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e8e3f4;
  color: #6d7280;
  font-size: 0.71rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-wrap;
}

.community-draft-translation b {
  display: block;
  margin-bottom: 3px;
  color: #806bbd;
  font-size: 0.65rem;
}

.community-manual-reply {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}

.community-manual-reply-input {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 0 12px;
  color: #313641;
  border: 1px solid #d9dde4;
  border-radius: 9px;
  outline: none;
  background: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-manual-reply-input:focus {
  border-color: #8a73cc;
  box-shadow: 0 0 0 3px rgba(127, 104, 198, 0.12);
}

.community-manual-reply-input::placeholder {
  color: #9aa0aa;
}

.community-manual-reply-btn {
  min-width: 64px;
  padding: 0 15px;
  color: #fff;
  border: 1px solid #6f58b4;
  border-radius: 9px;
  cursor: pointer;
  background: #7962bd;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.community-manual-reply-btn:hover {
  background: #6952ad;
}

.community-manual-reply-input:disabled,
.community-manual-reply-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.community-regenerate-btn {
  margin-top: 9px;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: #777f8b;
  background: transparent;
  font-size: 0.72rem;
  text-decoration: underline;
}

.community-draft-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6955a7;
  font-size: 0.78rem;
}

.community-dot-pulse,
.community-dot-pulse::before,
.community-dot-pulse::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8068c5;
  animation: communityPulse 1s infinite ease-in-out;
}

.community-dot-pulse {
  position: relative;
  margin: 0 8px;
}

.community-dot-pulse::before,
.community-dot-pulse::after {
  position: absolute;
  top: 0;
  content: '';
}

.community-dot-pulse::before {
  left: -9px;
  animation-delay: -0.2s;
}

.community-dot-pulse::after {
  left: 9px;
  animation-delay: 0.2s;
}

@keyframes communityPulse {
  0%, 80%, 100% { opacity: 0.35; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1); }
}

.community-load-more {
  padding: 0 28px 28px;
  text-align: center;
}

.community-load-more .community-action-secondary {
  color: #545d69;
  border-color: #d8dce2;
  background: #fff;
}

.community-load-more .community-action-secondary:hover {
  background: #f3f5f7;
}

@media (max-width: 820px) {
  .community-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-draft-grid {
    grid-template-columns: 1fr;
  }

  .community-draft-option {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .community-hero {
    padding: 24px 20px;
  }

  .community-hero-actions {
    width: 100%;
  }

  .community-action-btn {
    flex: 1;
  }

  .community-toolbar,
  .community-section-head,
  .community-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .community-persona-card,
  .community-notice,
  .community-loading,
  .community-empty {
    margin-right: 16px;
    margin-left: 16px;
  }

  .community-toolbar,
  .community-comment-list,
  .community-load-more {
    padding-right: 16px;
    padding-left: 16px;
  }

  .community-comment-main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .community-draft-area {
    padding-right: 16px;
    padding-left: 16px;
  }
}
