[data-barae-community-navigation] :is([data-section-count], [data-portal-count]) {
  display: none !important;
}

[data-barae-community-navigation]:is(.page-solo, .page-friends) .portal-play > svg,
[data-barae-community-navigation] :is(.page-solo, .page-friends) .portal-play > svg {
  display: none;
}

.barae-app-segments {
  --segment-line: color-mix(in srgb, #322d2c 40%, transparent);
  display: grid;
  grid-template-columns: repeat(var(--segment-count, 2), minmax(0, 1fr));
  width: min(620px, calc(100% - 16px));
  margin: 6px auto 12px;
  border: 1px solid var(--segment-line);
  border-radius: 999px;
  overflow: hidden;
}

.barae-app-segments > :is(a, button) {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: #322d2c;
  font: 600 16px/1.12 system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.barae-app-segments > :is(a, button) + :is(a, button) { border-inline-start: 1px solid var(--segment-line); }
.barae-app-segments > a { min-height: 48px; }
.barae-app-segments > :is([aria-current="page"], [aria-pressed="true"]) { color: #fff; background: var(--pilot-accent); font-weight: 700; }
.barae-app-segments > :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }

.barae-communaute {
  --community-paper: #fffdf9;
  --community-wash: #f4eee3;
  --community-ink: #191a18;
  --community-selection: #fbe4eb;
  --community-selection-line: #d7a1b7;
  --community-header-height: 84px;
  max-width: 680px;
  padding-block: 26px 36px;
  color: var(--community-ink);
}
.barae-communaute [hidden], .barae-communaute-count[hidden] { display: none !important; }
.barae-communaute-heading { margin: 0 0 6px; color: var(--community-ink); }
.barae-communaute-navigation {
  position: sticky;
  z-index: 4;
  top: calc(var(--community-header-height) + env(safe-area-inset-top, 0px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  padding-block: 6px;
  background: var(--pilot-paper);
}
.barae-communaute-navigation button {
  padding-inline: 5px;
  font-size: clamp(12px, 3.65vw, 14px);
  text-align: center;
}
.barae-communaute-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.barae-communaute-action {
  min-height: 44px;
  padding: 8px 13px;
  border: 0;
  border-radius: 12px;
  background: var(--pilot-accent);
  color: #fff;
  font: 700 14px/1.35 PortalSans, system-ui, sans-serif;
  cursor: pointer;
}
.barae-communaute-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--pilot-line);
  border-radius: 12px;
  background: var(--community-paper);
  color: var(--community-ink);
  font: 700 14px/1.35 PortalSans, system-ui, sans-serif;
  cursor: pointer;
}
.barae-communaute-secondary svg { width: 17px; height: 17px; flex: none; }
.barae-communaute-navigation .barae-communaute-secondary[aria-current="page"] {
  border-color: var(--community-selection-line);
  background: var(--community-selection);
}
.barae-communaute-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  min-height: 18px;
  padding-inline: 3px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: var(--pilot-accent);
  color: #fff;
  font: 700 10px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.barae-communaute-tab-count { position: absolute; z-index: 1; inset: 3px auto auto calc(50% + 6px); pointer-events: none; }
.barae-communaute :is(button, summary, input, select, textarea):focus-visible { outline: 2px solid var(--pilot-accent); outline-offset: 2px; }
.barae-communaute-filters {
  --segment-count: 4;
  width: 100%;
  margin: 0 0 14px;
}
.barae-communaute-filters > button { padding-inline: 2px; font-size: clamp(11px, 3.55vw, 15px); }
.barae-communaute-filters > [aria-pressed="false"] { color: var(--community-ink); }
.barae-communaute .barae-communaute-filters > button:focus-visible { outline-offset: -4px; }
.barae-communaute :is(input, select, textarea) {
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--pilot-line);
  border-radius: 10px;
  color: var(--community-ink);
  background: #fff;
  font: 400 16px/1.4 PortalSans, system-ui, sans-serif;
}
.barae-communaute select { font-size: 14px; }
.barae-communaute .portal-pilot-empty { color: var(--community-ink); }
.barae-communaute-topics, .barae-communaute-replies, .barae-communaute-activity { display: grid; gap: 10px; }
.barae-communaute-card {
  --topic-tone: var(--pilot-accent);
  display: grid;
  gap: 9px;
  padding: 14px 16px;
  border: 1px solid var(--pilot-line);
  border-radius: 17px;
  background: var(--community-paper);
  box-shadow: 0 2px 6px #252b2c07;
}
.barae-communaute-card[data-kind="idea"] { --topic-tone: #386467; }
.barae-communaute-card[data-kind="issue"] { --topic-tone: #8a542e; }
.barae-communaute-card.is-pinned {
  border-color: color-mix(in srgb, var(--topic-tone) 30%, var(--pilot-line));
  background: color-mix(in srgb, var(--topic-tone) 4%, var(--community-paper));
}
.barae-communaute-card[data-open-card] { cursor: pointer; }
.barae-communaute-card[data-open-card]:hover { border-color: color-mix(in srgb, var(--topic-tone) 42%, var(--pilot-line)); }
.barae-communaute-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.barae-communaute-type, .barae-communaute-new, .barae-communaute-pin {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--topic-tone) 35%, var(--pilot-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--topic-tone) 7%, #fff);
  color: var(--community-ink);
  font: 700 12px/1.15 PortalSans, system-ui, sans-serif;
}
.barae-communaute-pin { margin-inline-start: auto; background: var(--community-paper); }
.barae-communaute-new { border-color: var(--pilot-line); background: #fff; }
.barae-communaute-topic-title { margin: 0; color: var(--community-ink); font: 700 22px/1.18 PortalSerif, Georgia, serif; overflow-wrap: anywhere; }
.barae-communaute-card.is-detail .barae-communaute-topic-title { font-size: clamp(24px, 6vw, 32px); }
.barae-communaute-topic-open {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.barae-communaute-topic-open:hover { color: var(--pilot-accent); }
.barae-communaute-meta { color: var(--community-ink); font: 400 12px/1.4 PortalSans, system-ui, sans-serif; }
.barae-communaute-meta:where(time) { font-variant-numeric: tabular-nums; }
.barae-communaute-author-line, .barae-communaute-author-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.barae-communaute-author-date { justify-content: flex-start; flex-wrap: wrap; gap: 2px 7px; }
.barae-communaute-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.barae-communaute-author-info { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.barae-communaute-author-name { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.barae-communaute-author-role {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--community-selection);
  color: var(--community-ink);
  font-size: 11px;
  line-height: 1.4;
}
.barae-communaute-avatar {
  display: block;
  flex: 0 0 auto;
  border: 1px solid var(--pilot-line);
  border-radius: 50%;
  background: var(--community-wash);
  object-fit: cover;
}
.barae-communaute-message { margin: 0; color: var(--community-ink); line-height: 1.48; white-space: pre-line; overflow-wrap: anywhere; }
.barae-communaute-card:not(.is-detail) .barae-communaute-message {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.barae-communaute-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
  padding-top: 7px;
  border-top: 1px solid var(--pilot-line);
}
.barae-communaute-reactions { display: flex; flex-wrap: wrap; gap: 5px; }
.barae-communaute-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 46px;
  min-height: 40px;
  padding: 4px 7px;
  border: 1px solid var(--pilot-line);
  border-radius: 999px;
  background: #fff;
  color: var(--community-ink);
  font: 600 13px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.barae-communaute-reaction span:first-child { font-size: 16px; }
.barae-communaute-reaction[aria-pressed="true"] { border-color: var(--pilot-accent); background: var(--community-selection); }
.barae-communaute-discuss {
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--community-ink);
  font: 700 14px/1.3 PortalSans, system-ui, sans-serif;
  cursor: pointer;
}
.barae-communaute-discuss:hover { color: var(--pilot-accent); }
.barae-communaute-subtitle { margin: 17px 0 8px; font: 700 21px/1.2 PortalSerif, Georgia, serif; }
.barae-communaute-replies:empty { display: none; }
.barae-communaute-reply {
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--pilot-line);
  border-radius: 15px;
  background: var(--community-paper);
}
.barae-communaute-reply:focus { outline: 2px solid var(--pilot-accent); outline-offset: 2px; }
.barae-communaute-notification {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pilot-line);
  border-radius: 14px;
  background: var(--community-paper);
  color: var(--community-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.barae-communaute-notification.is-unread {
  box-shadow: inset 3px 0 var(--pilot-accent);
  background: #fff8f9;
}
.barae-communaute-notification-copy { display: grid; gap: 2px; overflow-wrap: anywhere; }
.barae-communaute-moderation { position: relative; flex: none; }
.barae-communaute-moderation > summary {
  min-width: 44px;
  padding: 0;
  font: 700 23px/1 system-ui, sans-serif;
  list-style: none;
}
.barae-communaute-moderation > summary::-webkit-details-marker { display: none; }
.barae-communaute-moderation-menu {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 4px) 0 auto auto;
  display: grid;
  width: 142px;
  padding: 4px;
  border: 1px solid var(--pilot-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px #252b2c18;
}
.barae-communaute-moderation-menu button {
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--community-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.barae-communaute-moderation-menu button:hover { background: var(--community-wash); }
.barae-communaute-moderation-menu .barae-communaute-delete { color: #9c2c48; }
.barae-communaute-form { display: grid; gap: 12px; margin-top: 12px; }
.barae-communaute-form label { display: grid; gap: 4px; color: var(--community-ink); font-weight: 700; }
.barae-communaute-form textarea { width: 100%; resize: vertical; }
.barae-communaute-form > button { justify-self: start; }
.barae-communaute-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 9px; }
.barae-communaute-signature-fields { display: grid; gap: 12px; }
.barae-communaute-signature-fields [data-signature-preview] {
  padding: 10px 12px;
  border: 1px solid var(--pilot-line);
  border-radius: 12px;
  background: var(--community-wash);
}
.barae-communaute [data-topic-signature] { flex-wrap: wrap; }
.barae-communaute-reply-form {
  padding: 13px 15px;
  border: 1px solid var(--pilot-line);
  border-radius: 15px;
  background: var(--community-wash);
}
[data-reply-form] > button { justify-self: end; }
.barae-communaute-dialog {
  width: min(460px, calc(100% - 24px));
  padding: 15px 17px;
  border: 1px solid var(--pilot-line);
  border-radius: 16px;
  background: var(--community-paper);
  color: var(--community-ink);
}
.barae-communaute-dialog::backdrop { background: #252b2c66; }
.barae-communaute-dialog h2, .barae-communaute-dialog p { margin: 0; }
.barae-communaute-dialog .barae-communaute-actions { justify-content: flex-end; }
.barae-communaute-action.is-delete { background: #9c2c48; }

.barae-communaute-galerie { width: min(100%, 560px); min-width: 0; margin-inline: auto; }
.barae-communaute-captures {
  display: flex;
  width: 100%;
  height: clamp(155px, 42vw, 242px);
  overflow: auto hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border: 1px solid #d5def0;
  border-radius: 12px;
  background: #eef4ff;
}
.barae-communaute-captures::-webkit-scrollbar { display: none; }
.barae-communaute-captures:focus-visible { outline: 2px solid var(--pilot-accent); outline-offset: 3px; }
.barae-communaute-capture {
  position: relative;
  display: block;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  scroll-snap-align: start;
  background: transparent;
}
button.barae-communaute-capture { cursor: zoom-in; }
.barae-communaute-capture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 13%;
  user-select: none;
}
.barae-communaute-agrandir {
  position: absolute;
  inset: auto 8px 8px auto;
  padding: 4px 9px;
  border: 1px solid var(--pilot-line);
  border-radius: 999px;
  background: var(--community-paper);
  color: var(--community-ink);
  font: 700 12px/1.35 PortalSans, system-ui, sans-serif;
}
.barae-communaute-legende { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; }
.barae-communaute-legende p { margin: 0; font-size: 13px; line-height: 1.3; }
.barae-communaute-points { display: flex; flex: none; }
.barae-communaute-points button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.barae-communaute-points button::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: #c6b8bf; }
.barae-communaute-points button[aria-pressed="true"]::before { width: 16px; background: var(--pilot-accent); }
.barae-communaute-image-dialog { width: min(660px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.barae-communaute-image-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.barae-communaute-image-close {
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font: 400 28px/1 system-ui, sans-serif;
}
.barae-communaute-image-dialog .barae-communaute-captures { height: min(64dvh, 580px); }
.barae-communaute-image-dialog .barae-communaute-capture img { object-fit: contain; object-position: center; }

@media (pointer: coarse) {
  .barae-communaute-topic-open, .barae-communaute-reaction { min-height: 44px; }
}

@media (max-width: 600px) {
  .barae-communaute { --community-header-height: 66px; }
}

@media (max-width: 380px) {
  .barae-communaute-navigation svg { display: none; }
}

@media (max-width: 350px) {
  .barae-communaute-heading { font-size: 25px; }
  .barae-communaute-card { padding-inline: 12px; }
  .barae-communaute-image-header .barae-communaute-subtitle { font-size: 19px; }
}

.barae-communaute-avatar.is-initial {
  display: grid;
  place-items: center;
  font-weight: 700;
}
.barae-communaute-more { display: flex; margin: 14px auto 0; }
[data-community-error-text] { margin: 0 0 8px; }
[data-community-login] a { color: inherit; }
