/* 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 auto; min-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 auto; width: auto; min-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-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; }
/* An ad's advertiser: its initials on a square, as a company's mark sits. */
.community-avatar--ad { border-radius: 11px; background: #f1f1f4; color: #4a4655; }
.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; }
/* The feed as a board: one white list, a row per post with its title (or
   first line) and red comment count, who and when beneath, and its first
   picture small at the end. KATCHUP's notices stand on top, tinted. */
.community-post-list:has(> .community-post-row) { background: #fff; border: 1px solid var(--community-line); border-radius: 14px; overflow: hidden; }
.community-post-list > .community-spotlight:has(~ .community-post-row) { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--community-line); }
.community-post.community-post-row { padding: 0; margin: 0; border: 0; border-bottom: 1px solid var(--community-line); border-radius: 0; background: transparent; }
.community-post.community-post-row:last-child { border-bottom: 0; }
/* As specific as the row's own transparent background, which it tints. */
.community-post.community-post-row--notice { background: #fff6f6; }
.community-post-row__link { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 18px; box-sizing: border-box; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.community-post-row__link:active { background: #f6f5f8; }
/* The list clips its rows; keep the keyboard ring inside the row. */
.community-page .community-post-row__link:focus-visible { outline-offset: -3px; }
@media (hover: hover) { .community-post-row__link:hover { background: #faf9fb; } }
.community-post-row__text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.community-post-row__title { display: flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--community-ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.community-post-row__headline { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.community-post-row__comments { flex: none; color: var(--community-accent); font-size: 13px; font-weight: 600; }
.community-post-row__comments[hidden] { display: none; }
.community-post-row__tag { flex: none; align-self: center; padding: 0 6px; border-radius: 5px; background: #f1f0f4; color: #6b6875; font-size: 11px; font-weight: 650; line-height: 18px; }
.community-post-row__tag--notice { background: var(--community-accent); color: #fff; }
.community-post-row__meta { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; color: #92939c; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.community-post-row__author { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.community-post-row__meta > :not(.community-post-row__author) { flex: none; }
.community-post-row__thumb { position: relative; flex: none; width: 52px; height: 52px; overflow: hidden; border-radius: 10px; background: #f1f0f4; }
.community-post-row__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.community-post-row__photos { position: absolute; right: 4px; bottom: 4px; min-width: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #111114b8; color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; }
.community-profile .community-post-list:has(> .community-post-row) { border-width: 1px 0 0; border-radius: 0; }
/* The feed's ad slot (광고 관리) among the posts, spaced like a post; on
   phones, where posts run edge to edge, an inset card above a post's rule. */
.community-spotlight { margin-bottom: 16px; }
.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__title { margin: 0 0 10px; color: var(--community-ink); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.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-image-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(17, 17, 22, 0.46); color: #fff; font-size: 22px; font-weight: 650; letter-spacing: -0.01em; pointer-events: none; }
.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; }
/* The button under an ad written as a post (광고 관리), as wide as the post. */
.community-ad-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 14px 18px; border-radius: 12px; background: var(--community-ink); color: #fff; font-size: 15px; font-weight: 650; line-height: 1.4; text-decoration: none; }
.community-ad-link:hover { background: #000; }
.community-ad-link > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.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-feed-footer[aria-busy="true"] .community-feed-skeleton:has(.community-skeleton-row) { gap: 0; overflow: hidden; border: 1px solid var(--community-line); border-radius: 14px; background: #fff; }
.community-skeleton-row { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 18px; box-sizing: border-box; border-bottom: 1px solid var(--community-line); }
.community-skeleton-row:last-child { border-bottom: 0; }
.community-skeleton-row__text { display: grid; gap: 9px; flex: 1; }
.community-skeleton-row__title { width: 72%; height: 14px; }
.community-skeleton-row:nth-child(even) .community-skeleton-row__title { width: 56%; }
.community-skeleton-row__meta { width: 34%; height: 10px; }
.community-skeleton-row__thumb { flex: none; width: 52px; height: 52px; border-radius: 10px; }
.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; }
@keyframes community-feed-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .community-skeleton-shape::after { animation: none; display: none; } }
/* 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; }
/* "Commenting as" names what others will see beside the comment; a long
   school and major stop at two lines instead of pushing the composer up. */
.community-comment-identity-status { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; 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; } }
/* In an app build with its own comment sheet, the composer is a bar like
   Threads' own: the writer's avatar beside what the sheet will ask for, or
   the draft waiting there. Emoji, sending and edits live in the sheet. */
.community-composer[data-native-comment] .community-comment-emojis,
.community-composer[data-native-comment] .community-reply-context,
.community-composer[data-native-comment] .community-comment-input,
.community-composer[data-native-comment] .community-comment-identity-toggle__badge { display: none; }
.community-composer[data-native-comment] .community-comment-form { align-items: center; }
.community-composer[data-native-comment] .community-comment-avatar { margin-bottom: 0; }
.community-native-comment-bar { display: flex; align-items: center; flex: 1; min-width: 0; min-height: 44px; padding: 0 16px; border: 1px solid #e6e5eb; border-radius: 22px; background: #f9f9fb; color: #a2a0aa; font: inherit; font-size: 16px; line-height: 1.4; text-align: left; -webkit-tap-highlight-color: transparent; }
.community-native-comment-bar[hidden] { display: none; }
.community-native-comment-bar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.community-native-comment-bar.has-draft { color: var(--community-ink); }
.community-native-comment-bar:active:not(:disabled) { background: #f1f0f4; }
.community-reply-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #817c8d; font-size: 12px; padding-left: 3px; }
.community-reply-context .community-icon { width: 16px; height: 16px; }
.community-reply-context__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.community-reply-context__label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.community-reply-context__label strong { color: #4f4b59; font-weight: 600; }
/* One line of the comment, its line breaks run together, then "…". */
.community-reply-context__quote { overflow: hidden; color: var(--community-ink); font-size: 13px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
/* At the foot of a phone's page, the comment a reply answers, quoted. */
.community-reply-context--quote { align-items: flex-start; margin-bottom: 8px; padding: 8px 4px 8px 12px; border-left: 3px solid #d9d5e0; border-radius: 4px 10px 10px 4px; background: #f6f5f8; }
.community-reply-context--quote .community-icon-button { margin: -6px 0; }
.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-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; }
/* Photos sit side by side on a track that follows the finger (or mouse) and
   settles on the nearest one. Vertical pans and pinches stay the browser's. */
.community-image-viewer__stage { --community-viewer-gap: 16px; position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; }
.community-image-viewer__stage.is-zoomed { touch-action: auto; }
.community-image-viewer__track { display: flex; gap: var(--community-viewer-gap); height: 100%; transform: translate3d(calc(var(--community-viewer-index, 0) * (-100% - var(--community-viewer-gap)) + var(--community-viewer-offset, 0px)), 0, 0); transition: transform 320ms cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.community-image-viewer__track.is-dragging { transition: none; }
.community-image-viewer__slide { flex: 0 0 100%; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 32px 40px; }
.community-image-viewer__slide img { min-width: 0; min-height: 0; max-height: 100%; max-width: 100%; object-fit: contain; -webkit-user-drag: none; }
@media (hover: hover) and (pointer: fine) {
  .community-image-viewer__stage.is-swipeable { cursor: grab; }
  .community-image-viewer__stage.is-dragging { cursor: grabbing; }
}
/* Instagram's dots: the current photo's in the accent color, the others dim,
   five at most, with the edge dots smaller when more photos lie beyond. */
.community-image-viewer__dots { --community-viewer-dot-slot: 12px; position: absolute; top: 0; left: 50%; width: calc(var(--community-viewer-dots-visible, 5) * var(--community-viewer-dot-slot)); height: var(--community-viewer-dot-slot); overflow: hidden; pointer-events: none; opacity: 0; transform: translate3d(-50%, var(--community-viewer-dots-top, 0px), 0); transition: transform 240ms cubic-bezier(.2, .8, .2, 1), opacity 160ms ease; }
.community-image-viewer__dots.is-placed { opacity: 1; }
.community-image-viewer__dots.is-instant { transition: opacity 160ms ease; }
.community-image-viewer__dots-strip { display: flex; height: 100%; transform: translate3d(calc(var(--community-viewer-dots-start, 0) * var(--community-viewer-dot-slot) * -1), 0, 0); transition: transform 240ms cubic-bezier(.2, .8, .2, 1); }
.community-image-viewer__dot { flex: 0 0 var(--community-viewer-dot-slot); display: flex; align-items: center; justify-content: center; }
.community-image-viewer__dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 36%); transform: scale(var(--community-viewer-dot-scale, 1)); transition: transform 240ms cubic-bezier(.2, .8, .2, 1), background-color 240ms ease; }
.community-image-viewer__dot.is-active::before { background: var(--community-accent); }
.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-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-post-list:has(> .community-post-row) { border-width: 0 0 1px; border-radius: 0; }
  .community-post.community-post-row:last-child { border-bottom: 0; }
  .community-post-row__link { min-height: 66px; padding: 11px 16px; }
  .community-feed-footer[aria-busy="true"] .community-feed-skeleton:has(.community-skeleton-row) { border-width: 0 0 1px; border-radius: 0; }
  .community-skeleton-row { padding: 11px 16px; }
  .community-spotlight { margin-bottom: 0; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--community-line); }
  .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-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-form > .community-inline-error { margin: 14px 18px; }
  .community-menu[open] { animation: community-sheet-enter 220ms cubic-bezier(.2, .8, .2, 1); }
  .community-image-viewer__slide { padding: 0 0 40px; }
}
@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-identity-byline { display: block; max-width: 100%; margin-top: 3px; overflow: hidden; color: #8f8a98; font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.community-compose-identity-byline[hidden] { display: none; }
.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; }
/* An administrator's choice to show the post in KATCHUP Briefing on Home:
   a chip like the identity switch, with a switch of its own. */
.community-compose-briefing { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 3px 8px; border: 1px solid #e8e5ed; border-radius: 7px; background: #faf9fc; color: #36313b; font-size: 13px; font-weight: 600; line-height: 20px; cursor: pointer; user-select: none; }
.community-compose-briefing:hover { background: #f1eef6; border-color: #dcd6e6; }
.community-compose-briefing__switch { position: relative; flex: none; width: 28px; height: 16px; margin: 0; border-radius: 999px; background: #d6d1de; appearance: none; cursor: pointer; transition: background-color .15s ease; }
.community-compose-briefing__switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s ease; }
.community-compose-briefing__switch:checked { background: var(--community-accent); }
/* KATCHUP Briefing's card on Home: its tag and colour, while the post is in it. */
.community-compose-briefing-card { display: none; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: end; margin: 10px 25px 4px; padding: 12px; border: 1px solid #e8e5ed; border-radius: 10px; background: #faf9fc; }
.community-compose-briefing[hidden] { display: none; }
.community-compose-briefing.is-held { opacity: .45; cursor: not-allowed; }
.community-compose-briefing.is-held .community-compose-briefing__switch { cursor: not-allowed; }
form:has([name="community_post[home_briefing]"]:checked) .community-compose-briefing-card { display: grid; }
.community-compose-briefing-card__tag { display: grid; gap: 4px; min-width: 0; color: #5b5563; font-size: 12px; font-weight: 600; }
.community-compose-briefing-card__tag input { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid #dcd6e6; border-radius: 8px; background: #fff; color: #1f1b24; font-size: 14px; font-weight: 700; text-transform: uppercase; }
.community-compose-briefing-card__tag input::placeholder { color: #a39cae; font-weight: 600; }
.community-compose-briefing-card__themes { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; }
.community-compose-briefing-card__themes legend { float: left; margin-right: 4px; color: #5b5563; font-size: 12px; font-weight: 600; }
.community-compose-briefing-card__themes label { display: inline-flex; align-items: center; cursor: pointer; }
.community-compose-briefing-card__themes input { position: absolute; opacity: 0; pointer-events: none; }
.community-compose-briefing-card__themes label > span { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; border: 2px solid transparent; border-radius: 999px; color: #5b5563; font-size: 12px; font-weight: 700; box-shadow: 0 0 0 1px #dcd6e6 inset; }
.community-compose-briefing-card__themes input:checked + span { box-shadow: 0 0 0 2px #faf9fc, 0 0 0 4px #1f1b24; }
.community-compose-briefing-card__themes input:focus-visible + span { outline: 2px solid var(--community-accent); outline-offset: 2px; }
.community-compose-briefing-card__swatch { width: 26px; padding: 0 !important; }
.community-compose-briefing-card__swatch--crimson { background: linear-gradient(140deg, #19191c, #3d0c13); }
.community-compose-briefing-card__swatch--navy { background: linear-gradient(140deg, #0a1b45, #1b3a8f); }
.community-compose-briefing-card__swatch--emerald { background: linear-gradient(140deg, #04201c, #075c47); }
.community-compose-briefing-card__swatch--violet { background: linear-gradient(140deg, #1a0f30, #4a1d93); }
.community-compose-briefing-card__hint { grid-column: 1 / -1; margin: 0; color: #8a8494; font-size: 12px; line-height: 16px; }
@media (max-width: 767px) { .community-compose-briefing-card { margin-inline: 19px; grid-template-columns: minmax(0, 1fr); } }

.community-compose-briefing__switch:checked::after { transform: translateX(12px); }
/* 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-title { display: block; width: 100%; margin: 14px 0 0; padding: 0 0 10px; border: 0; border-bottom: 1px solid #efeef3; border-radius: 0; box-sizing: border-box; outline-offset: 0 !important; background: transparent; color: var(--community-ink); font-size: 18px !important; font-weight: 650; line-height: 1.4 !important; }
.community-compose-title::placeholder { color: #a3a1ab; font-weight: 600; }
.community-page .community-compose-title:focus-visible { outline: none; box-shadow: none; border-bottom-color: #cfcbd8; }
.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; }
/* A photo's red × in its top right corner: 30px to see, 44px to tap. */
.community-upload-remove { position: absolute; top: 7px; right: 7px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #ef4444; color: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 28%); cursor: pointer; transition: background-color .15s, transform .15s; }
.community-upload-remove::after { content: ""; position: absolute; inset: -7px; }
.community-upload-remove:hover { background: #dc2626; }
.community-upload-remove:active { transform: scale(.94); }
.community-upload-remove:focus-visible { outline: 2px solid #fff; outline-offset: 1px; box-shadow: 0 0 0 4px #ef4444; }
.community-upload-remove svg { width: 15px; height: 15px; }
.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, .community-compose-briefing) { 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; }

