:root {
  --ink: #1c2420;
  --muted: #60706a;
  --line: #dfe6e2;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --green: #176b4d;
  --green-dark: #0e4d38;
  --blue: #28639b;
  --yellow: #f4b740;
  --red: #b5453c;
  --shadow: 0 18px 50px rgba(29, 48, 41, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

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

.hero {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 35, 27, 0.88) 0%, rgba(10, 35, 27, 0.72) 38%, rgba(10, 35, 27, 0.16) 76%),
    url("assets/meinerzhagen-civic-board.webp") center / cover no-repeat;
}

.topbar {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 20px !important;
  height: 24px !important;
  flex: 0 0 20px !important;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--green-dark);
  background: #fff;
  overflow: hidden;
}

.brand-mark img {
  width: 18px !important;
  height: 22px !important;
  max-width: 18px !important;
  max-height: 22px !important;
  object-fit: contain !important;
  display: block !important;
}

.brand .brand-mark,
.brand .brand-mark img {
  min-width: 0 !important;
  min-height: 0 !important;
}

.nav-actions {
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  place-items: center;
}

.menu-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.menu-icon-close {
  display: none;
}

.menu-toggle.is-open .menu-icon-open {
  display: none;
}

.menu-toggle.is-open .menu-icon-close {
  display: block;
}

.nav-actions a,
.nav-actions button {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-weight: 500;
}

.hero-content {
  width: min(1160px, calc(100% - 32px));
  margin: auto;
  padding: 42px 0 78px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(1.22rem, 1.7vw, 1.62rem) !important;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 600;
}

.hero-copy {
  max-width: 540px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.18rem;
  line-height: 1.35;
}

.hero-content .eyebrow {
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero-rules {
  display: inline-flex;
}

.button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 500;
  transition: transform 160ms ease, background 160ms ease, border 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.primary {
  color: #fff;
  background: var(--green);
}

.primary:hover {
  background: var(--green-dark);
}

.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
}

.ghost {
  color: var(--green-dark);
  border: 1px solid var(--line);
  background: #fff;
}

.reject {
  color: #fff;
  background: var(--red);
}

.archive {
  color: var(--green-dark);
  background: #e7ece9;
}

.delete {
  color: #fff;
  background: #6f1d17;
}

.forward {
  color: #fff;
  background: var(--blue);
}

.done-action {
  color: #fff;
  background: #4f7d3f;
}

.stats-strip {
  width: min(1160px, calc(100% - 32px));
  margin: -52px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stats-strip article {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.stats-strip article:last-child {
  border-right: 0;
}

.stats-strip strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stats-strip span {
  color: var(--muted);
  font-weight: 700;
}

.workspace {
  width: min(1160px, calc(100% - 32px));
  margin: 48px auto 48px;
}

.board-header {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.board-header h2 {
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.mobile-collapse {
  min-width: 0;
}

.mobile-collapse > summary {
  display: none;
}

.filter {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.filter[href] {
  display: inline-flex;
  align-items: center;
}

.filter.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.submission-panel,
.card,
.board-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(29, 48, 41, 0.07);
}

.submission-panel {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 18px;
}

.submission-panel.is-highlighted {
  animation: panelPulse 1.8s ease;
}

@keyframes panelPulse {
  0% {
    border-color: var(--yellow);
    box-shadow: 0 0 0 0 rgba(244, 183, 64, 0.58), var(--shadow);
  }
  45% {
    border-color: var(--yellow);
    box-shadow: 0 0 0 8px rgba(244, 183, 64, 0.16), var(--shadow);
  }
  100% {
    border-color: var(--line);
    box-shadow: 0 10px 30px rgba(29, 48, 41, 0.07);
  }
}

.submission-panel > summary {
  list-style: none;
}

.submission-panel > summary::-webkit-details-marker,
.mobile-collapse > summary::-webkit-details-marker {
  display: none;
}

form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd8d2;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(40, 99, 155, 0.18);
  border-color: var(--blue);
}

textarea {
  resize: vertical;
}

::placeholder {
  color: #6f7975;
  font-weight: 400;
  opacity: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.submit {
  width: 100%;
  margin-top: 4px;
}

.fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.board {
  min-width: 0;
}

.board-tools {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px 150px 140px auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.search-label {
  flex: 1;
}

.cards {
  display: grid;
  gap: 14px;
}

.card {
  padding: 11px 13px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover,
.rule-card:hover,
.topic-grid button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 36px rgba(29, 48, 41, 0.12);
}

.card-top,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card h3 {
  margin: 6px 0 5px;
  font-size: 1rem;
  line-height: 1.22;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
}

.meta,
.card-footer {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green-dark);
  background: #e6f1eb;
  font-size: 0.78rem;
  font-weight: 600;
}

.cards .card {
  display: grid;
  gap: 6px;
}

.badge.complaint {
  color: #743027;
  background: #fae6e2;
}

.badge.improvement {
  color: #174b77;
  background: #e5f0f8;
}

.badge.danger {
  color: #753b00;
  background: #fff0c9;
}

.badge.done {
  color: #fff;
  background: var(--green);
}

.moderation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.moderation-badge.accepted {
  color: #fff;
  background: var(--green);
}

.moderation-badge.rejected {
  color: #fff;
  background: var(--red);
}

.moderation-badge.archived {
  color: var(--ink);
  background: #d8dedb;
}

.moderation-badge.pending {
  color: #174b77;
  background: #e5f0f8;
}

.moderation-badge.forwarded {
  color: #fff;
  background: var(--blue);
}

.moderation-badge.done {
  color: #fff;
  background: #4f7d3f;
}

.status-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.empty {
  padding: 36px;
  border: 1px dashed #b9c7c0;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.notice {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 20;
  width: min(760px, calc(100% - 32px));
  margin: 0;
  padding: 28px 32px;
  border-radius: 8px;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity 260ms ease, transform 260ms ease;
}

.notice.is-hiding {
  opacity: 0;
  transform: translate(-50%, -48%);
}

.notice.success {
  color: #fff;
  background: #176b4d;
}

.notice.error {
  color: #7a2d25;
  background: #fae5e1;
}

.notice p {
  margin: 0;
}

.rules-section {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.topics-section {
  margin-top: 22px;
  margin-bottom: 28px;
}

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

.rule-card {
  width: 100%;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(29, 48, 41, 0.07);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.rules-trigger {
  min-height: 38px;
  padding: 8px 13px;
}

.rules-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.rules-modal-grid .rule-card {
  box-shadow: none;
  cursor: default;
}

.rules-modal-grid .rule-card:hover {
  transform: none;
  box-shadow: none;
}

.rule-card.allowed {
  border-color: #b8dfc5;
  background: #eef9f2;
}

.rule-card h3 {
  margin: 0 0 8px;
}

.rule-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.rule-card.warning {
  border-color: #efc7c1;
  background: #fff1ef;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.topic-grid button {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.topic-grid button:hover {
  background: #eef7f2;
  border-color: #b8dfc5;
}

.checkbox-label {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) !important;
  align-items: start;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.checkbox-label input {
  width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin-top: 2px;
  padding: 0;
  align-self: start;
}

.meldung-photo {
  width: 100%;
  max-height: 150px;
  margin-top: 0;
  border-radius: 8px;
  object-fit: cover;
}

.photo-thumb {
  width: min(220px, 100%);
  padding: 0;
  display: grid;
  gap: 5px;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
}

.photo-viewer {
  width: min(1100px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
}

.photo-viewer-shell {
  position: relative;
  padding: 12px;
  border-radius: 8px;
  background: #111;
}

.photo-viewer-shell img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 70px);
  object-fit: contain;
  border-radius: 6px;
}

.admin-workspace {
  min-height: 420px;
}

.admin-login {
  max-width: 430px;
  position: static;
}

.logout-form {
  margin: 0;
}

.logout-form .button {
  width: auto;
}

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.admin-tabs a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  font-weight: 600;
}

.admin-tabs a.active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.admin-limit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-limit-form label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-limit-form select {
  min-height: 38px;
  width: auto;
  min-width: 76px;
  padding: 7px 34px 7px 10px;
}

.admin-table {
  display: grid;
  gap: 6px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) 140px 130px 96px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-row-head {
  color: var(--muted);
  background: #f5f8f6;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-row strong {
  font-weight: 600;
}

.admin-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-dialog {
  width: min(780px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(88vh, 820px);
  box-sizing: border-box;
  overflow: hidden;
}

.admin-dialog .modal-shell {
  width: 100%;
  box-sizing: border-box;
  max-height: min(88vh, 820px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 24px;
}

.admin-dialog input,
.admin-dialog select,
.admin-dialog textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-dialog label,
.admin-dialog section,
.admin-dialog details,
.admin-dialog button {
  min-width: 0;
}

.admin-card-head {
  display: grid;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-card-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.admin-card-head strong {
  font-size: 1.04rem;
  font-weight: 600;
}

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

.admin-dialog .admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.private-note {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-original {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.admin-original h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.admin-original p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.admin-actions {
  position: static;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  margin: 4px -24px -22px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.forward-box {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.forward-box summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 600;
}

.admin-actions .button {
  min-height: 40px;
  width: 100%;
  padding: 9px 10px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.admin-rules-editor {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-rules-editor summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 700;
}

.reply-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.reply-box summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 600;
}

.reply-box p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.admin-photo {
  max-width: 220px;
  max-height: 150px;
  object-fit: contain;
  background: #f6f8f5;
}

.admin-photo-thumb {
  width: min(220px, 100%);
}

.modal {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}

.modal::backdrop {
  background: rgba(8, 24, 18, 0.62);
}

.modal-shell {
  position: relative;
  max-height: calc(100dvh - 32px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-shell form {
  margin-top: 12px;
}

.modal-hint {
  margin: 8px 42px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.modal-shell h2 {
  padding-right: 46px;
  font-size: clamp(1.45rem, 2.5vw, 2.05rem);
}

.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell form label:nth-of-type(4),
.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell form .checkbox-label,
.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell form .submit,
.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell form .fineprint {
  grid-column: 1 / -1;
}

.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) textarea {
  min-height: 92px;
}

.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) input,
.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) select,
.modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) textarea {
  padding: 8px 10px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

footer {
  padding: 26px 16px 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr) auto auto;
  align-items: center;
  gap: 12px;
}

.footer-inner span {
  justify-self: center;
  text-align: center;
}

.footer-disclaimer {
  grid-column: 1 / -1;
  font-size: 0.86rem;
}

footer strong {
  color: var(--ink);
}

.footer-brand {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

footer a {
  justify-self: end;
}

.footer-rules {
  display: none;
  justify-self: end;
  border: 0;
  padding: 0;
  color: var(--green-dark);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.impressum {
  width: min(1160px, calc(100% - 32px));
  margin: 24px auto 56px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 48px auto;
}

.legal-back {
  margin-bottom: 18px;
}

.legal-page h1 {
  margin: 0 0 16px;
  font-size: 1.8rem;
  line-height: 1.15;
}

.impressum h2 {
  color: var(--ink);
}

.impressum p {
  margin: 10px 0 0;
}

@media (max-width: 900px) {
  .hero {
    min-height: 430px;
    background:
      linear-gradient(180deg, rgba(10, 35, 27, 0.9) 0%, rgba(10, 35, 27, 0.72) 52%, rgba(10, 35, 27, 0.2) 100%),
      url("assets/meinerzhagen-civic-board.webp") center / cover no-repeat;
  }

  .topbar {
    position: relative;
    z-index: 5;
  }

  .menu-toggle {
    display: grid;
    margin-left: auto;
  }

  .nav-actions {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(280px, calc(100vw - 32px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(12, 38, 29, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-actions.is-open {
    display: flex;
  }

  .nav-actions a,
  .nav-actions button {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }

  .hero-content {
    padding: 28px 0 62px;
  }

  .hero-content .eyebrow {
    font-size: 0.72rem;
  }

  .hero-rules {
    display: none;
  }

  .topbar,
  .board-header,
  .board-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
  }

  .footer-inner {
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    align-items: center;
    gap: 8px 14px;
    text-align: center;
  }

  footer strong {
    grid-column: 1 / -1;
    justify-self: center;
  }

  footer a {
    justify-self: center;
  }

  .footer-rules {
    display: inline-flex;
    justify-self: center;
  }

  .footer-inner span {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    text-align: center;
  }

  .nav-actions,
  .filters {
    justify-content: flex-start;
  }

  .board-header h2 {
    white-space: normal;
  }

  .stats-strip,
  .layout,
  .rules-grid,
  .admin-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -36px;
  }

  .topics-section {
    margin-top: 16px;
    margin-bottom: 18px;
  }

  .topics-section .topics-collapse {
    box-shadow: 0 10px 30px rgba(29, 48, 41, 0.06);
  }

  .stats-strip article {
    padding: 10px 6px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    text-align: center;
  }

  .stats-strip article:last-child {
    border-right: 0;
  }

  .stats-strip strong {
    font-size: 1.25rem;
  }

  .stats-strip span {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .submission-panel {
    position: static;
    padding: 0;
    overflow: hidden;
  }

  .mobile-collapse {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
  }

  .mobile-collapse > summary {
    min-height: 40px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: var(--green-dark);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
  }

  .mobile-collapse > summary::after {
    content: "";
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: var(--green);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M12 8v8'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M12 8v8'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .mobile-collapse[open] > summary::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
  }

  .filters-collapse,
  .search-collapse {
    box-shadow: 0 10px 30px rgba(29, 48, 41, 0.06);
  }

  .filters-collapse .filters,
  .search-collapse .board-tools,
  .topics-collapse .topic-grid,
  .submission-inner {
    padding: 10px;
    border-top: 1px solid var(--line);
  }

  .submission-inner h2,
  .submission-inner .eyebrow {
    display: none;
  }

  .board-tools,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .board-tools {
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .board-header {
    margin-bottom: 8px;
  }

  .board-header h2 {
    white-space: normal;
    font-size: 1.16rem;
  }

  .board-header .eyebrow {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .layout {
    gap: 8px;
  }

  .board {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  #meldungen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  #meldungen > .board-header,
  #meldungen > .layout,
  #meldungen .board {
    display: contents;
  }

  #meldungen > .board-header > div,
  #meldungen .cards {
    grid-column: 1 / -1;
  }

  #meldungen .cards {
    margin-top: 18px;
  }

  #meldungen .filters-collapse,
  #meldungen .form-collapse,
  #meldungen .search-collapse {
    width: 100%;
  }

  #meldungen .mobile-collapse[open] {
    grid-column: 1 / -1;
  }

  .filters-collapse,
  .search-collapse,
  .form-collapse {
    border-radius: 8px;
  }

  .filters {
    gap: 7px;
  }

  .filter,
  .topic-grid button {
    width: 100%;
    justify-content: flex-start;
  }

  .cards {
    gap: 10px;
    margin-top: 0;
  }

  .card {
    padding: 10px;
  }

  .admin-row-head {
    display: none;
  }

  .rules-section {
    display: none;
  }

  .rules-modal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .rule-modal {
    width: min(100% - 18px, 620px);
  }

  .rule-modal .modal-shell {
    padding: 14px;
  }

  .rule-modal .modal-shell h2 {
    padding-right: 38px;
    font-size: 1.3rem;
    line-height: 1.14;
  }

  .rule-modal .rule-card {
    padding: 12px;
  }

  .rule-modal .rule-card h3 {
    margin-bottom: 5px;
    font-size: 1rem;
  }

  .rule-modal .rule-card p {
    font-size: 0.88rem;
    line-height: 1.35;
  }
}

@media (max-width: 560px) {
  .topbar,
  .hero-content,
  .workspace,
  .stats-strip {
    width: min(100% - 22px, 1160px);
  }

  .hero h1 {
    font-size: 1.39rem !important;
  }

  .modal {
    width: min(100% - 18px, 620px);
    max-height: calc(100dvh - 18px);
  }

  .modal-shell {
    max-height: calc(100dvh - 18px);
    padding: 16px;
  }

  .modal-shell h2 {
    padding-right: 38px;
    font-size: 1.55rem;
    line-height: 1.12;
  }

  .modal-hint {
    margin-right: 38px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) textarea {
    min-height: 82px;
  }

  .modal:not(.rule-modal):not(.photo-viewer):not(.admin-dialog) .modal-shell .eyebrow {
    margin-bottom: 6px;
    font-size: 0.7rem;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
  }

  .rule-modal .modal-shell {
    padding: 12px;
  }

  .rule-modal .modal-shell h2 {
    font-size: 1.18rem;
  }

  .rule-modal .rule-card {
    padding: 10px;
  }

  .rule-modal .rule-card p {
    font-size: 0.84rem;
  }

  .form-row,
  .card-top,
  .card-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .button,
  .filter,
  .nav-actions a,
  .nav-actions button {
    width: 100%;
  }

  .logout-form .button {
    width: auto;
  }

  .admin-actions {
    grid-template-columns: 1fr;
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .admin-dialog .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .admin-actions {
    grid-template-columns: 1fr;
  }
}
