/* Community reaction preferences reuse the shared sheet and motion controls. */
.community-reaction-tone {
  min-width: 0;
  margin: 8px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--soft);
}

.community-reaction-tone legend {
  padding: 0 6px;
  font-size: 1rem;
  font-weight: 800;
}

.community-reaction-tone p {
  margin: 0 0 12px;
  font-size: .9rem;
  line-height: 1.5;
}

.community-reaction-tone-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.community-reaction-tone-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 56px;
  margin: 0;
  padding: 4px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  cursor: pointer;
}

.community-reaction-tone-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.community-reaction-tone-choice span {
  font-size: 1.7rem;
  line-height: 1.2;
}

.community-reaction-tone-choice:has(input:checked) {
  border-color: #658d16;
  background: #effacb;
}

.community-reaction-tone-choice:has(input:checked)::after {
  content: "\2713";
  position: absolute;
  top: 1px;
  right: 3px;
  color: #345507;
  font-size: .7rem;
  font-weight: 900;
}

.community-reaction-tone-choice:focus-within {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.community-reaction-tone .community-reaction-tone-status {
  min-height: 2.7em;
  margin: 12px 0 0;
}

html[data-theme="dark"] .community-reaction-tone-choice:has(input:checked) {
  border-color: #b9e531;
  background: #25380e;
}

html[data-theme="dark"] .community-reaction-tone-choice:has(input:checked)::after {
  color: #d6f580;
}

@media (max-width: 420px) {
  .community-reaction-tone-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
