.community {
  width: min(100% - 32px, 1030px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 68px) 0 70px;
}
.community-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: clamp(20px, 5vw, 44px);
  background: var(--card, #181b21);
  border: 1px solid #7b809633;
  border-radius: 22px;
}
.community h1 { font-size: clamp(1.95rem, 5vw, 3.65rem); line-height: 1.08; overflow-wrap: anywhere; }
.community h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); line-height: 1.2; }
.community-publication { display: grid; gap: 14px; }
.community .community-publication h1 { font-size: clamp(1.4rem, 3.4vw, 2.05rem); line-height: 1.2; }
.community .community-publication > h2 { font-size: clamp(1.1rem, 2.4vw, 1.4rem); }
.community-intro p { max-width: 52ch; margin-top: 12px; color: var(--muted, #bbc1cb); }
.community-stream, .community-form { display: grid; gap: 16px; }
.community-layout--article, .community-layout--feed { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px, .34fr); align-items: start; gap: 16px; }
.community:has(.community-layout--article, .community-layout--feed) { width: min(1140px, calc(100% - 48px)); }
.community-layout--article .community-article, .community-layout--article .community-publication > .community-copy { max-width: none; }
.community-related { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); }
.community .community-related h2 { font-size: 1.1rem; }
.community-related ul { list-style: none; display: grid; gap: 8px; }
.community-related li a { display: grid; gap: 4px; padding: 9px; border-radius: 10px; background: var(--bg); text-decoration: none; overflow-wrap: anywhere; }
.community-related li span { color: var(--muted); font-size: .8rem; }
.community .community-related-all { color: var(--accent); font-size: .9rem; }
.community-recent-comments .community-comment-byline { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.community-comment-byline strong { color: var(--text); font-size: .86rem; }
.community-comment-byline time { white-space: nowrap; }
.community-recent-comments li p { font-size: .9rem; line-height: 1.35; }
.community-recent-comments li a:hover strong, .community-recent-comments li a:focus-visible strong { color: var(--accent); }
@media (min-width: 821px) {
  .community-layout--feed .community-recent-comments {
    position: sticky;
    top: calc(var(--community-header-bottom, 68px) + 12px);
    max-height: calc(100dvh - var(--community-header-bottom, 68px) - 24px);
    overflow-y: auto;
  }
}
@media (max-width: 820px) { .community-layout--article, .community-layout--feed { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 560px) { .community:has(.community-layout--article, .community-layout--feed) { width: calc(100% - 28px); } }
.community-card {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: clamp(17px, 4vw, 34px);
  background: var(--card, #181b21);
  border: 1px solid #7b809633;
  border-radius: 18px;
  overflow-wrap: anywhere;
}
.community a { color: inherit; text-underline-offset: 4px; }
.community-card h2 a { text-decoration: none; }
.community a:hover { text-decoration: underline; }
.community-copy { max-width: 78ch; white-space: pre-wrap; line-height: 1.65; }
.community .community-copy a { color: var(--accent); overflow-wrap: anywhere; }
.community-meta, .community-notice, .community-muted { color: var(--muted, #bbc1cb); font-size: .9rem; }
.community-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.community-author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.community-author-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.community-notice:not(:empty) { margin-bottom: 12px; }
.community-type { color: var(--accent, #ffd126); font-weight: 700; }
.community-actions, .community-tabs, .community-management { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.community-tabs { margin-bottom: 16px; }
.community .community-back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.community .community-back:hover, .community .community-back:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.community-chip, .community button.community-chip {
  padding: 7px 12px;
  color: inherit;
  font: inherit;
  font-size: .88rem;
  border: 1px solid #7b809655;
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
}
.community-chip[aria-pressed="true"], .community-chip[aria-current="page"] {
  border-color: var(--accent, #ffd126);
  color: var(--accent, #ffd126);
}
.community-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 8px; }
.community-photos img { display: block; width: 100%; max-height: 430px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.community-thread { display: grid; gap: 20px; }
.community-branch { display: grid; gap: 13px; border-top: 1px solid #7b809633; padding-top: 12px; }
.community-comment { display: grid; gap: 8px; }
.community-reply { margin-inline-start: clamp(10px, 3vw, 34px); padding-inline-start: 12px; border-inline-start: 2px solid #7b809655; }
.community-solution { color: var(--accent, #ffd126); }
.community-management { padding-top: 12px; border-top: 1px solid #7b809633; }
.community-management summary { cursor: pointer; }
.community-management .community-actions { margin-top: 10px; }
.community-dialog {
  position: fixed;
  margin: auto;
  width: min(100% - 28px, 660px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: clamp(18px, 4vw, 32px);
  color: var(--text, #fff);
  background: var(--card, #181b21);
  border: 1px solid #7b809655;
  border-radius: 16px;
}
.community-dialog::backdrop { background: #000b; }
.community-name-dialog { max-width: 440px; }
.community-dialog h2 { margin-bottom: 16px; }
.community-form label { display: grid; gap: 6px; }
.community-form textarea { min-height: 105px; resize: vertical; }
.community-editor textarea { min-height: 210px; }
.community-form .field { width: 100%; }
.community-form .community-photo-remove { display: flex; align-items: center; gap: 5px; }
.community-form .community-photo-tile { display: grid; gap: 6px; }
.community-form .community-photo-tile img { aspect-ratio: 4 / 3; }
.community-editor-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg); }
.community-editor-tabs button { padding: 9px 2px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font: inherit; font-size: .9rem; cursor: pointer; }
.community-editor-tabs [aria-selected="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.community-editor-fields, .community-editor-copy, .community-editor-photos { display: grid; gap: 12px; min-width: 0; }
.community-editor-photos { padding: 0; border: 0; }
.community-form .community-photo-prompt {
  justify-items: center;
  align-content: center;
  min-height: 132px;
  padding: 14px;
  border: 1px dashed var(--accent-dark);
  border-radius: 14px;
  background: var(--accent-soft);
  text-align: center;
  cursor: pointer;
}
.community-photo-prompt:hover, .community-photo-prompt:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.community-photo-plus { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--bg); background: var(--accent); font-size: 1.45rem; line-height: 1; }
.community-editor-fields[data-kind="post"] textarea { min-height: 124px; }
.community-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.community-editor-photos [data-photos-note]:empty, .community-editor-photos [data-preview]:empty { display: none; }
.community [hidden] { display: none !important; }
.community-load { justify-self: start; }
.community-emoji { position: relative; }
.community-emoji summary { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; list-style: none; }
.community-emoji summary::-webkit-details-marker { display: none; }
.community-emoji[open] summary { border-color: var(--accent); background: var(--accent-soft); }
.community-emoji summary span, .community-emoji-grid button { font: 1.25rem/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.community-emoji-menu { position: absolute; z-index: 4; inset-inline-start: 0; bottom: calc(100% + 9px); width: min(310px, calc(100vw - 76px)); max-height: min(340px, 56vh); overflow: auto; display: grid; gap: 10px; padding: 10px; background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px #0007; }
.community-emoji-group > p { margin: 0 0 4px 3px; font-size: .78rem; }
.community-emoji-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.community-emoji-grid button { min-width: 0; min-height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.community-emoji-grid button:hover, .community-emoji-grid button:focus-visible { background: var(--accent-soft); }
.comment-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.comment-gallery:empty { display: none; }
.comment-gallery img { display: block; width: 104px; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.comment-photo-tile { position: relative; }
.comment-photo-tile button { position: absolute; inset: 4px 4px auto auto; width: 26px; height: 26px; border-radius: 50%; border: 0; color: white; background: #151515e8; cursor: pointer; }
.community-form .comment-photo-button { display: inline-flex; align-items: center; min-height: 42px; }
.comment-photo-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.community-dialog:has([data-kind="article"]) { width: min(100% - 24px, 960px); padding-inline-start: 42px; }
.article-editor { display: grid; gap: 8px; }
.article-editor-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.article-editor-panel { display: grid; min-width: 0; border: 1px solid transparent; border-radius: 10px; }
.article-editor-row:focus-within .article-editor-panel, .article-editor-row:hover .article-editor-panel { border-color: var(--border); background: var(--bg); }
.article-editor-note:empty { display: none; }
.article-insert { position: absolute; inset-inline-start: -39px; top: 4px; }
.article-insert summary { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; list-style: none; cursor: pointer; color: var(--muted); }
.article-insert summary::-webkit-details-marker { display: none; }
.article-editor-row:focus-within summary, .article-editor-row:hover summary { color: var(--accent); border-color: var(--accent-dark); }
.article-insert-menu { position: absolute; z-index: 3; top: 36px; left: 0; width: 177px; display: grid; padding: 6px; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 24px #0006; }
.article-insert-menu button, .article-editor-tools button { padding: 5px 7px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font: inherit; font-size: .83rem; text-align: left; cursor: pointer; }
.article-insert-menu button:hover, .article-editor-tools button:hover { color: var(--accent); background: var(--accent-soft); }
.article-editor-tools { display: flex; flex-wrap: wrap; gap: 3px; padding: 4px 7px 0; opacity: .45; }
.article-editor-row:focus-within .article-editor-tools, .article-editor-row:hover .article-editor-tools { opacity: 1; }
.article-editor-row[data-anchor]:not([data-anchor=""]) [data-article-action="anchor"] { color: var(--accent); }
.article-editor-value { display: grid; gap: 8px; min-width: 0; padding: 7px 10px 10px; }
.article-editor-value[data-marker]:not([data-marker=""]) { grid-template-columns: max-content minmax(0, 1fr); gap: 4px; }
.article-editor-value[data-marker]:not([data-marker=""])::before { content: attr(data-marker); color: var(--muted); }
.article-editable { min-height: 1.5em; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-editable:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.article-editor-value[data-type="heading"] { font-size: 1.35rem; font-weight: 700; }
.article-editor-value[data-type="subheading"], .community-article h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.35; }
.article-editor-value[data-type="quote"], .community-article blockquote { border-left: 3px solid var(--accent); margin-inline-start: 8px; padding-inline-start: 14px; }
.article-editor-value img, .community-article img, .community-article video { display: block; max-width: 100%; max-height: 60vh; border-radius: 12px; }
.community-form .article-file {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px;
  border: 1px dashed var(--accent-dark);
  border-radius: 12px;
  background: var(--accent-soft);
  cursor: pointer;
}
.article-file:hover, .article-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.community-article-cover img { aspect-ratio: 16 / 9; }
.article-cover-editor { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.article-cover-editor legend { padding-inline: 6px; font-weight: 700; }
.article-cover-editor img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; }
.community-form .article-cover-editor .article-file { min-height: 42px; padding: 7px 12px; }
.article-cover-editor .community-photo-plus { width: 25px; height: 25px; font-size: 1.1rem; }
.article-editor-contents { display: grid; gap: 4px; padding-inline-start: 1.65em; }
.article-editor-contents li::marker { color: var(--accent); }
.article-contents { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.article-contents h2 { margin-bottom: 6px; }
.community-schedule { display: grid; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.community-schedule legend { padding-inline: 5px; font-weight: 700; }
.community-schedule input { max-width: 280px; color-scheme: dark; }
.community .article-contents a { color: var(--accent); }
.article-editor-value textarea { min-height: 5.5rem; }
.article-editor-value hr, .community-article hr { border: 0; border-top: 1px solid var(--border); }
.community-article { display: grid; gap: 16px; max-width: 78ch; line-height: 1.65; }
.community-article [id] { scroll-margin-top: max(90px, calc(var(--community-header-bottom, 60px) + 54px)); }
.community-contents-dock { position: fixed; z-index: 1000; inset-block-start: var(--community-header-bottom, 60px); inset-inline: 0; width: inherit; margin-inline: auto; pointer-events: none; }
.community-contents-dock button, #community-contents-panel { pointer-events: auto; background: var(--card); border: 1px solid var(--border); color: var(--text); }
.community-contents-dock button { display: inline-flex; align-items: center; gap: 14px; margin-top: 4px; padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px #0005; }
.community-contents-dock button:hover, .community-contents-dock button[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.community-contents-dock button[aria-expanded="true"] span { transform: rotate(180deg); }
#community-contents-panel { width: min(100%, 425px); max-height: min(55dvh, 480px); margin-top: 5px; padding: 12px 16px; overflow: auto; overscroll-behavior: contain; border-radius: 12px; box-shadow: 0 10px 28px #0008; }
#community-contents-panel ol { display: grid; gap: 5px; padding-inline-start: 1.15em; }
#community-contents-panel a { display: block; padding: 3px 0; text-decoration: none; }
#community-contents-panel a:hover, #community-contents-panel a:focus-visible { color: var(--accent); text-decoration: underline; }
.community-article p, .community-article blockquote, .community-article li { white-space: pre-wrap; }
.community-article ol, .community-article ul { padding-inline-start: 1.4em; }
.community-article audio { width: min(100%, 560px); }
.community-article figcaption { margin-top: 6px; }
.article-poll { min-width: 0; display: grid; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.article-poll legend { padding-inline: 6px; font-weight: 700; }
.article-poll button { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-align: left; }
.article-poll output { min-width: 1.5em; text-align: right; }
.question-poll-editor { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.community-form .question-poll-toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.question-poll-toggle input { accent-color: var(--accent); }
.question-poll-editor fieldset { display: grid; justify-items: start; gap: 10px; min-width: 0; padding: 8px 0 0; border: 0; }
.question-poll-editor legend { font-weight: 600; }
.question-options { display: grid; gap: 7px; width: 100%; }
.question-option { display: flex; gap: 6px; }
.question-option input { min-width: 0; flex: 1 1 auto; }
.question-option button { padding-inline: 10px; }
.community-question-result .community-article { max-width: none; }
.community-question-result .article-poll { padding: 14px; background: radial-gradient(ellipse at top left,var(--accent-soft),transparent 80%),var(--bg); }
.community .article-poll button[style] { background: linear-gradient(to right,var(--accent-soft) var(--poll-share,0%),transparent var(--poll-share,0%)); }
