#community-menu {
  position: relative;
}

#community-menu-toggle {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0 !important;
  cursor: pointer;
  transform: none !important;
  transition: background-color .18s, box-shadow .18s, border-color .18s;
}

#community-menu-toggle svg {
  width: 24px !important;
  height: 24px !important;
  color: #a7dcff !important;
  transition: transform .18s ease;
}

#community-menu-toggle svg path {
  stroke-width: 2.5;
}

#community-menu-toggle[aria-expanded="true"] {
  background: #183e69 !important;
  border-color: #71bbff !important;
  box-shadow: 0 0 0 2px #458fdb2b !important;
}

#community-menu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

#community-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  min-width: max-content;
  padding: 6px;
  border: 1px solid #37618b;
  border-radius: 12px;
  background: #0d2340;
  box-shadow: 0 14px 35px #020b1b9c;
}

/* Keep the pointer inside the menu while it crosses the gap below the button. */
#community-dropdown::before {
  content: "";
  position: absolute;
  inset: -9px 0 auto;
  height: 9px;
}

#community-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  color: #eff7ff;
  font-weight: 700;
}

#community-dropdown a:hover,
#community-dropdown a:focus-visible {
  background: #17375d;
}

@media (prefers-reduced-motion: reduce) {
  #community-menu-toggle,
  #community-menu-toggle svg {
    transition: none;
  }
}

#community-dropdown[hidden], #page-wunschliste [hidden], #rp-quiz[hidden], #rp-quiz [hidden] {
  display: none !important;
}

#page-wunschliste, #rp-quiz {
  color: #edf6ff;
}

#page-wunschliste {
  background: #08182e;
}

.community-content {
  padding-block: clamp(28px, 6vw, 70px);
}

.community-panel, .community-idea {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid #294c72;
  border-radius: 16px;
  background: #0f2643;
}

.community-panel h2, .community-idea h3, .community-heading h2 {
  margin: 0 0 12px;
  color: #f5faff;
}

#community-form {
  display: grid;
  gap: 9px;
}

#community-form input, #community-form textarea, .community-idea select {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #426688;
  border-radius: 8px;
  background: #0a1b31;
  color: #f1f8ff;
  font: inherit;
}

#community-form textarea {
  resize: vertical;
}

.community-button, .rp-quiz-choice {
  width: fit-content;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #63a6e5;
  border-radius: 8px;
  background: #175a9c;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.community-button {
  display: inline-flex;
  align-items: center;
}

.community-secondary, .rp-quiz-choice {
  border-color: #45698c;
  background: #142f50;
}

.community-button:hover, .rp-quiz-choice:hover {
  background: #235381;
  color: #fff;
}

.community-button:disabled {
  opacity: .65;
  cursor: wait;
}

.community-button:focus-visible, .rp-quiz-choice:focus-visible, #community-menu :focus-visible {
  outline: 2px solid #9bd4ff;
  outline-offset: 3px;
}

.community-heading, .community-idea-heading, .community-idea-actions, .community-moderation, .rp-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.community-delete {
  border-color: #9a6671;
  background: #462734;
  color: #ffe8ed;
}

.community-delete:hover {
  background: #693747;
}

.community-heading {
  justify-content: space-between;
  margin-top: 30px;
}

.community-heading h2, .community-idea-heading h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.community-status {
  padding: 3px 9px;
  border-radius: 6px;
  background: #204568;
  color: #e1f1ff;
  font-size: .8rem;
}

.community-ideas, .rp-quiz-options {
  display: grid;
  gap: 12px;
}

.community-note, .community-message {
  margin: 8px 0;
  color: #b9d1e8;
}

#community-form-message:empty {
  display: none;
}

.community-description {
  margin: 12px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#community-more {
  margin-top: 16px;
}

#rp-quiz {
  margin-top: 26px;
}

.rp-quiz-choice {
  width: 100%;
  text-align: left;
}

.rp-quiz-choice[aria-disabled="true"] {
  cursor: default;
}

.rp-quiz-choice.rp-correct {
  background: #1b493d;
  border-color: #68c5a1;
}

.rp-quiz-choice.rp-incorrect {
  background: #542b3b;
  border-color: #e798a4;
}

.rp-quiz-feedback:not(:empty) {
  margin: 14px 0;
  color: #e3effc;
}

.rp-quiz-actions:not(:has(button:not([hidden]))) {
  display: none;
}

@media (max-width: 480px) {
  #community-menu-toggle {
    width: 44px;
    height: 44px;
  }
  #community-dropdown {
    right: auto;
    left: 0;
  }
}
