:root {
  --community-bg-1: #fbf8f4;
  --community-bg-2: #f0ece5;
  --community-surface: rgba(255, 255, 255, 0.86);
  --community-surface-strong: #fffdfa;
  --community-text: #1f262c;
  --community-muted: #66707a;
  --community-line: rgba(31, 38, 44, 0.1);
  --community-shadow: 0 22px 50px rgba(31, 38, 44, 0.12);
  --community-radius-lg: 22px;
  --community-radius-xl: 30px;
  --scene-accent: #295f6b;
  --scene-accent-strong: #1f4e58;
  --scene-wash: rgba(41, 95, 107, 0.1);
  --scene-glow: rgba(208, 163, 95, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--community-text);
  background:
    radial-gradient(720px circle at 18% 12%, rgba(255, 255, 255, 0.52) 0%, transparent 40%),
    radial-gradient(900px circle at -10% -10%, var(--scene-glow) 0%, transparent 36%),
    radial-gradient(860px circle at 100% 0%, rgba(219, 238, 241, 0.72) 0%, transparent 34%),
    linear-gradient(180deg, var(--community-bg-1) 0%, var(--community-bg-2) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 38, 44, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 38, 44, 0.026) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: -1;
}

a {
  color: var(--scene-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input,
textarea,
select {
  font: inherit;
}

.community-header {
  position: sticky;
  top: 0;
  z-index: 32;
  backdrop-filter: blur(18px);
  background: rgba(251, 248, 244, 0.74);
  border-bottom: 1px solid var(--community-line);
  box-shadow: 0 8px 24px rgba(31, 38, 44, 0.06);
}

.community-header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.community-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--community-text);
  font-family: "Optima", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  font-size: 1.34rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.community-brand:hover {
  text-decoration: none;
}

.community-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 90, 74, 0.16), rgba(41, 95, 107, 0.14));
  color: var(--scene-accent);
  font-size: 0.94rem;
  font-weight: 900;
}

.community-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--community-text);
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.community-nav a:hover {
  text-decoration: none;
  background: #fff;
  transform: translateY(-1px);
}

.community-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.community-card,
.panel-card,
.post-card,
.sidebar-card {
  border-radius: var(--community-radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 246, 241, 0.9));
  border: 1px solid var(--community-line);
  box-shadow: var(--community-shadow);
  backdrop-filter: blur(14px);
}

.community-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
}

.community-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 46%),
    radial-gradient(640px circle at 0% 20%, rgba(255, 255, 255, 0.34), transparent 52%);
  pointer-events: none;
}

.community-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--scene-glow) 0%, transparent 66%);
  pointer-events: none;
}

.community-hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: center;
}

.community-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--scene-wash);
  color: var(--scene-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.community-title {
  margin: 16px 0 10px;
  max-width: 760px;
  font-family: "Optima", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.community-description {
  margin: 0;
  max-width: 700px;
  color: #4e5861;
  font-size: 1rem;
}

.community-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.community-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 38, 44, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: #26313a;
  font-size: 0.9rem;
  font-weight: 700;
}

.community-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--scene-accent), #8b5a4a);
}

.community-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.community-stat-card {
  position: relative;
  border-radius: 18px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 244, 239, 0.78));
  border: 1px solid rgba(31, 38, 44, 0.08);
}

.community-stat-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--scene-accent), rgba(139, 90, 74, 0.78));
}

.community-stat-card strong {
  display: block;
  color: var(--scene-accent-strong);
  font-size: 1.34rem;
  line-height: 1.1;
}

.community-stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--community-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.community-hero-media {
  position: relative;
  min-height: 420px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(31, 38, 44, 0.08);
  box-shadow: 0 18px 38px rgba(31, 38, 44, 0.14);
}

.community-hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.community-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 14, 18, 0.02) 24%, rgba(10, 14, 18, 0.64) 100%),
    linear-gradient(40deg, rgba(255, 255, 255, 0.12), transparent 52%);
}

.community-hero-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 38, 44, 0.08);
}

.community-hero-note h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #1d272e;
}

.community-hero-note p {
  margin: 0;
  color: #55606a;
  font-size: 0.9rem;
}

.community-dashboard {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-top: 22px;
}

.panel-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.panel-card::before,
.sidebar-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(41, 95, 107, 0.4), rgba(139, 90, 74, 0.08), transparent);
}

.panel-heading {
  margin: 0 0 6px;
  color: #182126;
  font-size: 1.18rem;
}

.panel-copy {
  margin: 0;
  color: var(--community-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.scene-spotlight {
  background:
    radial-gradient(420px circle at 100% 0%, rgba(255, 255, 255, 0.28), transparent 44%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(245, 242, 238, 0.9));
}

.scene-spotlight::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -110px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--scene-glow) 0%, transparent 68%);
  pointer-events: none;
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--scene-wash);
  color: var(--scene-accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.spotlight-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--scene-accent);
  box-shadow: 0 0 0 6px rgba(41, 95, 107, 0.08);
}

.spotlight-title {
  margin: 14px 0 10px;
  max-width: 560px;
  color: #162127;
  font-size: 1.44rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.spotlight-lead {
  max-width: 620px;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.spotlight-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 247, 243, 0.76));
  border: 1px solid rgba(31, 38, 44, 0.08);
}

.spotlight-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--scene-accent), transparent);
}

.spotlight-card h3 {
  margin: 0;
  color: #182126;
  font-size: 0.98rem;
}

.spotlight-card p {
  margin: 8px 0 0;
  color: #57616b;
  font-size: 0.86rem;
  line-height: 1.6;
}

.identity-card {
  margin-top: 16px;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 245, 240, 0.92));
  border: 1px solid rgba(31, 38, 44, 0.08);
  display: grid;
  gap: 10px;
}

.identity-card[hidden] {
  display: none !important;
}

.identity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.identity-name {
  margin: 0;
  font-size: 1rem;
  color: #1d272e;
}

.identity-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--scene-wash);
  color: var(--scene-accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.identity-role::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--scene-accent);
}

.identity-meta {
  color: var(--community-muted);
  font-size: 0.86rem;
}

.auth-form,
.composer-form,
.comment-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  color: #33414a;
  font-size: 0.84rem;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(31, 38, 44, 0.12);
  background: rgba(251, 248, 244, 0.94);
  padding: 11px 12px;
  color: var(--community-text);
}

.form-field textarea {
  min-height: 116px;
  resize: vertical;
}

.media-url-input {
  min-height: 92px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(41, 95, 107, 0.28);
  box-shadow: 0 0 0 3px rgba(41, 95, 107, 0.12);
}

.form-help,
.form-status,
.panel-list {
  color: var(--community-muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.form-status {
  min-height: 1.4em;
}

.panel-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.panel-list li + li {
  margin-top: 8px;
}

.community-feed-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}

.sidebar-stack,
.feed-stack {
  display: grid;
  gap: 18px;
}

.sidebar-stack {
  position: sticky;
  top: 92px;
}

.sidebar-card {
  position: relative;
  padding: 22px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.toolbar-title {
  margin: 0;
  color: #182126;
  font-size: 1.14rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button,
.action-button,
.ghost-button,
.reaction-button,
.comment-button,
.logout-button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.action-button,
.comment-button {
  background: linear-gradient(135deg, var(--scene-accent), #8b5a4a);
  color: #fff;
  box-shadow: 0 14px 24px rgba(41, 95, 107, 0.18);
}

.ghost-button,
.filter-button,
.logout-button {
  border: 1px solid rgba(31, 38, 44, 0.1);
  background: rgba(255, 255, 255, 0.84);
  color: var(--community-text);
}

.filter-button.is-active,
.reaction-button.is-active {
  background: var(--scene-wash);
  border-color: rgba(41, 95, 107, 0.18);
  color: var(--scene-accent-strong);
}

.action-button:hover,
.ghost-button:hover,
.filter-button:hover,
.reaction-button:hover,
.comment-button:hover,
.logout-button:hover {
  transform: translateY(-1px);
}

.feed-list {
  display: grid;
  gap: 18px;
}

.post-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 46px rgba(31, 38, 44, 0.14);
}

.post-media-shell {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(248, 244, 238, 0.82), rgba(255, 255, 255, 0.88));
  border-bottom: 1px solid rgba(31, 38, 44, 0.08);
}

.post-media-summary {
  display: inline-flex;
  align-items: center;
  align-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(31, 38, 44, 0.08);
  color: #44505a;
  font-size: 0.8rem;
  font-weight: 800;
}

.post-media-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.post-media-item {
  position: relative;
  grid-column: span 6;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(41, 95, 107, 0.1);
  border: 1px solid rgba(31, 38, 44, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.post-media-gallery.is-single .post-media-item {
  grid-column: 1 / -1;
  min-height: 360px;
}

.post-media-gallery.is-double .post-media-item {
  grid-column: span 6;
}

.post-media-gallery.is-multi .post-media-item {
  grid-column: span 4;
}

.post-media-gallery.is-multi .post-media-item.is-featured {
  grid-column: 1 / -1;
  min-height: 360px;
}

.post-media-item img,
.post-media-item video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.post-media-item video {
  background: #080c0f;
}

.post-media-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 20, 24, 0.62);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.post-body {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-meta-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.post-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.post-author strong {
  color: #1d272e;
  font-size: 0.98rem;
}

.post-role,
.post-time {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 38, 44, 0.06);
  color: #53606b;
  font-size: 0.76rem;
  font-weight: 800;
}

.post-title {
  margin: 0;
  color: #182126;
  font-size: 1.24rem;
}

.post-caption {
  margin: 0;
  color: #4f5963;
  font-size: 0.95rem;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(41, 95, 107, 0.08);
  color: var(--scene-accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reaction-button {
  border: 1px solid rgba(31, 38, 44, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--community-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.reaction-button span {
  display: inline-block;
  margin-left: 6px;
}

.reaction-button[disabled],
.comment-form textarea[disabled],
.comment-button[disabled],
.composer-form input[disabled],
.composer-form textarea[disabled],
.composer-form select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment-section {
  border-top: 1px solid rgba(31, 38, 44, 0.08);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.comment-heading {
  margin: 0;
  color: #22303a;
  font-size: 0.94rem;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-item {
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(251, 248, 244, 0.96), rgba(248, 245, 240, 0.9));
  border: 1px solid rgba(31, 38, 44, 0.06);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comment-item strong {
  color: #20313a;
  font-size: 0.86rem;
}

.comment-item p {
  margin: 6px 0 0;
  color: #56606a;
  font-size: 0.88rem;
  line-height: 1.6;
}

.delete-button {
  border: 1px solid rgba(139, 90, 74, 0.18);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(139, 90, 74, 0.08);
  color: #8b5a4a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.delete-button:hover {
  transform: translateY(-1px);
  background: rgba(139, 90, 74, 0.12);
  border-color: rgba(139, 90, 74, 0.26);
}

.comment-form textarea {
  min-height: 88px;
}

.comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.empty-state {
  padding: 26px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: #182126;
}

.empty-state p {
  margin: 0;
  color: var(--community-muted);
}

.community-footer {
  margin-top: 22px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.community-footer span {
  color: var(--community-muted);
  font-size: 0.86rem;
}

.community-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.file-input {
  padding: 10px 0 4px;
}

@media (max-width: 1040px) {
  .community-hero-grid,
  .community-dashboard,
  .community-feed-shell {
    grid-template-columns: 1fr;
  }

  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    position: static;
  }

  .post-media-gallery,
  .post-media-gallery.is-double,
  .post-media-gallery.is-multi {
    grid-template-columns: 1fr;
  }

  .post-media-item,
  .post-media-gallery.is-multi .post-media-item,
  .post-media-gallery.is-multi .post-media-item.is-featured {
    grid-column: 1 / -1;
    min-height: 260px;
  }
}

@media (max-width: 720px) {
  .community-header-inner,
  .community-footer,
  .comment-form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .community-nav {
    width: 100%;
  }

  .community-nav li {
    flex: 1 1 auto;
  }

  .community-nav a {
    width: 100%;
    text-align: center;
  }

  .form-grid,
  .community-stat-grid {
    grid-template-columns: 1fr;
  }

  .community-shell {
    padding: 22px 14px 40px;
  }

  .community-hero-media {
    min-height: 320px;
  }

  .panel-card,
  .sidebar-card,
  .post-body {
    padding: 18px;
  }
}
