:root {
  --htw-green: #1e6b38;
  --htw-green-dark: #13462a;
  --htw-green-pale: #edf5f0;
  --htw-amber: #c97a1e;
  --htw-text: #1c2b22;
  --htw-text-muted: #5a6b60;
  --htw-bg: #f9fcfa;
  --htw-white: #ffffff;
  --htw-radius: 0.75rem;
  --htw-shadow: 0 6px 32px rgba(30, 107, 56, 0.13);
  --htw-font-body: 'Inter', system-ui, sans-serif;
  --htw-font-head: 'Lora', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.community-body {
  font-family: var(--htw-font-body);
  color: var(--htw-text);
  background: var(--htw-bg);
  min-height: 100dvh;
}

/* ── Auth: jagdlicher Hintergrund (wie HTW Hero) ───────────────── */
.community-auth-scene {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 1.5rem;
  padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
}

.community-auth-scene__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  filter: brightness(0.5);
  transform: scale(1.04);
  animation: community-hero-zoom 18s ease-out forwards;
}

@keyframes community-hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.02); }
}

.community-auth-scene__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(19, 70, 42, 0.82) 0%,
    rgba(30, 107, 56, 0.55) 45%,
    rgba(20, 40, 28, 0.35) 100%
  );
}

.community-auth-scene__logo-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 26rem;
  flex-shrink: 0;
}

.community-auth-scene__content {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 0.75rem 0 1rem;
}

.community-auth__logo-panel {
  width: 100%;
  background: var(--htw-white);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 1.1rem;
  padding: 1rem 1.25rem;
  box-shadow:
    0 12px 40px rgba(19, 70, 42, 0.18),
    0 2px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.community-auth__logo {
  display: block;
  height: 3.5rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.community-auth-scene__region {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  z-index: 2;
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.community-auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.community-auth__card {
  width: 100%;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1.1rem;
  padding: 2rem;
  box-shadow:
    0 12px 40px rgba(19, 70, 42, 0.18),
    0 2px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.community-auth__badge {
  display: inline-block;
  background: var(--htw-green-pale);
  color: var(--htw-green-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.community-auth__title {
  font-family: var(--htw-font-head);
  color: var(--htw-green-dark);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.community-auth__subtitle {
  color: var(--htw-text-muted);
  margin: 0 0 1.25rem;
}

.community-app {
  --community-bottom-nav-height: 3.5rem;
  --community-chat-bar-height: 3.45rem;
  --community-chat-gutter: 1rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--community-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}
.community-update-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--htw-radius);
  background: linear-gradient(165deg, #1a5f32 0%, var(--htw-green-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(19, 70, 42, 0.35);
}
.community-update-banner[hidden] {
  display: none !important;
}
.community-body:has(.community-nav) .community-update-banner {
  bottom: calc(var(--community-bottom-nav-height, 3.5rem) + env(safe-area-inset-bottom, 0px) + 0.5rem);
}
.community-body:has(.community-app--messages) .community-update-banner {
  bottom: calc(
    var(--community-bottom-nav-height, 3.5rem) + var(--community-chat-bar-height, 3.45rem) + env(safe-area-inset-bottom, 0px) + 0.5rem
  );
}
.community-update-banner__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}
.community-update-banner__btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  background: #fff;
  color: var(--htw-green-dark);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.community-update-banner__btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.community-app--messages {
  padding-bottom: calc(
    var(--community-bottom-nav-height) + var(--community-chat-bar-height) + env(safe-area-inset-bottom, 0px)
  );
}
.community-app--messages .community-header {
  display: none;
}
.community-app--messages .community-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.community-app--messages .community-view[data-view="messages"] {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.community-app--admin .community-header,
.community-app--admin .community-main,
.community-app--admin .community-chat-bar,
.community-app--admin .community-chat-preview,
.community-app--admin .community-attach-menu {
  display: none !important;
}
.community-app--admin {
  padding-bottom: calc(var(--community-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}
.community-admin[hidden] {
  display: none !important;
}
.community-admin {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.community-admin-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 1rem 0.85rem;
  background: linear-gradient(165deg, #1a5f32 0%, var(--htw-green-dark) 100%);
  color: #fff;
}
.community-admin-header__back {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.community-admin-header__back svg {
  width: 1.2rem;
  height: 1.2rem;
}
.community-admin-header__text {
  min-width: 0;
}
.community-admin-header__kicker {
  display: block;
  font-size: 0.72rem;
  opacity: 0.82;
}
.community-admin-header__title {
  margin: 0.1rem 0 0;
  font-family: var(--htw-font-head);
  font-size: 1.35rem;
  line-height: 1.15;
}
.community-admin-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}
.community-admin-page[hidden] {
  display: none !important;
}
.community-admin-stats {
  margin-bottom: 1rem;
}
.community-admin-stat {
  background: #fff;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-admin-stat__value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--htw-green-dark);
}
.community-admin-stat__label {
  display: block;
  margin-top: 0.15rem;
  color: var(--htw-text-muted);
  font-size: 0.88rem;
}
.community-admin-actions {
  display: grid;
  gap: 0.75rem;
}
.community-admin-action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-admin-action__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: var(--htw-green-pale);
  color: var(--htw-green-dark);
  display: grid;
  place-items: center;
}
.community-admin-action__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}
.community-admin-action__body {
  flex: 1;
  min-width: 0;
}
.community-admin-action__title {
  display: block;
  font-weight: 600;
  color: var(--htw-text);
}
.community-admin-action__meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--htw-text-muted);
}
.community-admin-action__chevron {
  flex-shrink: 0;
  font-size: 1.35rem;
  color: var(--htw-text-muted);
}
.community-admin-filter {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.community-admin-filter__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--htw-text-muted);
}
.community-admin-filter__field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-admin-filter__field svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--htw-text-muted);
}
.community-admin-filter__field input {
  flex: 1;
  border: 0;
  font: inherit;
  background: transparent;
  color: var(--htw-text);
}
.community-admin-filter__field input:focus {
  outline: none;
}
.community-admin-session-list,
.community-admin-day-list {
  display: grid;
  gap: 0.75rem;
}
.community-admin-session {
  display: flex;
  gap: 0.85rem;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-admin-session__avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.community-admin-session__name {
  font-weight: 600;
  color: var(--htw-text);
}
.community-admin-session__email {
  margin-top: 0.1rem;
  font-size: 0.82rem;
  color: var(--htw-text-muted);
}
.community-admin-session__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--htw-text-muted);
}
.community-admin-day-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-admin-day-row__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: var(--htw-green-pale);
  color: var(--htw-green-dark);
  display: grid;
  place-items: center;
}
.community-admin-day-row__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.community-admin-day-row__body {
  flex: 1;
  min-width: 0;
}
.community-admin-day-row__title {
  display: block;
  font-weight: 600;
}
.community-admin-day-row__meta {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.82rem;
  color: var(--htw-text-muted);
}
.community-admin-day-row__chevron {
  color: var(--htw-text-muted);
  font-size: 1.35rem;
}
.community-admin-day-card {
  background: #fff;
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-admin-day-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.14);
}
.community-admin-day-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: var(--htw-green-pale);
  color: var(--htw-green-dark);
  display: grid;
  place-items: center;
}
.community-admin-day-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.community-admin-day-card__title {
  font-weight: 600;
}
.community-admin-day-card__meta {
  margin-top: 0.12rem;
  font-size: 0.82rem;
  color: var(--htw-text-muted);
}
.community-admin-member-list {
  display: grid;
}
.community-admin-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}
.community-admin-member-row + .community-admin-member-row {
  border-top: 0.5px solid rgba(60, 60, 67, 0.14);
}
.community-admin-member-row__name {
  font-weight: 600;
}
.community-admin-member-row__context {
  margin-top: 0.12rem;
  font-size: 0.82rem;
  color: var(--htw-text-muted);
}
.community-admin-member-row__time {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--htw-text-muted);
}
.community-admin-empty {
  margin: 1rem 0;
  text-align: center;
  color: var(--htw-text-muted);
}
.community-app--detail {
  min-height: 100dvh;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.community-detail-page {
  padding-top: 0;
}
.community-detail-hero__button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.community-doc-list__item--link {
  text-decoration: none;
  color: inherit;
}
.community-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1.25rem 1rem 1rem;
  padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
  background: linear-gradient(165deg, #1a5f32 0%, var(--htw-green-dark) 100%);
}
.community-header__content {
  flex: 1;
  min-width: 0;
}
.community-header__logo {
  flex-shrink: 0;
  height: 4.25rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.28));
}
.community-header__logo-btn {
  flex-shrink: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0.65rem;
}
.community-header__logo-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.community-header__logo-btn:active {
  transform: scale(0.97);
}
.community-header__title {
  margin: 0;
  font-family: var(--htw-font-head);
  line-height: 1.15;
}
.community-header__brand-line {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
}
.community-header__brand-sub {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--htw-font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}
.community-header__greeting {
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--htw-amber);
}
.community-main {
  flex: 1;
  padding: 0.75rem 1rem 1rem;
}
.community-view { display: none; }
.community-view--active { display: block; }
.community-view[data-view="messages"].community-view--active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.community-section-title {
  font-family: var(--htw-font-head);
  color: var(--htw-green-dark);
  margin: 0 0 1rem;
  font-size: 1.35rem;
}
.community-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.community-events-header .community-section-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.community-events-view-toggle {
  display: flex;
  flex-shrink: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d4e4da;
  background: #fff;
}
.community-events-view-toggle__btn {
  border: 0;
  background: transparent;
  color: var(--htw-text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.community-events-view-toggle__btn--active {
  background: var(--htw-green);
  color: #fff;
}
.community-events-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.community-events-cal-nav__btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #d4e4da;
  border-radius: 50%;
  background: #fff;
  color: var(--htw-green-dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.community-events-cal-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-family: var(--htw-font-head);
  font-size: 1.05rem;
  color: var(--htw-green-dark);
}
.community-events-calendar {
  background: #fff;
  border-radius: var(--htw-radius);
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
  padding: 0.65rem 0.5rem 0.75rem;
  margin-bottom: 1rem;
}
.community-events-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}
.community-events-cal-weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--htw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.community-events-cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}
.community-events-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  min-height: 3.1rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  padding: 0.35rem 0.15rem 0.25rem;
  cursor: pointer;
  font: inherit;
  color: var(--htw-text);
}
.community-events-cal-day:hover {
  background: var(--htw-green-pale);
}
.community-events-cal-day--other {
  opacity: 0.35;
}
.community-events-cal-day--today .community-events-cal-day-num {
  background: var(--htw-green);
  color: #fff;
}
.community-events-cal-day--selected {
  background: var(--htw-green-pale);
  outline: 2px solid rgba(30, 107, 56, 0.25);
}
.community-events-cal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.community-events-cal-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 0.35rem;
}
.community-events-cal-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--htw-green);
}
.community-events-cal-day-panel {
  margin-top: 0.25rem;
}
.community-events-cal-day-title {
  margin: 0 0 0.75rem;
  font-family: var(--htw-font-head);
  font-size: 1.05rem;
  color: var(--htw-green-dark);
}
.community-events-cal-day-empty {
  margin: 0;
  text-align: center;
}
.community-home-block { margin-bottom: 1.5rem; }
.community-home-block__title {
  font-family: var(--htw-font-head);
  color: var(--htw-green-dark);
  font-size: 1.1rem;
  margin: 0 0 0.65rem;
}
.community-home-block__more {
  display: inline-block;
  margin-top: 0.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--htw-green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.community-card--profile {
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.community-profile-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
  cursor: pointer;
}
.community-profile-avatar__image {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--htw-green-pale);
  box-shadow: 0 4px 18px rgba(30, 107, 56, 0.15);
}
.community-profile-avatar__badge {
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  transform: translateX(-50%);
  background: var(--htw-green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.community-profile-meta {
  width: 100%;
}
.community-profile-meta h3 { margin: 0 0 0.25rem; }
.community-profile-meta__role {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--htw-green);
}
.community-profile-photo-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
.community-profile-logout { margin-top: 1rem; width: 100%; }
.community-profile-version {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(19, 70, 42, 0.08);
  text-align: center;
  font-size: 0.78rem;
  color: var(--htw-text-muted);
  letter-spacing: 0.02em;
}
.community-card--profile h3 { margin: 0 0 0.25rem; }
.community-btn--block { width: 100%; text-align: center; }
.community-feed-status {
  min-height: 2.5rem;
  padding: 0.5rem 0 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--htw-text-muted);
}
.community-feed-sentinel {
  height: 1px;
}
.community-stack { display: grid; gap: 0.75rem; margin-top: 1rem; }
.community-card {
  background: var(--htw-white);
  border-radius: var(--htw-radius);
  padding: 1rem;
  box-shadow: 0 2px 16px rgba(30, 107, 56, 0.08);
}
.community-card h3, .community-card h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.community-card p { margin: 0; color: var(--htw-text-muted); font-size: 0.9rem; }
.community-card--detail { margin-top: 1rem; }
.community-card__meta {
  font-size: 0.8rem;
  color: var(--htw-amber);
  margin-bottom: 0.5rem;
}
.community-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(var(--community-bottom-nav-height, 3.5rem) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: var(--htw-white);
  border-top: 1px solid #d4e4da;
  padding: 0.25rem max(0.35rem, env(safe-area-inset-left, 0px)) calc(0.25rem + env(safe-area-inset-bottom, 0px)) max(0.35rem, env(safe-area-inset-right, 0px));
}
.community-nav__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  border: 0;
  background: transparent;
  color: var(--htw-text-muted);
  font-size: 0.62rem;
  line-height: 1.1;
  padding: 0.4rem 0.15rem;
  font-family: inherit;
  cursor: pointer;
}
.community-nav__icon {
  position: relative;
  display: flex;
  width: 1.35rem;
  height: 1.35rem;
}
.community-nav__icon svg {
  width: 100%;
  height: 100%;
}
.community-nav__badge {
  position: absolute;
  top: -0.35rem;
  right: -0.55rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.community-nav__badge[hidden] {
  display: none !important;
}
.community-nav__label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-nav__btn--active { color: var(--htw-green); font-weight: 600; }
.community-nav__btn--active .community-nav__icon { color: var(--htw-green); }

.community-form { display: grid; gap: 0.85rem; }
.community-field { display: grid; gap: 0.35rem; font-size: 0.9rem; }
.community-field input,
.community-select,
.community-textarea {
  width: 100%;
  border: 1px solid #d4e4da;
  border-radius: 0.6rem;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
}
.community-checkbox, .community-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.community-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.community-btn--primary { background: var(--htw-green); color: #fff; }
.community-btn--secondary { background: var(--htw-green-pale); color: var(--htw-green-dark); margin-top: 0.75rem; }
.community-btn--ghost { background: transparent; color: var(--htw-green-dark); font-size: 0.85rem; padding: 0.35rem 0.6rem; }
.community-alert {
  border-radius: 0.6rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  background: var(--htw-green-pale);
  color: var(--htw-green-dark);
}
#push-banner[hidden] {
  display: none !important;
}
.community-muted {
  color: var(--htw-text-muted);
}
.community-alert--error { background: #fdecea; color: #8a1f11; }

.community-messages-header {
  margin-bottom: 0.75rem;
}
.community-messages-header .community-section-title {
  margin: 0 0 0.75rem;
}
.community-messages-list {
  margin-top: 0;
}

.community-app--messages-list {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.community-channel-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.community-channel-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-channel-item__avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--htw-green-pale);
}
.community-channel-item__avatar--broadcast,
.community-channel-item__avatar--leadership {
  background: var(--htw-green-pale);
}
.community-channel-item__avatar--natur { background: #e8f3ec; }
.community-channel-item__avatar--brauchtum { background: #fbf3e8; }
.community-channel-item__avatar--schiessen { background: #eef1f8; }
.community-channel-item__avatar--hunde { background: #f5efe9; }
.community-channel-item__avatar--junge { background: #edf6ef; }
.community-channel-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.community-channel-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.community-channel-item__name {
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--htw-text);
}
.community-channel-item__time {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--htw-text-muted);
}
.community-channel-item__preview {
  font-size: 0.84rem;
  color: var(--htw-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.community-channel-item__badge {
  flex-shrink: 0;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--htw-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.community-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
}
.community-app--messages .community-chat-panel {
  height: 100%;
}
.community-chat-panel[hidden],
#messages-channels-panel[hidden] {
  display: none !important;
}
.community-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding:
    calc(0.65rem + env(safe-area-inset-top, 0px))
    max(var(--community-chat-gutter), env(safe-area-inset-right, 0px))
    0.65rem
    max(var(--community-chat-gutter), env(safe-area-inset-left, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.14);
  position: sticky;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
}
.community-chat-header__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.community-chat-header__title {
  font-weight: 600;
  color: var(--htw-text);
}
.community-chat-header__subtitle {
  font-size: 0.78rem;
  color: var(--htw-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.community-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  padding:
    1rem
    max(var(--community-chat-gutter), env(safe-area-inset-right, 0px))
    1rem
    max(var(--community-chat-gutter), env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f4f6f4;
  -webkit-overflow-scrolling: touch;
}
.community-app--messages .community-chat-thread {
  padding-bottom: calc(var(--community-chat-bar-height) + 1rem);
}
.community-chat-empty {
  margin: 2rem 0;
  text-align: center;
  color: var(--htw-text-muted);
}
.community-chat-bubble {
  max-width: min(88%, calc(100% - 0.5rem));
  align-self: flex-start;
  background: #fff;
  border-radius: 1rem 1rem 1rem 0.35rem;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.community-chat-bubble--mine {
  align-self: flex-end;
  background: #dcf8c6;
  border-radius: 1rem 1rem 0.35rem 1rem;
}
.community-chat-bubble__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--htw-green-dark);
  margin-bottom: 0.25rem;
}
.community-chat-bubble__badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: var(--htw-green-pale);
  color: var(--htw-green);
}
.community-chat-bubble__quote {
  font-size: 0.75rem;
  color: var(--htw-text-muted);
  border-left: 3px solid var(--htw-green);
  padding-left: 0.5rem;
  margin-bottom: 0.35rem;
}
.community-chat-bubble__body {
  white-space: pre-wrap;
  word-break: break-word;
}
.community-chat-bubble__image {
  display: block;
  max-width: 100%;
  border-radius: 0.65rem;
  margin-top: 0.35rem;
}
.community-chat-bubble__meta {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  color: var(--htw-text-muted);
  text-align: right;
}
.community-chat-bubble__reply {
  margin-top: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--htw-green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.community-chat-bubble__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.45rem;
}
.community-chat-bubble__action {
  border: 0;
  background: transparent;
  color: var(--htw-green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.community-chat-bubble__action--danger {
  color: #b42318;
}
.community-chat-bubble__location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--htw-green-dark);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(30, 107, 56, 0.12);
}
.community-chat-bubble--mine .community-chat-bubble__location {
  background: rgba(255, 255, 255, 0.72);
}
.community-chat-reply--edit {
  background: #fff8eb;
  color: #8a5a00;
}
.community-chat-bar__attach:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.community-chat-reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem max(var(--community-chat-gutter), env(safe-area-inset-right, 0px)) 0.55rem max(var(--community-chat-gutter), env(safe-area-inset-left, 0px));
  background: #fff;
  border-top: 0.5px solid rgba(60, 60, 67, 0.14);
  font-size: 0.78rem;
  color: var(--htw-text-muted);
  box-sizing: border-box;
}
.community-chat-reply[hidden],
.community-chat-hint[hidden] {
  display: none !important;
}
.community-chat-reply button {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--htw-text-muted);
}
.community-chat-hint {
  padding: 0.5rem max(var(--community-chat-gutter), env(safe-area-inset-right, 0px)) 0 max(var(--community-chat-gutter), env(safe-area-inset-left, 0px));
  font-size: 0.78rem;
  color: var(--htw-text-muted);
  box-sizing: border-box;
}

.community-native-group__header {
  margin: 0 0 0.35rem;
  padding: 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--htw-text-muted);
}
.community-native-list {
  background: var(--htw-white);
  border-radius: 0.8rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(30, 107, 56, 0.08);
}
.community-native-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0 0.95rem;
}
.community-native-row + .community-native-row {
  border-top: 0.5px solid rgba(60, 60, 67, 0.14);
}
.community-native-row__label {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--htw-text);
}
.community-native-row__control {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 3rem;
  margin: -0.65rem -0.95rem -0.65rem 0;
  padding-right: 0.85rem;
}
.community-native-row__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}
.community-native-row__value {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.45rem;
  font-size: 1rem;
  color: #6b7280;
  pointer-events: none;
}
.community-native-row__chevron {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #c7c7cc;
  border-bottom: 2px solid #c7c7cc;
  transform: rotate(-45deg);
  pointer-events: none;
}
.community-native-row[hidden] {
  display: none !important;
}
.community-native-row__control--button {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: right;
  cursor: pointer;
}
.community-native-row__value-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
}
.community-native-row__subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.2;
  margin-top: 0.1rem;
}
.community-native-row__subtitle[hidden] {
  display: none !important;
}

.community-picker {
  position: fixed;
  inset: 0;
  z-index: 30;
}
.community-picker[hidden] {
  display: none !important;
}
.community-picker__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.community-picker__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(70dvh, 28rem);
  background: #f2f2f7;
  border-radius: 0.85rem 0.85rem 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.community-picker__header {
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--htw-text-muted);
  background: #fff;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.14);
}
.community-picker__list {
  overflow-y: auto;
  background: #fff;
  margin: 0.5rem 0.75rem 0.75rem;
  border-radius: 0.75rem;
}
.community-picker__item {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font: inherit;
}
.community-picker__item + .community-picker__item {
  border-top: 0.5px solid rgba(60, 60, 67, 0.14);
}
.community-picker__item-name {
  display: block;
  font-size: 1rem;
  color: var(--htw-text);
}
.community-picker__item-role {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #9ca3af;
}
.community-picker__item:active {
  background: var(--htw-green-pale);
}

.community-chat-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--community-bottom-nav-height, 3.5rem) + env(safe-area-inset-bottom, 0px));
  z-index: 6;
  align-items: flex-end;
  gap: 0.5rem;
  width: 100%;
  min-height: var(--community-chat-bar-height, 3.45rem);
  box-sizing: border-box;
  padding:
    0.55rem
    max(0.85rem, env(safe-area-inset-right, 0px))
    0.55rem
    max(0.85rem, env(safe-area-inset-left, 0px));
  background: #eef3ef;
  border-top: 1px solid #d4e4da;
  box-shadow: 0 -4px 12px rgba(30, 107, 56, 0.08);
}
.community-app--messages .community-chat-bar:not([hidden]) {
  display: flex;
}
.community-chat-bar[hidden],
#message-compose[hidden] {
  display: none !important;
}
.community-chat-bar__attach {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--htw-green);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
}
.community-chat-bar__input {
  flex: 1;
  min-height: 2.35rem;
  max-height: 7.5rem;
  resize: none;
  border: 0;
  border-radius: 1.25rem;
  padding: 0.6rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  background: #fff;
  color: var(--htw-text);
}
.community-chat-bar__input:focus {
  outline: 2px solid rgba(30, 107, 56, 0.25);
}
.community-chat-bar__send {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--htw-green);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.community-chat-bar__send svg {
  width: 1.1rem;
  height: 1.1rem;
}

.community-chat-preview {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(
    var(--community-bottom-nav-height, 3.5rem) + var(--community-chat-bar-height, 3.45rem) + env(safe-area-inset-bottom, 0px)
  );
  z-index: 4;
  padding: 0.5rem 0.75rem;
  background: #eef3ef;
  border-top: 1px solid #d4e4da;
}
.community-app--messages .community-chat-preview:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.community-chat-preview img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
}
.community-chat-preview__clear {
  margin-left: auto;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 50%;
  background: #d4e4da;
  color: var(--htw-text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.community-chat-preview__location-text {
  flex: 1;
  font-size: 0.84rem;
  color: var(--htw-green-dark);
}
.community-chat-preview--location:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.community-attach-menu {
  position: fixed;
  left: 0.65rem;
  bottom: calc(
    var(--community-bottom-nav-height, 3.5rem) + var(--community-chat-bar-height, 3.45rem) + 0.4rem + env(safe-area-inset-bottom, 0px)
  );
  z-index: 5;
  min-width: 11rem;
  padding: 0.35rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 8px 28px rgba(19, 70, 42, 0.18);
}
.community-attach-menu__item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--htw-text);
  border-radius: 0.5rem;
  cursor: pointer;
}
.community-attach-menu__item:hover,
.community-attach-menu__item:focus {
  background: var(--htw-green-pale);
}

.community-message-image {
  width: 100%;
  max-height: 12rem;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}
.community-reply-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

body.community-overlay-open {
  overflow: hidden;
}

.community-detail-view__toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: -0.75rem -1rem 1rem;
  padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 1rem 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.14);
  position: sticky;
  top: 0;
  z-index: 2;
}
.community-detail-view__body {
  padding-bottom: 1rem;
}
.community-detail__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--htw-green-pale);
  color: var(--htw-green);
  cursor: pointer;
  text-decoration: none;
}
.community-detail__back svg {
  width: 1.25rem;
  height: 1.25rem;
}
.community-detail__type {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--htw-text);
}
.community-detail-loading {
  padding: 1rem 0;
}
.community-detail-hero {
  margin: -1rem -1rem 1rem;
}
.community-detail-hero img {
  width: 100%;
  max-height: 16rem;
  object-fit: cover;
  display: block;
}
.community-detail-article__title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  line-height: 1.25;
}
.community-event-facts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(30, 107, 56, 0.12);
  border-radius: 0.85rem;
  box-shadow: 0 2px 12px rgba(30, 107, 56, 0.06);
}
.community-event-facts__badge {
  align-self: flex-start;
  background: var(--htw-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.community-event-facts__row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.community-event-facts__row + .community-event-facts__row {
  padding-top: 0.85rem;
  border-top: 0.5px solid rgba(60, 60, 67, 0.12);
}
.community-event-facts__datebox {
  flex-shrink: 0;
  width: 3.5rem;
  text-align: center;
  background: var(--htw-green);
  color: #fff;
  border-radius: 0.65rem;
  padding: 0.45rem 0.35rem;
  line-height: 1.1;
}
.community-event-facts__datebox-day {
  display: block;
  font-family: var(--htw-font-head);
  font-size: 1.35rem;
  font-weight: 700;
}
.community-event-facts__datebox-month {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.community-event-facts__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--htw-green-pale);
  color: var(--htw-green);
}
.community-event-facts__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}
.community-event-facts__content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.community-event-facts__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--htw-text-muted);
}
.community-event-facts__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--htw-text);
  line-height: 1.45;
}
.community-event-facts__sub {
  font-size: 0.88rem;
  color: var(--htw-text-muted);
  line-height: 1.4;
}
.community-detail-content {
  line-height: 1.7;
  font-size: 0.98rem;
  color: var(--htw-text);
}
.community-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.75rem 0;
}
.community-detail-content p,
.community-detail-content ul,
.community-detail-content ol {
  margin: 0 0 0.85rem;
}
.community-detail-section {
  margin-top: 1.5rem;
}
.community-detail-section__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--htw-green);
}
.community-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.community-gallery__thumb {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}
.community-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.community-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.community-doc-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid rgba(30, 107, 56, 0.12);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
}
.community-doc-list__icon {
  font-size: 1.25rem;
}
.community-doc-list__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.community-doc-list__name {
  font-weight: 600;
  color: var(--htw-text);
}
.community-doc-list__meta {
  font-size: 0.78rem;
  color: var(--htw-text-muted);
}

.community-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 1rem;
}
.community-lightbox[hidden] {
  display: none !important;
}
.community-lightbox__figure {
  margin: 0;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.community-lightbox__figure img {
  max-width: 95vw;
  max-height: 80vh;
  object-fit: contain;
}
.community-lightbox__caption {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  text-align: center;
}
.community-lightbox__close,
.community-lightbox__nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
}
.community-lightbox__close {
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
}
.community-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  font-size: 1.75rem;
}
.community-lightbox__nav--prev { left: 0.75rem; }
.community-lightbox__nav--next { right: 0.75rem; }
.community-lightbox__counter {
  position: absolute;
  top: calc(0.85rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
}

.community-doc-viewer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  background: #fff;
}
.community-doc-viewer[hidden] {
  display: none !important;
}
.community-doc-viewer__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 1rem 0.65rem;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.14);
}
.community-doc-viewer__download {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--htw-green);
  text-decoration: none;
}
.community-doc-viewer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #f4f6f4;
}
.community-doc-viewer__iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 4rem);
  border: 0;
}
.community-doc-viewer__fallback {
  padding: 2rem 1rem;
  text-align: center;
}
