.community-domain-body {
  min-width: 0;
  margin: 0;
  color: var(--comm-text);
  background:
    radial-gradient(circle at 85% 18%, rgba(22, 200, 239, .12), transparent 24%),
    linear-gradient(120deg, var(--comm-canvas-deep) 0%, var(--comm-canvas) 40%, var(--comm-canvas-mid) 70%, var(--comm-canvas-bright) 100%);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.community-domain-body *,
.community-domain-body *::before,
.community-domain-body *::after { box-sizing: border-box; }

.community-domain-body button,
.community-domain-body input,
.community-domain-body select,
.community-domain-body textarea { font: inherit; box-shadow: none; }
.community-domain-body button { appearance: none; }
.community-domain-body strong,
.community-domain-body b { font-weight: 500; }

.community-domain-body button,
.community-domain-body a { -webkit-tap-highlight-color: transparent; }

.community-domain-body button:focus-visible,
.community-domain-body a:focus-visible,
.community-domain-body input:focus-visible,
.community-domain-body select:focus-visible,
.community-domain-body textarea:focus-visible {
  outline: 2px solid var(--comm-cyan);
  outline-offset: 2px;
}

.community-domain-body .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.community-domain-body .comm-panel[hidden],
.community-domain-body [hidden] { display: none; }

.community-domain-body .comm-form-submit,
.community-domain-body .comm-home-publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--comm-radius-control);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
  transition: transform var(--comm-transition), background var(--comm-transition), border-color var(--comm-transition);
}

.community-domain-body .comm-form-submit:hover,
.community-domain-body .comm-home-publish:hover { transform: translateY(-1px); }

.community-domain-body h1,
.community-domain-body h2,
.community-domain-body h3,
.community-domain-body h4,
.community-domain-body p { overflow-wrap: anywhere; }

.community-domain-body .community-section-title,
.community-domain-body .community-people-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 102px; margin-bottom: 18px; padding: 18px 0 14px; border-bottom: 1px solid var(--comm-divider-horizontal); }
.community-domain-body .community-section-title h1,
.community-domain-body .community-people-header h1 { margin: 0 0 4px; color: var(--comm-text); font-size: clamp(27px, 2.4vw, 36px); line-height: 1.05; letter-spacing: -.025em; }
.community-domain-body .community-section-title p,
.community-domain-body .community-people-header p { margin: 0; color: #d6e5fa; font-size: 12px; line-height: 1.45; }
.community-domain-body .community-buddy-filter input { width: 100%; min-height: 36px; padding: 0 10px; color: var(--comm-text); background: var(--comm-interactive); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); }
.community-domain-body .community-discovery-settings { margin: 18px 0 14px; padding: 14px; background: rgba(7,43,91,.48); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-panel); }
.community-domain-body .community-discovery-settings__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.community-domain-body .community-discovery-settings__head small { color: var(--comm-cyan); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.community-domain-body .community-discovery-settings__head h6 { margin: 2px 0 0; }
.community-domain-body .community-discovery-settings__head > i { color: #c4b5fd; font-size: 20px; }
.community-domain-body .community-discovery-interest-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-bottom: 12px; }
.community-domain-body .community-discovery-interest-grid label { cursor: pointer; }
.community-domain-body .community-discovery-interest-grid input { position: absolute; opacity: 0; }
.community-domain-body .community-discovery-interest-grid span { display: grid; min-height: 38px; place-items: center; padding: 6px; color: var(--comm-text-2); background: rgba(3,29,67,.7); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); font-size: 10px; font-weight: 750; text-align: center; }
.community-domain-body .community-discovery-interest-grid input:checked + span { color: #fff; border-color: var(--comm-purple); background: rgba(124,58,237,.3); }
.community-domain-body .community-buddy-fields { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--comm-divider-horizontal); }
.community-domain-body .community-buddy-fields[hidden] { display: none; }
.community-domain-body .community-buddy-fields > p { margin: 8px 0 0; color: var(--comm-text-2); font-size: 9px; }
.community-domain-body .comm-post-topic select { min-height: 34px; max-width: 190px; padding: 0 28px 0 9px; color: var(--comm-text-2); background: var(--comm-interactive); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); font-size: 9px; }
.community-domain-body .community-header-actions,
.community-domain-body .community-feed-tools { display: flex; align-items: center; gap: 10px; }

.community-domain-body .community-header-search,
.community-domain-body .comm-coach-workout-search { display: flex; align-items: center; gap: 9px; width: min(330px, 30vw); min-height: 40px; padding: 0 12px; color: var(--comm-cyan); background: rgba(2, 31, 73, .72); border: 1px solid var(--comm-border-strong); border-radius: var(--comm-radius-control); }
.community-domain-body .community-header-search input,
.community-domain-body .comm-coach-workout-search input { width: 100%; min-width: 0; padding: 0; color: var(--comm-text); background: transparent; border: 0; outline: 0; font-size: 12px; }

.community-domain-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.community-domain-body select,
.community-domain-body textarea { min-height: 42px; color: var(--comm-text); background-color: rgba(2, 31, 73, .82); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); }
.community-domain-body select { padding: 0 36px 0 12px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--comm-text-2) 50%), linear-gradient(135deg, var(--comm-text-2) 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.community-domain-body textarea { width: 100%; padding: 11px 12px; resize: vertical; }
.community-domain-body .community-header-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.community-domain-body .comm-coach-workout-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: 0; background: transparent; border: 0; border-radius: 0; }
.community-domain-body input::placeholder,
.community-domain-body textarea::placeholder { color: var(--comm-text-2); opacity: 1; }

.community-domain-body .comm-action-btn,
.community-domain-body .community-section-action,
.community-domain-body .comm-btn-more,
.community-domain-body .community-follow-btn,
.community-domain-body .comm-rsvp-btn,
.community-domain-body .community-event-detail-cta,
.community-domain-body .community-event-detail-share { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 13px; color: var(--comm-text); background: var(--comm-interactive); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform var(--comm-transition), border-color var(--comm-transition), background var(--comm-transition); }
.community-domain-body .comm-action-btn:hover,
.community-domain-body .community-section-action:hover,
.community-domain-body .comm-btn-more:hover,
.community-domain-body .community-follow-btn:hover { border-color: var(--comm-cyan); transform: translateY(-1px); }
.community-domain-body .community-section-action,
.community-domain-body .comm-form-submit,
.community-domain-body .comm-rsvp-btn,
.community-domain-body .community-event-detail-cta { color: #fff; background: linear-gradient(90deg, var(--comm-purple-deep), var(--comm-purple)); }
.community-domain-body button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.community-domain-body .comm-spinner,
.community-domain-body .comm-empty { display: grid; gap: 10px; min-height: 132px; place-content: center; padding: 28px; color: var(--comm-text-2); text-align: center; background: var(--comm-surface); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-panel); }
.community-domain-body .comm-spinner i,
.community-domain-body .comm-empty > i { color: var(--comm-cyan); font-size: 24px; }
.community-domain-body .comm-empty p { margin: 0; }
.community-domain-body .comm-empty > i { font-size: 32px; }
.community-domain-body .comm-empty h3 { margin: 0; color: var(--comm-text); font-size: 17px; line-height: 1.2; }
.community-domain-body .comm-empty p { max-width: 46ch; font-size: 14px; line-height: 1.45; }

.community-domain-body .form-section { min-width: 0; }
.community-domain-body .form-grid { display: grid; gap: 14px; }
.community-domain-body .form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.community-domain-body .form-row,
.community-domain-body .field { display: grid; gap: 6px; min-width: 0; }
.community-domain-body .field-label { color: var(--comm-text); font-size: 12px; font-weight: 500; }
.community-domain-body .field input:not([type="file"]),
.community-domain-body .field select,
.community-domain-body .field textarea { width: 100%; min-width: 0; padding-inline: 12px; }
.community-domain-body .field textarea { min-height: 104px; }
.community-domain-body .file-upload { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 13px; color: var(--comm-text); background: var(--comm-interactive); border: 1px dashed var(--comm-border-strong); border-radius: var(--comm-radius-control); font-size: 12px; font-weight: 500; cursor: pointer; }
.community-domain-body .file-upload input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.community-domain-body .form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.community-domain-body .community-event-form { width: min(100%, 760px); margin-inline: auto; }
.community-domain-body .community-event-author { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; padding: 9px 11px; color: var(--comm-text-2); background: var(--comm-surface); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); font-size: 10px; }
.community-domain-body .community-event-author > i { color: var(--comm-cyan); }
.community-domain-body .community-event-author span { display: flex; align-items: center; gap: 5px; min-width: 0; }
.community-domain-body .community-event-author small { color: var(--comm-text-2); font-size: 10px; }
.community-domain-body .community-event-author strong { overflow: hidden; color: var(--comm-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.community-domain-body .community-event-form-grid { grid-template-columns: minmax(0, 1.4fr) minmax(240px, .9fr); }
.community-domain-body .community-event-form-section { align-content: start; padding: 14px; background: var(--comm-surface); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-panel); }
.community-domain-body .community-event-form-section--main { grid-row: span 2; }
.community-domain-body .community-event-form-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--comm-cyan); font-size: 11px; font-weight: 500; letter-spacing: .045em; text-transform: uppercase; }
.community-domain-body .community-event-form-footer { justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--comm-border); }
.community-domain-body .community-event-form-footer > p { max-width: 52ch; margin: 0; color: var(--comm-text-2); font-size: 11px; line-height: 1.45; }
.community-domain-body .comm-form-hint { margin: 0; color: var(--comm-text-2); font-size: 10px; line-height: 1.4; }
.community-domain-body .comm-gps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 12px; color: var(--comm-text); background: var(--comm-interactive); border: 1px solid var(--comm-border); border-radius: var(--comm-radius-control); font-size: 11px; font-weight: 500; cursor: pointer; }

.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form { width: 100%; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-section { grid-row: auto; padding: 15px 0; background: transparent; border: 0; border-bottom: 1px solid var(--comm-border); border-radius: 0; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-footer { position: sticky; bottom: -16px; z-index: 2; margin: 0 -16px -16px; padding: 12px 16px; background: rgba(3, 24, 58, .98); }

/* Event creation keeps the shared Foundation controls, with a denser reading scale. */
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form { font-size: 12px; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-author { min-height: 38px; margin-bottom: 0; padding: 7px 10px; font-size: 10px; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-author small { font-size: 10px; font-weight: 400; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-author strong { font-size: 11px; font-weight: 500; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-section { padding: 12px 0; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-kicker { gap: 6px; margin-bottom: 9px; font-size: 10px; font-weight: 500; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .form-row,
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .field { gap: 4px; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .field-label { font-size: 11px; font-weight: 400; line-height: 1.35; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .comm-form-input,
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .comm-form-select { min-height: 38px; height: 38px; padding: 0 11px; font-size: 13px; font-weight: 400; line-height: 1.35; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .comm-form-textarea { min-height: 82px; padding: 9px 11px; font-size: 12px; font-weight: 400; line-height: 1.45; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] [name="note_admin"] { min-height: 92px; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-file { min-height: 38px; padding: 0 11px; font-size: 11px; font-weight: 400; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-footer { gap: 10px; padding: 10px 16px; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-footer > p { font-size: 10px; line-height: 1.35; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .community-event-form-actions > * { min-height: 36px; padding-inline: 11px; font-size: 11px; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] #commEvCancelBtn { font-weight: 400; }
.community-domain-body #commDetailDrawer[data-community-detail-kind="event-create"] .comm-form-submit { font-weight: 600; }
