html.consent-open { overflow: hidden; }
.community-consent {
  width: min(960px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--line, #ddd); border-radius: 20px;
  color: var(--ink, #222); background: var(--surface, #fff);
  box-shadow: 0 24px 80px #0005;
}
.community-consent[open] { display: flex; flex-direction: column; }
.community-consent::backdrop { background: #0009; backdrop-filter: blur(4px); }
.community-consent__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line, #ddd); }
.community-consent__head h2 { margin: 0; font-size: 18px; }
.community-consent__language { flex: none; max-width: 48%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line, #ddd); border-radius: 10px; color: var(--ink, #222); background: var(--surface, #fff); font: inherit; font-size: 13px; }
.community-consent__read-hint { margin: 0; color: var(--muted, #666); font-size: 13px; }
.community-consent__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.terms-copy { line-height: 1.85; overflow-wrap: anywhere; }
.terms-copy h2 { margin: 0 0 20px; font-size: clamp(23px, 5vw, 32px); line-height: 1.3; }
.terms-copy h3 { margin: 26px 0 12px; font-size: 18px; }
.terms-copy p { margin: 0 0 14px; white-space: pre-wrap; }
.terms-copy .terms-bullet { margin-bottom: 4px; }
.terms-copy hr { border: 0; border-top: 1px solid var(--line, #ddd); margin: 28px 0; }
.community-consent__actions { flex: none; display: grid; gap: 12px; padding: 16px 24px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line, #ddd); }
.community-consent__check { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.community-consent__check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: #c8000d; }
.community-consent__buttons { display: flex; justify-content: flex-end; gap: 10px; }
.community-consent button, .terms-editor button { min-height: 44px; padding: 10px 18px; border: 1px solid var(--line, #ddd); border-radius: 12px; background: var(--surface, #fff); color: var(--ink, #222); font: inherit; cursor: pointer; }
.community-consent .terms-accept, .terms-editor button[type="submit"] { color: #fff; background: #c8000d; border-color: #c8000d; font-weight: 700; }
.community-consent button:disabled, .terms-editor button:disabled { opacity: .4; cursor: not-allowed; }
.terms-error { margin: 0; color: var(--danger, #c8000d); font-size: 13px; }
.terms-editor { display: grid; gap: 16px; padding: 20px; }
.terms-editor label { display: grid; gap: 8px; font-weight: 700; }
.terms-editor textarea { box-sizing: border-box; width: 100%; min-height: 45dvh; padding: 16px; resize: vertical; border: 1px solid var(--line, #ddd); border-radius: 12px; color: var(--ink, #222); background: var(--surface, #fff); font: inherit; line-height: 1.7; }
.terms-editor__preview { padding-top: 20px; }
@media (max-width: 600px) {
  .community-consent__head, .community-consent__body, .community-consent__actions { padding-left: 16px; padding-right: 16px; }
  .community-consent__check { font-size: 13px; }
  .community-consent__buttons button { flex: 1; }
}
