/* Feed, post detail, and editor styles. Shared navigation lives in community_sections.css. */
.community-page {
  --community-accent: var(--color-primary, #ff0000);
  --community-ink: #202127;
  --community-muted: #777982;
  --community-line: #e8e8ec;
  --community-surface: #f6f6f8;
  color: var(--community-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100dvh;
  width: 100%;
  box-sizing: border-box;
  background: var(--community-surface);
}
.community-page *, .community-page *::before, .community-page *::after { box-sizing: border-box; }
.community-page [hidden] { display: none !important; }
.community-page a { color: inherit; text-decoration: none; }
.community-page button, .community-page input, .community-page textarea, .community-page select { font: inherit; }
.community-page button { cursor: pointer; }
.community-page button:disabled { cursor: default; opacity: .55; }
.community-page button[aria-busy="true"] { cursor: wait; }
.community-page :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--community-accent); outline-offset: 3px; }
.community-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.community-icon { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.community-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #70727b; flex: 0 0 auto; }
.community-icon-button:hover { background: #f1f1f4; color: var(--community-ink); }
body[data-hotwire-native="true"] .community-page [data-action~="community#openMenu"] { -webkit-tap-highlight-color: transparent; }
body[data-hotwire-native="true"] .community-page [data-action~="community#openMenu"]:is(:focus, :focus-visible, :active) { outline: none; box-shadow: none; }
.community-primary-button, .community-secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 650; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.community-page .community-primary-button { color: #fff; background: var(--community-accent); }
.community-primary-button:hover { filter: brightness(.94); }
.community-secondary-button { background: #fff; border-color: #dddde3; color: var(--community-ink); }
.community-secondary-button:hover { background: #f3f3f6; }
.community-text-link, .community-text-button { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.community-page .community-text-link { color: var(--community-accent); }
.community-text-link .community-icon { width: 16px; height: 16px; }
.community-feed, .community-detail { padding: 100px 0 110px; }
.community-feed-content { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 24px; align-items: start; }
.community-feed-column { min-width: 0; }
.community-feed-controls { display: flex; align-items: center; min-height: 44px; padding: 0 2px 12px; }
html[data-native-community-feed-filter="true"] body[data-hotwire-native="true"] .community-feed-controls { display: none; }
@media (max-width: 767px) {
  html[data-community-web-header-filter="true"] body:not([data-hotwire-native="true"]) .community-feed-controls { display: none; }
}
.community-sort { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; color: #83838d; font-size: 12px; }
/* Reserve the same space before fonts and the enhanced select are ready. */
.community-sort > label { flex: 0 0 4em; white-space: nowrap; }
.community-sort__control { position: relative; display: inline-flex; align-items: center; flex: 0 0 84px; width: 84px; }
.community-page .community-sort__select:not([aria-hidden="true"]), .community-page .community-sort__trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: #484852; font-size: 12px; font-weight: 600; line-height: 20px; cursor: pointer; }
.community-page .community-sort__trigger { width: 100%; justify-content: space-between; text-align: left; white-space: nowrap; }
.community-page .community-sort:not(.community-sort--native) .community-sort__select:not([aria-hidden="true"]) { flex: 0 0 84px; width: 84px; appearance: none; padding-right: 27px; text-align: left; text-align-last: left; text-indent: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5.5 7.75 4.5 4.5 4.5-4.5' stroke='%2381818c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 8px center; background-size: 13px 13px; background-repeat: no-repeat; }
/* A real select lets the app WebView present its platform's option picker. */
.community-page .community-sort--native .community-sort__select { appearance: auto; min-height: 44px; padding-inline: 8px; }
.community-sort__trigger:hover, .community-sort__trigger[aria-expanded="true"] { background: #ebebf0; }
.community-sort__trigger [data-form-select-target="label"] { color: inherit; }
.community-page .community-sort :is(select, button):focus:not(:focus-visible) { outline: none; box-shadow: none; }
.community-page .community-sort :is(select, button):focus-visible { outline: 2px solid #90909c; outline-offset: 2px; }
.community-sort__arrow { flex: 0 0 13px; width: 13px; height: 13px; color: #81818c; transition: rotate 150ms ease; }
.community-sort__trigger[aria-expanded="true"] .community-sort__arrow { rotate: 180deg; }
.community-sort__menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; display: flex; flex-direction: column; width: 172px; padding: 5px; overflow: hidden; border: 1px solid #e8e8ee; border-radius: 12px; background: #fff; box-shadow: 0 8px 28px rgb(32 33 39 / 10%), 0 2px 6px rgb(32 33 39 / 4%); }
.community-sort__options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.community-page .community-sort__options [role="option"] { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: #62626d; text-align: left; font-size: 13px; font-weight: 500; line-height: 20px; }
.community-sort__options [role="option"] + [role="option"] { margin-top: 2px; }
.community-page .community-sort__options [role="option"]:hover { background: #f5f5f8; color: #303039; }
.community-page .community-sort__options [aria-selected="true"], .community-page .community-sort__options [aria-selected="true"]:hover { background: #fff2f2; color: #34343d !important; font-weight: 600; }
.community-page .community-sort__options [role="option"]:focus-visible { outline-offset: -3px; }
.community-sort [data-form-select-check] { width: 16px; height: 16px; margin-left: auto; background: transparent !important; color: var(--community-accent); font-size: 14px; }
.community-filter-context { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 14px; color: var(--community-muted); }
.community-filter-context a { text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.community-profile .community-feed-column { background: #fff; border: 1px solid var(--community-line); border-radius: 16px; }
.community-profile-back { display: flex; align-items: center; gap: 7px; min-height: 52px; padding: 10px 24px; color: var(--community-muted) !important; font-weight: 550; }
.community-profile-back .community-icon { width: 18px; height: 18px; }
.community-profile-header { overflow: hidden; border-radius: 0; }
.community-profile-cover { position: relative; height: 154px; overflow: hidden; background: radial-gradient(ellipse at 85% 15%, #fff6ef 0%, transparent 58%), linear-gradient(115deg, #eedee6, #f4e7eb 52%, #e8e8f5); }
.community-profile-cover::before, .community-profile-cover::after { content: ""; position: absolute; width: 330px; height: 330px; border: 1px solid #ffffff8c; border-radius: 50%; transform: rotate(-25deg) scaleX(1.5); right: -45px; top: -135px; }
.community-profile-cover::after { width: 225px; height: 225px; top: -55px; right: 110px; }
.community-profile-info { position: relative; padding: 0 28px 25px; }
.community-profile-avatar { display: inline-flex; margin-top: -46px; margin-bottom: 12px; padding: 5px; background: #fff; border-radius: 50%; }
.community-profile-avatar .community-avatar { height: 88px; width: 88px; font-size: 26px; }
.community-profile-avatar .community-icon { width: 36px; height: 36px; }
.community-profile-info h1 { margin: 0 0 9px; font-size: 26px; line-height: 1.3; font-weight: 750; letter-spacing: -.025em; overflow-wrap: anywhere; }
.community-profile-school { display: flex; align-items: center; gap: 7px; margin: 0; color: #646671; font-size: 14px; overflow-wrap: anywhere; }
.community-profile-school .community-icon { width: 18px; height: 18px; color: #96939e; }
.community-profile-education { margin: 5px 0 0; color: var(--community-muted); font-size: 13px; overflow-wrap: anywhere; }
.community-profile-stats { margin: 16px 0 0; color: var(--community-muted); font-size: 13px; }
.community-profile-stats strong { margin-right: 3px; color: var(--community-ink); font-weight: 650; }
.community-profile-posts-heading { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 24px; border-block: 1px solid var(--community-line); }
.community-profile-posts-heading h2 { position: relative; display: flex; align-items: center; align-self: stretch; margin: 0; padding-inline: 4px; font-size: 14px; font-weight: 650; }
.community-profile-posts-heading h2::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--community-accent); }
.community-profile-posts-heading .community-feed-controls { min-height: 0; padding: 0; }
.community-profile .community-post { margin-bottom: 0; border-width: 0 0 1px; border-radius: 0; }
.community-profile .community-empty { border: 0; }
@media (max-width: 1023px) {
  .community-profile .community-left-rail { display: none; }
}
@media (max-width: 767px) {
  .community-page.community-profile { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .community-profile .community-feed-column { border: 0; border-radius: 0; }
  .community-profile-back { display: none; }
  .community-profile-cover { height: 124px; }
  .community-profile-info { padding: 0 20px 23px; }
  .community-profile-avatar { margin-top: -40px; margin-bottom: 10px; padding: 4px; }
  .community-profile-avatar .community-avatar { width: 76px; height: 76px; font-size: 23px; }
  .community-profile-info h1 { font-size: 24px; }
  .community-profile-posts-heading { min-height: 54px; padding-inline: 20px; }
}
.community-create-card { display: flex; align-items: center; gap: 13px; min-height: 88px; background: #fff; border: 1px solid var(--community-line); border-radius: 14px; margin-bottom: 16px; padding: 20px 22px; }
.community-create-card > span:nth-child(2) { color: #9798a0; font-size: 15px; flex: 1; }
.community-create-card__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; background: #fff0f0; display: inline-flex; align-items: center; justify-content: center; color: var(--community-accent); }
.community-create-card__icon .community-icon { width: 23px; height: 23px; stroke-width: 2.2; }
.community-avatar { height: 42px; width: 42px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; display: inline-flex; justify-content: center; align-items: center; background: #ebeaf0; color: #6c667f; font-size: 13px; font-weight: 650; }
/* A picture shows whole, at its own proportions, on white within its frame. */
.community-avatar img { display: block; height: 100%; width: 100%; object-fit: contain; }
.community-avatar:has(> img) { border: 1px solid #ebeaf0; background: #fff; box-sizing: border-box; }
.community-avatar--small { width: 32px; height: 32px; font-size: 11px; }
.community-avatar--club { border-radius: 11px; background: #f1f1f4; }
.community-avatar--katchup { border-radius: 11px; }
.community-avatar-link { display: flex; flex-shrink: 0; }
.community-post { padding: 22px 24px 13px; margin-bottom: 16px; background: #fff; border: 1px solid var(--community-line); border-radius: 14px; }
.community-post[data-action] { cursor: pointer; }
.community-post__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.community-post__header > .community-icon-button { margin-right: -12px; margin-top: -5px; align-self: flex-start; }
.community-author { display: flex; align-items: center; gap: 11px; min-width: 0; }
.community-author__text { min-width: 0; }
.community-author__name-row { display: flex; align-items: center; gap: 7px; }
.community-author__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.4; font-weight: 700; }
.community-author__name:hover { text-decoration: underline; }
.community-page .community-author__timestamp { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; color: #92939c; font-size: 12px; font-weight: 400; }
.community-author__meta { display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; margin-top: 3px; color: #92939c; font-size: 12px; }
.community-author__meta > span:first-child { overflow: hidden; text-overflow: ellipsis; max-width: 300px; white-space: nowrap; }
.community-author__major { min-width: 0; overflow-wrap: anywhere; }
.community-club-label, .community-author-badge { font-size: 11px; font-weight: 600; padding: 2px 5px; border-radius: 4px; background: #f1eff5; color: #716580; white-space: nowrap; }
.community-post__body { font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: #373941; }
.community-post__body a, .community-comment__body a { color: #5665a7; text-decoration: underline; text-underline-offset: 2px; }
.community-post__body--preview:not(.is-expanded) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.community-post__body--preview.is-expanded { display: block; }
.community-expand { padding: 6px 0; min-height: 44px; background: none; border: 0; color: #8b8c95; font-size: 13px; font-weight: 550; }
.community-images { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 18px; border-radius: 11px; overflow: hidden; }
.community-image-button { position: relative; display: block; width: 100%; min-width: 0; min-height: 0; border: 0; padding: 0; overflow: hidden; background: #f0f0f3; aspect-ratio: 4/3; }
.community-image-button img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.community-images--1 { grid-template-columns: 1fr; }
.community-images--1 .community-image-button { aspect-ratio: 16/10; max-height: 440px; }
.community-images--3 .community-image-button:first-child { grid-row: span 2; aspect-ratio: auto; }
.community-images--3 .community-image-button:not(:first-child) { aspect-ratio: 16/9; }
.community-post-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 1px; }
.community-count-pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 64px; min-height: 44px; border: 0; border-radius: 999px; padding: 7px 12px; background: #f5f5f7; color: #676974 !important; font-size: 12px; font-weight: 550; }
.community-count-pill .community-icon { width: 17px; height: 17px; }
.community-count-pill:hover { background: #eeeeF2; }
.community-count-pill.is-liked { background: #fff0f0; color: var(--community-accent) !important; }
.community-count-pill.is-liked .community-icon { fill: currentColor; }
.community-view-count, .community-view-count:hover { background: #f5f5f7; cursor: default; }
.community-view-count .community-icon { width: 14px; height: 14px; }
.community-share-button { margin-left: auto; }
.community-event { display: flex; align-items: center; gap: 13px; margin-top: 18px; padding: 15px; border: 1px solid var(--community-line); border-radius: 11px; background: #fafafb; }
.community-event__icon { display: inline-flex; justify-content: center; align-items: center; height: 42px; width: 42px; border-radius: 11px; color: #767080; background: #edebf2; flex: 0 0 auto; }
.community-event__text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.community-event__text strong { font-size: 14px; }
.community-event__text > span:last-child { color: var(--community-muted); font-size: 11px; }
.community-eyebrow { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #8e8998; font-weight: 650; }
.community-feed-footer { min-height: 56px; text-align: center; padding: 18px 0 24px; }
.community-feed-status { margin: 0; padding: 8px 0; color: #91919b; font-size: 12px; line-height: 20px; }
.community-feed-skeleton { display: none; }
.community-feed-footer[aria-busy="true"] { padding-top: 0; }
.community-feed-footer[aria-busy="true"] .community-feed-skeleton { display: grid; gap: 16px; margin-bottom: 8px; }
.community-skeleton-card { padding: 22px 24px 13px; border: 1px solid var(--community-line); border-radius: 14px; background: #fff; }
.community-skeleton-card__header { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.community-skeleton-shape { position: relative; display: block; overflow: hidden; height: 13px; border-radius: 5px; background: #eeeef2; }
.community-skeleton-shape::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #ffffffb3, transparent); transform: translateX(-100%); animation: community-feed-shimmer 1.6s ease-in-out infinite; }
.community-skeleton-card__avatar { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; }
.community-skeleton-card__author { display: grid; gap: 8px; width: min(52%, 190px); }
.community-skeleton-card__name { width: 72%; }
.community-skeleton-card__meta { height: 10px; }
.community-skeleton-card__body { display: grid; gap: 10px; }
.community-skeleton-card__body > :nth-child(2) { width: 92%; }
.community-skeleton-card__body > :last-child { width: 64%; }
.community-skeleton-card:nth-child(even) .community-skeleton-card__body > :last-child { width: 76%; }
.community-skeleton-card__actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.community-skeleton-card__pill { width: 60px; height: 36px; border-radius: 999px; }
.community-skeleton-card__share { width: 24px; height: 24px; margin-left: auto; }
@keyframes community-feed-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .community-skeleton-shape::after { animation: none; display: none; } }
.community-end-note { color: #a1a1a9; font-size: 12px; }
/* The column runs the feed's full height, so Most Read can stay in view level
   with the section links while the cards above it scroll away. */
.community-right-column { min-width: 0; align-self: stretch; }
.community-most-read { position: sticky; top: 100px; padding: 21px 22px 12px; margin-top: 18px; border: 1px solid var(--community-line); border-radius: 14px; background: #fff; }
.community-most-read h2 { margin: 0 0 8px; color: #91939b; font-size: 11px; font-weight: 650; line-height: 1.5; letter-spacing: .02em; }
.community-most-read__list { list-style: none; margin: 0; padding: 0; }
.community-most-read__list > li + li { border-top: 1px solid #ededf1; }
.community-most-read__link { display: block; min-width: 0; padding: 9px 0; }
.community-most-read__link:hover .community-most-read__title { text-decoration: underline; text-underline-offset: 3px; }
.community-most-read__meta { display: flex; align-items: center; gap: 7px; min-width: 0; color: #9597a0; font-size: 11px; line-height: 1.5; }
.community-most-read__school { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #62646d; }
.community-most-read__meta time { flex: 0 0 auto; }
.community-most-read__views { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-left: auto; font-variant-numeric: tabular-nums; }
.community-most-read .community-view-count { background: transparent; cursor: inherit; }
.community-most-read__views .community-icon { width: 13px; height: 13px; }
.community-most-read__title { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; line-height: 1.5; }
.community-most-read__empty { margin: 14px 0 10px; color: var(--community-muted); font-size: 12px; }
.community-most-read:has([data-community-most-read-post]:not([hidden])) .community-most-read__empty { display: none; }
.community-rail-card { background: #eeedf3; border: 1px solid #e7e5ed; padding: 23px; border-radius: 14px; margin-bottom: 18px; }
.community-rail-card h2 { margin: 14px 0 11px; font-size: 21px; line-height: 1.4; letter-spacing: -.025em; font-weight: 700; }
.community-rail-card p { margin: 0 0 12px; color: #817d8c; line-height: 1.7; font-size: 12px; }
.community-rail-card .community-text-link { font-size: 12px; }
.community-rail-note { padding: 0 8px; font-size: 11px; color: #a1a0aa; line-height: 1.7; }
.community-empty { padding: 55px 24px; background: white; border: 1px solid var(--community-line); border-radius: 14px; text-align: center; }
.community-empty__icon { display: inline-flex; align-items: center; justify-content: center; height: 62px; width: 62px; border-radius: 50%; background: #f4f3f7; color: #9893a4; margin-bottom: 17px; }
.community-empty__icon .community-icon { height: 27px; width: 27px; }
.community-empty h1, .community-empty h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.community-empty p { max-width: 300px; margin: 0 auto 23px; color: var(--community-muted); line-height: 1.7; }
.community-inline-error { margin: 12px 0 0; border-radius: 8px; background: #fff2f1; color: #ad3333; padding: 10px 12px; font-size: 12px; }
.community-editor { padding: 0 20px; }
.community-detail-header { background: #fff; border-bottom: 1px solid var(--community-line); border-radius: 14px 14px 0 0; }
/* New app builds own Post and its options in the native navigation bar. */
html[data-native-community-post-nav="true"] body[data-hotwire-native="true"] .community-detail .community-detail-header { display: none; }
.community-editor .community-detail-header { position: fixed; inset: 0 0 auto; padding-top: env(safe-area-inset-top, 0px); z-index: 75; border-radius: 0; background: rgba(255,255,255,.97); }
.community-detail-header__inner { position: relative; max-width: 740px; margin: 0 auto; height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 22px; }
.community-detail .community-detail-header__inner { max-width: none; }
.community-detail-header h1 { font-size: 17px; font-weight: 700; margin: 0; position: absolute; left: 50%; transform: translateX(-50%); }
.community-back-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: -11px; padding: 0 9px; color: #72747c !important; font-size: 12px; }
.community-detail-column { min-width: 0; background: #fff; min-height: calc(100dvh - 210px); border: 1px solid var(--community-line); border-radius: 14px; }
.community-post--detail { border: 0; border-radius: 0; padding: 30px 30px 15px; margin: 0; }
.community-post--detail .community-post__body { font-size: 16px; line-height: 1.8; }
.community-post--detail .community-post__header { margin-bottom: 24px; }
.community-post--detail .community-post-actions { margin-top: 23px; padding-bottom: 5px; }
.community-comments-section { border-top: 1px solid var(--community-line); margin-top: 9px; padding: 23px 30px calc(var(--community-composer-height, 100px) + var(--community-keyboard-offset, 0px) + 24px); min-height: calc(100dvh - 185px - var(--community-composer-height, 100px)); scroll-margin-top: 100px; }
.community-comments-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 23px; }
.community-comments-heading h2 { margin: 0; font-size: 16px; font-weight: 700; }
.community-comments-heading h2 span { margin-left: 5px; color: #9a97a3; font-size: 14px; font-weight: 550; }
.community-comments-heading > span { color: #a4a2ac; font-size: 11px; }
.community-comment { margin-bottom: 28px; }
.community-comment__row { display: flex; align-items: flex-start; gap: 4px; }
.community-comment__row > :is(.community-avatar, .community-avatar-link) { margin-top: 4px; }
.community-comment__content { min-width: 0; flex: 1; }
.community-comment__bubble { padding: 14px 12px 12px; border-radius: 14px; background: #f6f6f8; }
.community-comment__header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.community-comment__author { display: flex; align-items: baseline; flex-wrap: wrap; flex: 1; min-width: 0; gap: 3px 6px; color: #66686f; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.community-comment__author--anonymous { font-size: 13px; }
.community-comment__timestamp { flex-shrink: 0; color: #92939c; font-size: 12px; font-weight: 400; white-space: nowrap; }
.community-comment__education { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 5px; min-width: 0; max-width: 100%; color: #92939c; font-size: 12px; font-weight: 400; }
.community-comment__author--anonymous .community-comment__education { color: #70727b; font-size: inherit; font-weight: 600; }
.community-comment__school, .community-comment__major, .community-comment__degree { min-width: 0; overflow-wrap: anywhere; }
.community-comment__body { font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-comment__deleted { font-size: 13px; color: #92929b; font-style: italic; margin: 0; }
.community-comment__meta { display: flex; align-items: center; gap: 12px; min-height: 32px; margin-top: 8px; font-size: 12px; }
.community-comment__meta .community-comment-like { min-width: 58px; min-height: 32px; gap: 5px; padding: 6px 12px; font-size: 12px; line-height: 20px; }
.community-comment-like .community-icon { width: 13px; height: 13px; }
.community-comment__meta .community-comment-reply { display: inline-flex; align-items: center; gap: 12px; min-height: 32px; border: 0; padding: 0 4px 0 0; background: none; font-size: 13px; font-weight: 600; color: #60616b; }
/* Keep a 44px tap area around the compact comment actions. */
.community-comment__meta :is(.community-comment-like, .community-comment-reply) { position: relative; }
.community-comment__meta :is(.community-comment-like, .community-comment-reply)::after { content: ""; position: absolute; inset: -6px 0; }
.community-comment-reply::before { content: ""; height: 18px; border-left: 1px solid #dddde3; }
.community-comment__more { margin: -12px -10px -12px 0; }
.community-comment__more .community-icon { width: 16px; height: 16px; }
.community-comment__replies { display: grid; gap: 16px; margin-left: 52px; }
.community-comment__replies:has(> .community-comment) { border-left: 2px solid #efedf3; padding-left: 12px; }
.community-comment__replies > .community-comment:first-child { margin-top: 32px; }
.community-comment--reply { margin-bottom: 0; }
.community-comment--reply .community-avatar { height: 24px; width: 24px; font-size: 9px; }
.community-page .community-thread-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 4px 0 0 52px; color: #6f647f; font-size: 13px; font-weight: 600; }
.community-thread-link .community-icon { height: 14px; width: 14px; }
.community-replies-layout { width: 100%; max-width: 740px; margin: 0 auto; }
.community-replies .community-left-rail { display: none; }
.community-thread-root { padding: 24px; background: #f8f7fa; border-bottom: 6px solid #efedf3; }
.community-thread-root > .community-comment { margin: 0; }
.community-thread-replies { padding: 0 24px calc(var(--community-composer-height, 100px) + var(--community-keyboard-offset, 0px) + 24px); min-height: 45dvh; }
.community-thread-list > .community-comment { padding: 24px 0; border-bottom: 1px solid var(--community-line); }
.community-replies .community-comment__bubble { background: transparent; padding: 0; }
.community-replies .community-comment__more { margin: -10px -8px -10px 0; }
.community-thread-unavailable { padding: 8px 0; margin: 0; color: var(--community-muted); text-align: center; font-size: 13px; }
/* Native comments use the full row; a small inset still connects inline replies. */
body[data-hotwire-native="true"] .community-comments-section { padding-top: 16px; padding-left: 16px; padding-right: 16px; }
body[data-hotwire-native="true"] .community-comments-heading { margin-bottom: 16px; }
body[data-hotwire-native="true"] .community-comments-list > .community-comment { margin-bottom: 20px; }
body[data-hotwire-native="true"] .community-comment__content { padding: 12px; border-radius: 14px; background: #f6f6f8; }
body[data-hotwire-native="true"] .community-comment__bubble { padding: 0; background: transparent; }
body[data-hotwire-native="true"] .community-replies .community-comment__content { padding: 0; border-radius: 0; background: transparent; }
body[data-hotwire-native="true"] .community-comment__meta { margin-top: 6px; }
body[data-hotwire-native="true"] .community-comment__replies { gap: 12px; margin-left: 12px; }
body[data-hotwire-native="true"] .community-comment__replies > .community-comment:first-child { margin-top: 16px; }
body[data-hotwire-native="true"] .community-thread-link { margin-left: 26px; }
body[data-hotwire-native="true"] .community-thread-root { padding: 16px 16px 10px; background: #f3f4f6; border-bottom: 1px solid var(--community-line); }
body[data-hotwire-native="true"] .community-thread-replies { padding-left: 28px; padding-right: 16px; }
body[data-hotwire-native="true"] .community-thread-list > .community-comment { padding: 16px 0; }
body[data-hotwire-native="true"] .community-thread-list > .community-comment:first-child { padding-top: 10px; }
.community-comments-empty { padding: 30px 0; text-align: center; color: #a3a0aa; font-size: 13px; }
.community-comments-empty .community-icon { margin: 0 auto 14px; height: 27px; width: 27px; }
.community-load-comments { margin-top: 10px; width: 100%; }
.community-composer { position: sticky; bottom: var(--community-keyboard-offset, 0px); background: #fff; border-top: 1px solid var(--community-line); border-radius: 0 0 14px 14px; z-index: 30; }
.community-composer__inner { padding: 13px 22px; }
[data-community-reply-composer-for]:empty { display: none; }
.community-detail .community-composer.community-composer--inline { position: static; margin: 16px 0 0 52px; border: 1px solid var(--community-line); border-radius: 14px; z-index: auto; }
.community-composer--inline .community-composer__inner { padding: 10px 12px 12px; }
.community-composer--inline .community-reply-context { margin-bottom: 4px; color: var(--community-ink); font-weight: 600; }
.community-comment-emojis { display: flex; align-items: center; justify-content: space-between; overflow-x: auto; overscroll-behavior-x: contain; margin-bottom: 8px; padding: 4px 0; scrollbar-width: none; }
.community-comment-emojis::-webkit-scrollbar { display: none; }
.community-comment-emoji { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; -webkit-tap-highlight-color: transparent; }
.community-comment-emoji span { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 27px; line-height: 1; }
.community-comment-emoji:active:not(:disabled) { background: #efedf3; }
@media (hover: hover) { .community-comment-emoji:hover:not(:disabled) { background: #f4f3f7; } }
.community-comment-form { display: flex; gap: 10px; align-items: flex-end; }
.community-comment-identity-status { margin: 0 0 6px 54px; color: var(--community-muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.community-comment-identity-status strong { color: #62616c; font-weight: 600; }
/* An administrator's identity line also holds the school its anonymous
   comment appears from, as a small chip after the name that shortens a long
   name rather than taking the composer a second line. */
.community-comment-identity-row { display: flex; align-items: center; gap: 8px; margin: 0 0 6px 54px; min-width: 0; }
.community-comment-identity-row .community-comment-identity-status { flex: none; margin: 0; }
.community-comment-school { flex: 0 1 auto; min-width: 0; }
.community-comment-school .community-compose-school-trigger { min-height: 24px; max-width: min(240px, 100%); padding: 1px 7px; font-size: 12px; line-height: 18px; }
.community-comment-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; margin-bottom: 5px; padding: 0; border: 0; border-radius: 50%; background: transparent; -webkit-tap-highlight-color: transparent; }
.community-comment-avatar .community-avatar { width: 36px; height: 36px; }
.community-comment-identity-toggle__badge { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; background: #efedf3; color: #736c80; }
.community-comment-identity-toggle__badge svg { width: 11px; height: 11px; }
.community-comment-identity-toggle[aria-checked="true"] .community-comment-identity-toggle__badge { background: var(--community-accent); color: #fff; }
.community-comment-identity-toggle:active:not(:disabled) { background: #efedf3; }
@media (hover: hover) { .community-comment-identity-toggle:hover:not(:disabled) { background: #f4f3f7; } }
.community-comment-input { display: flex; align-items: flex-end; flex: 1; min-width: 0; gap: 4px; padding: 4px; border: 1px solid #e6e5eb; border-radius: 27px; background: #f9f9fb; }
.community-comment-input:focus-within { border-color: #bcb6c7; }
.community-comment-form textarea { display: block; flex: 1; width: 0; min-width: 0; height: 44px; min-height: 44px; max-height: 160px; box-sizing: border-box; overflow-y: hidden; padding: 10px 10px 10px 12px; border: 0; border-radius: 22px; resize: none; color: var(--community-ink); background: transparent; line-height: 1.4; font-size: 16px; }
.community-page .community-comment-form textarea:focus-visible { outline: none; box-shadow: none; }
.community-comment-form textarea::placeholder { color: #a2a0aa; }
.community-page .community-send-button { position: relative; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; }
.community-send-button .community-icon { width: 24px; height: 24px; stroke-width: 2.5; }
.community-page .community-send-button:disabled:not([aria-busy="true"]) { background: #e6e4eb; color: #a19ba9; opacity: 1; }
.community-send-button[aria-busy="true"] .community-icon { visibility: hidden; }
.community-send-button[aria-busy="true"]::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: community-send-spin .7s linear infinite; }
@keyframes community-send-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .community-send-button[aria-busy="true"]::after { animation: none; } }
.community-reply-context { display: flex; align-items: center; justify-content: space-between; color: #817c8d; font-size: 12px; padding-left: 3px; }
.community-reply-context .community-icon { width: 16px; height: 16px; }
.community-comment-login { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--community-muted); font-size: 13px; }
.community-editor-column { max-width: 740px; margin: 0 auto; padding: calc(92px + env(safe-area-inset-top, 0px)) 0 50px; }
.community-editor-card { padding: 24px; background: #fff; border: 1px solid var(--community-line); border-radius: 14px; }
.community-editor-identity { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #f0eff4; }
.community-editor-identity > div { flex: 1; min-width: 0; }
.community-editor-identity label { display: block; color: #95909e; font-size: 11px; margin-bottom: 3px; }
.community-identity-select { max-width: 100%; padding: 0 22px 0 0; border: 0; color: var(--community-ink); background-color: transparent; font-weight: 600 !important; }
.community-editor-school { color: #96929e; font-size: 11px; max-width: 180px; text-align: right; }
.community-editor-body { display: block; resize: vertical; width: 100%; min-height: 300px; padding: 22px 0; border: 0; background: transparent; line-height: 1.8 !important; font-size: 16px !important; color: var(--community-ink); }
.community-editor-body::placeholder { color: #b0adb7; }
.community-editor-body:focus { outline: none; }
.community-editor-attachments { border-top: 1px solid #f0eff4; padding-top: 16px; }
.community-upload-label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 550; color: #736b80; }
.community-file-input { display: block; max-width: 100%; margin-top: 4px; color: #888290; font-size: 12px !important; }
.community-file-input::file-selector-button { margin-right: 10px; min-height: 40px; border: 1px solid #e5e1eb; border-radius: 8px; padding: 8px 12px; background: #f7f5f9; color: #746b80; cursor: pointer; }
.community-field-help { font-size: 11px; line-height: 1.6; color: #aaa5b0; margin: 10px 0 0; }
.community-existing-images { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.community-existing-image { display: block; width: 112px; background: #f6f4f9; border: 1px solid #e9e5ef; border-radius: 8px; overflow: hidden; }
.community-existing-image img { width: 100%; height: 100px; object-fit: cover; }
.community-existing-image span { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px; font-size: 11px; color: #8c7c92; }
.community-editor-event { padding: 20px 24px; background: #fff; border: 1px solid var(--community-line); border-radius: 14px; margin-top: 16px; }
.community-editor-event label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.community-editor-event label span { font-size: 11px; font-weight: 400; color: #a6a1ad; margin-left: auto; }
.community-select { display: block; width: 100%; min-height: 44px; border: 1px solid #e4e0e9; border-radius: 9px; padding: 10px 30px 10px 12px; background-color: #faf9fc; font-size: 13px !important; }
.community-editor-note { font-size: 11px; text-align: center; line-height: 1.7; margin: 22px 10px 0; color: #a9a5af; }
.community-unavailable { display: flex; align-items: center; justify-content: center; padding: 80px 20px; }
.community-unavailable .community-empty { width: 100%; max-width: 540px; }
.community-menu { position: fixed; inset: auto 0 0; width: 100%; max-width: none; box-sizing: border-box; padding: 0 15px calc(18px + env(safe-area-inset-bottom, 0px)); margin: 0; border: 1px solid #e7e3ec; border-bottom: 0; border-radius: 22px 22px 0 0; background: white; color: #29232d; box-shadow: 0 -8px 60px rgb(0 0 0 / 10%); }
.community-menu::backdrop { background: rgb(24 21 30 / 35%); }
.community-sheet-handle { width: 34px; height: 4px; border-radius: 8px; background: #ddd8e2; margin: 11px auto 4px; }
.community-menu__header { display: flex; align-items: center; justify-content: space-between; padding: 1px 0 9px 12px; }
.community-menu__header h2 { font-weight: 650; font-size: 15px; margin: 0; outline: none; }
.community-menu__item { display: flex; align-items: center; gap: 14px; min-height: 54px; width: 100%; padding: 12px; border: 0; border-radius: 10px; background: transparent; color: #5e5667 !important; text-align: left; font-size: 14px; }
.community-menu__item:hover { background: #f6f4f8; }
.community-menu__item--danger { color: #bc485a !important; }
.community-menu__item[aria-pressed="true"] { background: #f6f4f8; font-weight: 600; }
.community-menu__cancel { justify-content: center; margin-top: 8px; border-top: 1px solid #eeeaf1; border-radius: 0; font-weight: 600; }
@media (min-width: 768px) {
  .community-menu { inset: auto; left: var(--community-menu-left, 12px); top: var(--community-menu-top, 12px); width: 280px; max-width: calc(var(--community-menu-viewport-width, 100vw) - 24px); max-height: calc(var(--community-menu-viewport-height, 100dvh) - 24px); padding: 8px; margin: 0; overflow-y: auto; border: 1px solid #e7e3ec; border-radius: 12px; box-shadow: 0 8px 32px rgb(24 21 30 / 16%); }
  .community-menu::backdrop { background: transparent; }
  .community-menu .community-sheet-handle { display: none; }
  .community-menu__header { padding: 0 0 4px 8px; }
  .community-menu__header h2 { font-size: 13px; }
  .community-menu__item { min-height: 46px; padding: 10px; border-radius: 8px; font-size: 13px; }
}
@keyframes community-sheet-enter {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.community-image-viewer { position: fixed; inset: 0; border: 0; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); margin: 0; height: 100dvh; width: 100vw; max-height: none; max-width: none; background: #151217; color: #fff; }
.community-image-viewer[open] { display: flex; flex-direction: column; }
.community-image-viewer::backdrop { background: #151217; }
.community-image-viewer__toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 10px 20px; font-size: 13px; color: #c6c0cd; }
.community-image-viewer [data-community-target="viewerCounter"]:focus { outline: none; }
.community-image-viewer .community-icon-button { color: #fff; }
.community-image-viewer .community-icon-button:hover { background: #ffffff1a; }
.community-image-viewer__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 58px 40px; }
.community-image-viewer__stage img { object-fit: contain; max-height: 100%; max-width: 100%; }
.community-image-viewer__previous { position: absolute; left: 7px; top: calc(50% - 22px); }
.community-image-viewer__next { position: absolute; right: 7px; top: calc(50% - 22px); }
.community-delete-dialog { position: fixed; inset: 0; width: min(400px, calc(100vw - 32px)); height: fit-content; max-width: none; max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); margin: auto; padding: 24px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #eae6ed; border-radius: 20px; background: #fff; color: var(--community-ink); box-shadow: 0 24px 90px rgb(27 24 35 / 20%); }
.community-delete-dialog::backdrop { background: rgb(25 23 30 / 36%); backdrop-filter: blur(2px); }
.community-delete-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.community-delete-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: #fff0f1; color: #d4505c; }
.community-delete-icon .community-icon { width: 22px; height: 22px; }
.community-delete-header .community-icon-button { margin: -8px -8px 0 0; color: #99929f; }
.community-delete-dialog h2 { margin: 18px 0 8px; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.025em; }
.community-delete-description { margin: 0; color: #87808f; font-size: 13px; line-height: 1.65; }
.community-delete-error { margin: 16px 0 0; padding: 10px 12px; border: 1px solid #f5dadd; border-radius: 9px; background: #fff5f6; color: #b44854; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.community-delete-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.community-delete-actions .community-delete-button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 20px; }
.community-delete-actions .community-delete-button--cancel { border-color: #e8e4ed; background: #f8f7fa; color: #736a7e; }
.community-delete-button--cancel:hover { background: #f0edf5; }
.community-delete-button--confirm { background: #db4652; color: #fff; }
.community-delete-button--confirm:hover { background: #cc3945; }
.community-toast { position: fixed; z-index: 100; left: 50%; bottom: calc(98px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 12px 18px; max-width: calc(100vw - 36px); border-radius: 12px; background: #302a36; color: #fff; font-size: 13px; box-shadow: 0 6px 20px #251b3024; text-align: center; }
.community-feedback-toast { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); width: max-content; }
.community-feedback-toast button { margin-left: 12px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: #fff; font-weight: 700; text-decoration: underline; }
@media (max-width: 1199px) {
  .community-feed-content { grid-template-columns: minmax(0, 1fr); }
  .community-right-column { display: none; }
}
@media (max-width: 767px) {
  .community-feed, .community-detail { padding: 64px 0 110px; }
  body:not([data-hotwire-native="true"]) .community-feed,
  body:not([data-hotwire-native="true"]) .community-detail { padding-top: 48px; }
  .community-detail { padding-bottom: 0; }
  .community-detail .community-composer { position: fixed; left: 0; right: 0; z-index: 60; }
  .community-feed-column { background: #fff; }
  .community-feed-controls { min-height: 32px; padding: 0 16px 10px; background: var(--community-surface); }
  .community-filter-context { padding-left: 16px; padding-right: 16px; }
  .community-sort { font-size: 11px; }
  .community-create-card { padding: 16px; min-height: 78px; margin-bottom: 0; gap: 10px; border-width: 0 0 1px; border-radius: 0; }
  .community-create-card > span:nth-child(2) { font-size: 13px; }
  .community-create-card__icon { height: 36px; width: 36px; }
  .community-create-card__icon .community-icon { height: 21px; width: 21px; }
  .community-avatar { height: 38px; width: 38px; }
  .community-post { padding: 18px 16px 10px; margin-bottom: 0; border-width: 0 0 1px; border-radius: 0; }
  .community-feed .community-empty { border: 0; border-radius: 0; }
  .community-feed-footer { padding-left: 16px; padding-right: 16px; }
  .community-feed-footer[aria-busy="true"] { padding-left: 0; padding-right: 0; }
  .community-feed-footer[aria-busy="true"] .community-feed-skeleton { gap: 0; }
  .community-skeleton-card { padding: 18px 16px 10px; border-width: 0 0 1px; border-radius: 0; }
  .community-skeleton-card__header { gap: 9px; margin-bottom: 18px; }
  .community-skeleton-card__avatar { width: 38px; height: 38px; }
  .community-post__header { margin-bottom: 14px; }
  .community-author { gap: 9px; }
  .community-page .community-author__timestamp { gap: 5px; }
  .community-author__meta { gap: 5px; }
  .community-author__meta > span:first-child { max-width: 190px; }
  .community-post__body { line-height: 1.75; }
  .community-post-actions { margin-top: 13px; gap: 6px; }
  .community-count-pill { min-width: 59px; font-size: 11px; padding: 6px 11px; }
  .community-images { margin-top: 15px; border-radius: 9px; }
  .community-editor { padding: 0; background: #fff; }
  .community-detail-header__inner { height: 56px; padding: 0 17px; }
  body:not([data-hotwire-native="true"]) .community-detail .community-detail-header { display: none; }
  body[data-hotwire-native="true"] .community-detail-header__inner > .community-icon-button { margin-left: auto; }
  .community-detail .community-detail-header, .community-detail .community-composer { border-radius: 0; }
  .community-detail-header h1 { font-size: 16px; }
  .community-back-button { gap: 1px; font-size: 11px; }
  .community-detail-column { min-height: calc(100dvh - 64px); border: 0; border-radius: 0; }
  .community-post--detail { padding: 23px 19px 12px; border: 0; }
  .community-post--detail .community-post__header { margin-bottom: 21px; }
  .community-comments-section { padding-top: 22px; padding-left: 18px; padding-right: 18px; scroll-margin-top: 64px; }
  .community-comments-heading { margin-bottom: 22px; }
  .community-avatar--small { width: 30px; height: 30px; }
  .community-comment__bubble { padding: 12px; }
  .community-comment__meta .community-comment-like { min-width: 44px; padding: 6px 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .community-comment__replies { margin-left: 36px; }
  .community-comment__replies > .community-comment:first-child { margin-top: 24px; }
  .community-composer__inner { padding: 10px 14px; }
  body:not([data-hotwire-native="true"]) .community-detail .community-composer__inner { padding-bottom: calc(10px + var(--community-composer-safe-area, env(safe-area-inset-bottom, 0px))); }
  body[data-hotwire-native="true"] .community-detail .community-composer__inner { padding-bottom: calc(18px + var(--community-composer-safe-area, env(safe-area-inset-bottom, 0px))); }
  .community-comment-form { gap: 8px; }
  .community-comment-identity-status { margin-left: 52px; }
  .community-comment-login { font-size: 11px; }
  .community-comment-login .community-primary-button { font-size: 12px; padding: 10px 12px; }
  .community-editor-column { padding: calc(57px + env(safe-area-inset-top, 0px)) 0 40px; }
  .community-editor-card { border: 0; border-radius: 0; padding: 22px 20px; }
  .community-editor-school { max-width: 100px; font-size: 10px; }
  .community-editor-body { min-height: 280px; }
  .community-editor-event { margin: 0 18px; padding: 18px; }
  .community-editor-form > .community-inline-error { margin: 14px 18px; }
  .community-menu[open] { animation: community-sheet-enter 220ms cubic-bezier(.2, .8, .2, 1); }
  .community-image-viewer__stage { padding: 0 0 40px; }
  .community-image-viewer__previous, .community-image-viewer__next { background: #211a2d99; }
}
@media (prefers-reduced-motion: reduce) {
  .community-page *, .community-page *::before, .community-page *::after { scroll-behavior: auto !important; transition: none !important; }
  .community-menu[open] { animation: none !important; }
}

/* The post composer is isolated from the detail page's comment composer. */
.community-compose-dialog {
  position: fixed;
  top: calc(var(--community-compose-offset-top, 0px) + var(--community-compose-available-height, 100dvh) / 2);
  right: 0;
  bottom: auto;
  left: 0;
  transform: translateY(-50%);
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: min(780px, calc(var(--community-compose-available-height, 100dvh) - 48px));
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e7e5eb;
  border-radius: 20px;
  color: var(--community-ink);
  background: #fff;
  box-shadow: 0 24px 90px rgb(27 24 35 / 18%);
}
.community-compose-dialog[open] { display: flex; flex-direction: column; }
.community-compose-dialog::backdrop { background: rgb(25 23 30 / 36%); backdrop-filter: blur(2px); }
.community-compose-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 15px 18px 13px 25px; border-bottom: 1px solid #eeedf1; }
.community-compose-header h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.02em; font-weight: 700; margin: 0; }
.community-compose-header > .community-icon-button { height: 44px; width: 44px; background: #f5f5f7; color: #84818c; }
.community-compose-container { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.community-compose-loading { padding: 70px 24px; text-align: center; font-size: 13px; color: #918b9a; }
.community-compose-form { padding: 0; background: #fff; }
.community-compose-identity { display: flex; align-items: center; gap: 10px; padding: 22px 25px 3px; }
.community-compose-avatar { height: 36px; width: 36px; border: 1px solid #e7e5ec; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #f4f3f6; color: #89828f; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.community-compose-avatar img { width: 100%; height: 100%; object-fit: contain; }
.community-compose-avatar:has(> img) { background: #fff; }
.community-compose-avatar--club { border-radius: 10px; }
.community-compose-avatar--katchup { border-radius: 10px; background: #fff; }
.community-compose-avatar .community-icon { width: 18px; height: 18px; }
.community-compose-identity__text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1; }
.community-compose-identity-caption { display: block; margin: 0 0 1px; color: #96929f; font-size: 10px; line-height: 11px; }
.community-compose-identity .community-compose-identity-toggle { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; max-width: min(320px, 100%); padding: 3px 8px; border: 1px solid #e8e5ed; border-radius: 7px; color: #36313b; background: #faf9fc; font-size: 13px; font-weight: 600; line-height: 20px; }
.community-compose-identity-toggle:hover { background: #f1eef6; border-color: #dcd6e6; }
.community-compose-identity-toggle > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-compose-identity-toggle .community-icon { height: 14px; width: 14px; color: #97909f; }
.community-compose-identity__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }
.community-compose-school-select { min-height: 28px; max-width: min(240px, 100%); padding: 3px 26px 3px 8px; border: 1px solid #e8e5ed; border-radius: 7px; background: #faf9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2397909f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 8.25 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") no-repeat right 7px center / 14px; color: #36313b; font: inherit; font-size: 13px; font-weight: 600; line-height: 20px; text-overflow: ellipsis; appearance: none; cursor: pointer; }
.community-compose-school-select:hover { background-color: #f1eef6; border-color: #dcd6e6; }
/* An administrator's school picker reads as a chip beside the identity switch,
   and its list keeps room for long school names. */
.community-compose-school-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: min(260px, 100%); padding: 3px 8px; border: 1px solid #e8e5ed; border-radius: 7px; background: #faf9fc; color: #36313b; font-size: 13px; font-weight: 600; line-height: 20px; text-align: left; cursor: pointer; }
.community-compose-school-trigger:hover { background: #f1eef6; border-color: #dcd6e6; }
/* The picker draws its own focus around its search; its options take the
   community outline inside their edge, as the sort menu's do. */
.community-page .community-compose-school [data-form-select-target="search"]:focus-visible { outline: none; }
.community-page .community-compose-school [role="option"]:focus-visible { outline-offset: -3px; }
.community-compose-school-trigger .text-slate-400 { color: #96929f; }
.community-compose-school-trigger .text-slate-950 { color: #36313b; }
.community-compose-school [data-form-select-target="menu"]:not([data-presentation="sheet"]) { min-width: min(320px, calc(100vw - 24px)); }
.community-compose-content { padding: 0 25px; }
.community-compose-body { display: block; width: 100%; min-height: 0; max-height: 360px; padding: 16px 0; border: 0; resize: none; overflow: hidden; box-sizing: border-box; outline-offset: 0 !important; background: transparent; color: #37313c; font-size: 16px !important; line-height: 1.65 !important; }
.community-compose-body::placeholder { color: #a5a0ac; }
.community-page .community-compose-body:focus-visible { outline: none; }
.community-compose-previews, .community-compose-existing-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.community-compose-previews:not(:empty), .community-compose-existing-images:not(:empty) { margin: 6px 0 17px; }
/* Opened from the photo button: a place to drop photos, which chooses them when clicked. */
.community-compose-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 124px; margin: 4px 0 14px; padding: 18px; border: 1.5px dashed #d8d3df; border-radius: 12px; background: #faf9fc; color: #6f6878; font: inherit; text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.community-compose-dropzone[hidden] { display: none; }
.community-compose-dropzone:hover, .community-compose-dropzone.is-dragging { border-color: #db4652; background: #fff5f6; }
.community-compose-dropzone .community-icon { width: 26px; height: 26px; color: #a19aab; }
.community-compose-dropzone.is-dragging .community-icon { color: #db4652; }
.community-compose-dropzone__title { color: #36313b; font-size: 14px; font-weight: 650; line-height: 20px; }
.community-compose-dropzone__hint { color: #96929f; font-size: 12px; line-height: 18px; }
.community-compose-tools .community-compose-add-images[aria-expanded="true"] { background: #fff1f2; color: #db4652; }
.community-upload-preview { position: relative; min-width: 0; border: 1px solid #e5e1e9; border-radius: 11px; overflow: hidden; background: #f6f4f8; }
.community-upload-preview > img { display: block; object-fit: cover; width: 100%; height: 142px; }
.community-compose-previews:has(> :only-child), .community-compose-existing-images:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.community-upload-preview:only-child > img { height: auto; max-height: 280px; object-fit: contain; }
.community-upload-preview > button { position: absolute; top: 5px; right: 5px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(31 28 36 / 78%); color: #fff; font-size: 23px; font-weight: 400; box-shadow: 0 1px 5px #0002; }
.community-upload-preview > button:hover { background: #292330; }
.community-existing-image-remove { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 9px 12px; color: #847789; font-size: 11px; cursor: pointer; }
.community-upload-preview:has(.community-existing-image-remove input:checked) > img { opacity: .35; }
.community-compose-form > .community-compose-error { margin: 0 25px 15px; }
.community-compose-toolbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 25px; padding: 13px 0 0; border-top: 1px solid #ece9f0; background: #fff; }
.community-compose-tools { display: flex; align-items: center; gap: 2px; }
.community-compose-tools .community-icon-button { color: #98929f; cursor: pointer; }
.community-compose-tools .community-icon-button:hover { color: #5f536d; background: #f5f2f8; }
.community-compose-tools .community-icon { width: 22px; height: 22px; }
.community-compose-file-input { display: none; }
.community-compose-submit { min-width: 92px; padding: 10px 20px; border-radius: 9px; font-size: 13px; }
.community-emoji-dialog {
  position: fixed;
  top: calc(var(--community-compose-offset-top, 0px) + var(--community-compose-available-height, 100dvh) / 2);
  right: 0;
  bottom: auto;
  left: 0;
  transform: translateY(-50%);
  width: min(420px, calc(100vw - 24px));
  height: min(520px, calc(var(--community-compose-available-height, 100dvh) - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  max-width: none;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e7e3ed;
  border-radius: 18px;
  background: #fff;
  color: var(--community-ink);
  box-shadow: 0 18px 70px rgb(27 24 35 / 20%);
}
.community-emoji-dialog[open] { display: flex; flex-direction: column; }
.community-emoji-dialog::backdrop { background: rgb(25 23 30 / 30%); }
.community-emoji-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 8px 10px 6px 18px; }
.community-emoji-header h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.3; }
.community-emoji-header .community-icon-button { color: #8b8493; }
.community-emoji-search { flex: 0 0 auto; padding: 0 16px 10px; }
.community-emoji-search input { display: block; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #e6e2eb; border-radius: 10px; background: #faf9fc; color: #36313b; font-size: 16px; line-height: 22px; }
.community-emoji-search input::placeholder { color: #9b94a3; }
.community-emoji-categories { display: flex; align-items: center; flex: 0 0 auto; gap: 2px; padding: 0 12px 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; border-bottom: 1px solid #eeebf1; }
.community-emoji-categories .community-emoji-category { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1; }
.community-emoji-categories .community-emoji-category:hover { background: #f6f3f9; }
.community-emoji-categories .community-emoji-category[aria-pressed="true"] { border-color: #e5dfec; background: #efebf5; }
.community-emoji-results { flex: 1; min-height: 0; padding: 12px 14px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.community-emoji-status { margin: 0 2px 10px; color: #89828f; font-size: 12px; line-height: 1.5; }
.community-emoji-status:empty { display: none; }
.community-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.community-emoji-grid .community-emoji-option { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 4px; border: 0; border-radius: 9px; background: transparent; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 24px; line-height: 1; }
.community-emoji-grid .community-emoji-option:hover { background: #f3eff7; }
.community-emoji-results :is(.community-emoji-more, .community-emoji-retry) { display: block; width: 100%; min-height: 40px; margin-top: 12px; padding: 8px 12px; border: 1px solid #e6e1eb; border-radius: 9px; background: #faf9fc; color: #74697f; font-size: 13px; font-weight: 600; line-height: 20px; }
.community-emoji-results :is(.community-emoji-more, .community-emoji-retry):hover { background: #f2eef6; }
.community-compose-help { margin: 0; padding: 11px 25px 21px; color: #b1aab9; font-size: 10px; line-height: 1.5; }
.community-compose-photo-draft-hint { display: none; }
.community-compose-fallback { width: calc(100% - 36px); max-width: 560px; }
.community-compose-fallback .community-compose-form { border: 1px solid var(--community-line); border-radius: 16px; overflow: hidden; }
@media (max-width: 767px) {
  /* On a phone the composer is a sheet that rises from the bottom and fills
     the visible screen, above the keyboard while it is open. Its post scrolls
     between the author row and the tools, which stay in reach at the bottom. */
  .community-compose-dialog {
    top: calc(var(--community-compose-offset-top, 0px) + 10px);
    transform: none;
    width: 100%;
    height: calc(var(--community-compose-available-height, 100dvh) - 10px);
    max-height: none;
    border: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 40px rgb(27 24 35 / 16%);
  }
  .community-compose-dialog .community-compose-container { display: flex; flex-direction: column; flex: 1; }
  .community-compose-dialog .community-compose-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .community-compose-dialog :is(.community-compose-identity, .community-compose-toolbar, .community-compose-help, .community-compose-error) { flex-shrink: 0; }
  .community-compose-dialog .community-compose-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scroll-padding-block: 16px; }
  .community-compose-dialog .community-compose-body { min-height: 160px; max-height: none; }
  .community-compose-dialog .community-compose-help { padding-bottom: calc(18px + var(--community-compose-safe-area, env(safe-area-inset-bottom, 0px))); }
  .community-compose-header { padding: 12px 13px 11px 19px; }
  .community-compose-header h2 { font-size: 16px; }
  .community-compose-identity { padding: 19px 19px 2px; }
  .community-compose-identity :is(.community-compose-identity-toggle, .community-compose-school-select, .community-compose-school-trigger) { max-width: min(230px, 100%); font-size: 12px; }
  .community-compose-content { padding: 0 19px; }
  .community-compose-body { max-height: 290px; padding: 14px 0; }
  .community-upload-preview > img { height: 112px; }
  .community-compose-toolbar { margin-left: 19px; margin-right: 19px; padding-top: 11px; }
  .community-compose-form > .community-compose-error { margin: 0 19px 12px; }
  .community-compose-help { padding: 10px 19px 18px; font-size: 9px; }
  .community-compose-submit { min-width: 83px; }
  .community-compose-fallback { padding-top: calc(77px + env(safe-area-inset-top, 0px)); }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .community-compose-dialog[open] { animation: community-compose-rise .34s cubic-bezier(.2, .8, .2, 1); }
  .community-compose-dialog[open]::backdrop { animation: community-compose-fade .34s ease; }
}
@keyframes community-compose-rise { from { transform: translateY(100%); } }
@keyframes community-compose-fade { from { opacity: 0; } }

/* Native creation fills the WebView below the app navigation bar. The
   content scrolls independently so its publishing tools stay reachable. */
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] {
  position: fixed;
  top: var(--community-compose-offset-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  display: flex;
  flex-direction: column;
  height: var(--community-compose-available-height, 100dvh);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-detail-header {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  padding-top: 0;
}
html[data-native-community-post-composer="true"] body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-detail-header { display: none; }
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-compose-fallback {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-compose-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] :is(.community-compose-identity, .community-compose-toolbar, .community-compose-help, .community-compose-error) { flex-shrink: 0; }
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-compose-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 16px;
}
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-compose-body { min-height: 160px; max-height: none; }
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-compose-help { padding-bottom: calc(18px + var(--community-compose-safe-area, env(safe-area-inset-bottom, 0px))); }
body[data-hotwire-native="true"] .community-editor[data-community-create-page="true"] .community-compose-form:has(.community-compose-previews > *) .community-compose-photo-draft-hint { display: block; margin-top: 3px; color: #817c8d; }
