/* Fan communities: tactile pop windows / brushed black, silver and gold. */
.fan-community,
[data-kind='community-post'] {
  --fan-bg: #f3e9ef;
  --fan-paper: #fffafd;
  --fan-ink: #352435;
  --fan-muted: #8b7286;
  --fan-line: #d9c4d3;
  --fan-accent: #ba3e83;
  --fan-soft: #f4d4e7;
  --fan-metal: #ecd4e3;
  --fan-shadow: #b58fa65c;
  color: var(--fan-ink);
}
.fan-community.obsidus,
[data-kind='community-post'][data-community='obsidus'] {
  --fan-bg: #141416;
  --fan-paper: #222225;
  --fan-ink: #eee9dd;
  --fan-muted: #aaa59c;
  --fan-line: #4c4841;
  --fan-accent: #d7b774;
  --fan-soft: #343029;
  --fan-metal: #454446;
  --fan-shadow: #0008;
}
.fan-community.staff,
[data-kind='community-post'][data-community='staff'] {
  --fan-bg: var(--bg);
  --fan-paper: var(--surface);
  --fan-ink: var(--text);
  --fan-muted: var(--muted);
  --fan-line: var(--line);
  --fan-accent: var(--accent);
  --fan-soft: var(--surface2);
}
.fan-community {
  background: var(--fan-bg);
  padding: 28px;
  border: 1px solid var(--fan-line);
  border-radius: 24px;
  box-shadow: none;
  margin: 24px 0 50px;
  overflow: hidden;
  isolation: isolate;
}
.community-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.community-switch a {
  padding: 11px 16px;
  font: 10px var(--mono);
  border: 1px solid var(--fan-line);
  border-radius: 7px;
  color: var(--fan-muted);
  text-decoration: none;
}
.community-switch a[aria-current] {
  background: var(--fan-ink);
  color: var(--fan-bg);
  box-shadow: none;
}
.fan-hero {
  background:
    radial-gradient(ellipse at 65% 20%, #ffeffacc, transparent 60%),
    linear-gradient(135deg, #ecc5e0, #e4a9ce 60%, #bb84ae);
  border: 1px solid #ffecf5;
  border-radius: 15px;
  position: relative;
  box-shadow:
    inset 0 2px 0 #fff9,
    0 20px 30px #b0809a26;
  overflow: hidden;
}
.fan-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#ffffff23 1px, transparent 1px),
    linear-gradient(90deg, #ffffff23 1px, transparent 1px);
  background-size: 25px 25px;
  mask-image: linear-gradient(transparent, #000);
  pointer-events: none;
}
.fan-system,
.fan-hero-foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  font: 8px var(--mono);
  letter-spacing: 1.5px;
  flex-wrap: wrap;
}
.fan-system {
  border-bottom: 1px solid #70446644;
  background: #ffffff22;
}
.fan-hero-foot {
  background: #4c2c4a;
  color: #fbe6f4;
}
.fan-hero-title {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: 30px 38px;
  gap: 20px;
  min-height: 280px;
}
.fan-hero-title p {
  font: 9px var(--mono);
  letter-spacing: 3px;
  margin: 0 0 12px;
}
.fan-hero-title h1 {
  font:
    900 clamp(46px, 6vw, 90px) / 0.85 'Barlow Condensed',
    sans-serif;
  letter-spacing: -2px;
  margin: 0 0 22px;
  color: #fff2f9;
  text-shadow:
    0 2px #bf739f,
    0 4px #a55e8a,
    0 6px #81476e,
    3px 9px 15px #69365b33;
}
.fan-hero-title > div > span {
  font-size: 12px;
}
.fan-hero-art {
  position: relative;
  padding: 28px 20px 48px;
  transform: rotate(-5deg);
  background: linear-gradient(135deg, #fff8, #e7d7e865);
  border: 1px solid #fff9;
  border-radius: 20px;
  box-shadow:
    inset 0 2px 0 #fff9,
    4px 8px 0 #8f637744,
    0 20px 25px #69435f22;
}
.fan-hero-art:before {
  content: '✧';
  position: absolute;
  left: -28px;
  top: -28px;
  font-size: 70px;
  color: #fff;
  filter: drop-shadow(2px 3px 0 #855478);
}
.fan-hero-art > img {
  display: block;
  width: 100%;
  height: 130px;
  transform: scale(1.42);
  transform-origin: center;
  background-size: contain !important;
  background-position: center !important;
  filter: drop-shadow(0 9px 8px #633b5f55);
}
.fan-hero-art .fan-sticker {
  position: absolute;
  right: 12px;
  bottom: 15px;
  padding: 10px 17px;
  border: 1px solid #8b628455;
  background: #fbe9f4;
  box-shadow: 2px 3px 0 #a06e9255;
  transform: rotate(8deg);
  font: 8px/1.5 var(--mono);
  color: #79436d;
}
.obsidus .fan-hero {
  background:
    radial-gradient(ellipse at 65% 10%, #71717488, transparent 65%),
    linear-gradient(125deg, #343437, #171719);
  border-color: #83817c;
  box-shadow:
    inset 0 2px 0 #dcd9d377,
    0 20px 30px #0005;
}
.obsidus .fan-hero-title h1 {
  color: #ddd9d0;
  text-shadow:
    0 2px #888681,
    0 4px #58564e,
    0 6px #29251e,
    3px 9px 15px #0009;
}
.obsidus .fan-hero-foot {
  background: #121214;
  color: #d7b774;
}
.obsidus .fan-hero-art {
  background:
    repeating-linear-gradient(110deg, #fff1 0 1px, #0000 1px 4px),
    linear-gradient(135deg, #6a6967, #272729 65%, #797772);
  border-color: #a5a196;
  box-shadow:
    inset 0 2px 0 #e6dfcf88,
    4px 8px 0 #080809,
    0 20px 25px #0005;
}
.obsidus .fan-hero-art:before {
  color: #d8ba7b;
  filter: drop-shadow(2px 3px #0009);
}
.obsidus .fan-hero-art .fan-sticker {
  background: #262320;
  color: #d8ba7b;
  border-color: #a08757;
}
.fan-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 28px;
  margin-top: 38px;
  align-items: start;
}
.fan-sidebar {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.member-panel {
  background: var(--fan-paper);
  border: 1px solid var(--fan-line);
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}
.fan-panel-bar {
  display: flex;
  justify-content: space-between;
  padding: 13px 15px;
  font: 8px var(--mono);
  letter-spacing: 2px;
  background: linear-gradient(#fff3, #fff0), var(--fan-metal);
  border-bottom: 1px solid var(--fan-line);
}
.member-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--fan-line);
  border-radius: 0;
  background: none;
  color: var(--fan-ink);
  padding: 16px;
  text-align: left;
}
.member-button:hover {
  background: var(--fan-soft);
}
.member-button > span:not(.fan-avatar) {
  flex: 1;
  min-width: 0;
}
.member-button b {
  font-size: 14px;
  display: block;
  overflow-wrap: anywhere;
}
.member-button small {
  display: block;
  color: var(--fan-muted);
  font: 7px var(--mono);
  letter-spacing: 2px;
  margin-top: 4px;
}
.member-button i {
  color: var(--fan-accent);
  font-style: normal;
}
.member-button em {
  color: var(--fan-muted);
  font-size: 14px;
  font-style: normal;
}
.fan-avatar {
  width: 42px !important;
  height: 42px !important;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--fan-paper);
  outline: 1px solid var(--fan-line);
  background-size: cover !important;
  background-position: center 20% !important;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fan-avatar.initials {
  background: var(--fan-soft);
  color: var(--fan-accent);
  font: 700 18px var(--mono);
}
.agency-return {
  display: block;
  text-align: center;
  padding: 15px;
  font-size: 10px;
  color: var(--fan-muted);
}
.fan-welcome {
  border: 1px solid var(--fan-line);
  background: var(--fan-paper);
  padding: 22px;
  border-radius: 12px;
  box-shadow: none;
}
.fan-welcome > span {
  font: 8px var(--mono);
  color: var(--fan-accent);
  letter-spacing: 2px;
}
.fan-welcome h2 {
  font-size: 21px;
  line-height: 1.45;
  margin: 16px 0;
}
.fan-welcome p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--fan-muted);
}
.fan-feed {
  min-width: 0;
}
.fan-community .board-connection {
  padding: 0 0 12px;
  font: 9px var(--mono);
  color: var(--fan-muted);
  border: 0;
  background: none;
}
.fan-feed-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--fan-metal);
  border: 1px solid var(--fan-line);
  border-radius: 12px;
  box-shadow: inset 0 2px 3px var(--fan-shadow);
}
.fan-feed-tabs button {
  background: transparent;
  border: 0;
  padding: 12px;
  color: var(--fan-muted);
  font: 11px var(--mono);
  border-radius: 7px;
  flex: 1;
  white-space: nowrap;
}
.fan-feed-tabs button[aria-pressed='true'] {
  background: var(--fan-paper);
  color: var(--fan-accent);
  box-shadow: none;
}
.fan-feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 26px 0 18px;
}
.fan-feed-heading h2 {
  font-size: 20px;
  line-height: 1.4;
  margin: 8px 0 0;
  color: var(--fan-ink);
}
.fan-feed-heading #feed-kicker {
  font: 8px var(--mono);
  color: var(--fan-muted);
  letter-spacing: 1.5px;
}
.fan-community .primary,
[data-kind='community-post'] .primary {
  background: var(--fan-accent);
  color: var(--fan-paper);
  border: 1px solid var(--fan-accent);
  border-radius: 8px;
  box-shadow: none;
  font-size: 11px;
  white-space: nowrap;
}
.fan-community .board-search {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
}
.fan-community input,
.fan-community select,
.fan-community .board-search button {
  background: var(--fan-paper);
  color: var(--fan-ink);
  border: 1px solid var(--fan-line);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  min-width: 0;
}
.fan-community .board-search input {
  flex: 1;
}
.fan-post-list {
  display: grid;
  gap: 20px;
}
.fan-post-list .post-row {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--fan-paper);
  border: 1px solid var(--fan-line);
  border-radius: 15px;
  padding: 24px;
  color: var(--fan-ink);
  box-shadow: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  min-width: 0;
  overflow: hidden;
}
.fan-post-list .post-row:hover {
  transform: translateY(-3px);
  box-shadow: none;
}
.fan-post-list .official-post {
  border-top: 3px solid var(--fan-accent);
}
.fan-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}
.fan-author > span {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}
.fan-author b {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.fan-author small {
  font: 7px var(--mono);
  color: var(--fan-muted);
}
.fan-author time {
  display: block;
  width: 100%;
  font: 9px var(--mono);
  color: var(--fan-muted);
}
.artist-badge {
  display: inline-block;
  font: 7px var(--mono);
  color: var(--fan-accent);
  background: var(--fan-soft);
  padding: 4px 6px;
  border-radius: 4px;
  font-style: normal;
  white-space: nowrap;
}
.fan-post-list .post-row h3 {
  font-size: 19px;
  margin: 0 0 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.feed-body {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--fan-ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.feed-counts {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--fan-line);
  padding-top: 17px;
  margin-top: 20px;
  font: 11px var(--mono);
  color: var(--fan-muted);
}
.feed-counts > b {
  margin-left: auto;
  font-size: 9px;
  font-weight: 400;
}
.feed-counts small {
  font-size: 9px;
}
.post-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 9px;
}
.post-photos img {
  width: 100%;
  height: 300px;
  display: block;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  object-fit: cover;
  -webkit-touch-callout: none;
}
.fan-empty {
  padding: 60px 24px;
  text-align: center;
  background: var(--fan-paper);
  border: 1px dashed var(--fan-line);
  border-radius: 12px;
}
.fan-empty > span {
  font-size: 45px;
  color: var(--fan-accent);
}
.fan-empty h3 {
  font-size: 16px;
  margin: 15px 0;
}
.fan-empty p {
  font-size: 12px;
  color: var(--fan-muted);
}
.fan-community .pagination {
  color: var(--fan-muted);
  gap: 12px;
}
.fan-community .pagination button {
  background: var(--fan-paper);
  color: var(--fan-ink);
  border-color: var(--fan-line);
}
.reply-context {

  background: var(--fan-soft);
  padding: 12px;
  font-size: 11px;
  color: var(--fan-muted);
  overflow-wrap: anywhere;
}
#document-dialog[data-kind='community-post'] {
  background: var(--fan-paper);
  color: var(--fan-ink);
  border: 1px solid var(--fan-line);
  border-radius: 18px;
  box-shadow: 0 30px 90px #0006;
  width: min(720px, calc(100vw - 24px));
}
#document-dialog[data-kind='community-post'] #document-title {
  color: var(--fan-ink);
  font-size: 24px;
  padding-right: 35px;
  overflow-wrap: anywhere;
}
#document-dialog[data-kind='community-post'] input,
#document-dialog[data-kind='community-post'] textarea,
#document-dialog[data-kind='community-post'] select {
  background: var(--fan-bg);
  color: var(--fan-ink);
  border-color: var(--fan-line);
  border-radius: 7px;
}
#document-dialog[data-kind='community-post'] label {
  color: var(--fan-ink);
}
#document-dialog[data-kind='community-post'] small {
  color: var(--fan-muted);
}
.fan-post-detail .post-body {
  font-size: 14px;
  line-height: 2;
  color: var(--fan-ink);
  padding: 0;
  margin: 20px 0;
  background: none;
}
.fan-post-detail .post-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0;
  border-block: 1px solid var(--fan-line);
  padding: 18px 0;
}
.fan-post-detail button:not(.primary),
.upload-preview button {
  background: var(--fan-soft);
  color: var(--fan-ink);
  border: 1px solid var(--fan-line);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 10px;
}
.fan-post-detail button[aria-pressed='true'] {
  color: var(--fan-accent);
  border-color: var(--fan-accent);
}
.fan-post-detail .post-controls a {
  font-size: 10px;
  margin: auto 0 auto auto;
  color: var(--fan-muted);
}
.fan-post-detail .comment-row {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--fan-line);
  margin: 0;
}
.fan-post-detail .comment-row.is-reply {
  margin-left: 35px;
  padding-left: 15px;

}
.fan-post-detail .comment-row p {
  font-size: 13px;
  line-height: 1.9;
  margin: 8px 0 14px;
  overflow-wrap: anywhere;
}
.comment-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fan-post-detail .comment-form {
  margin-top: 25px;
  border-color: var(--fan-line);
  background: var(--fan-bg);
  padding: 20px;
  border-radius: 10px;
}
.fan-post-detail .fan-author {
  margin-bottom: 12px;
}
.fan-post-detail .fan-author .fan-avatar {
  width: 33px !important;
  height: 33px !important;
}
.fan-post-detail #reply-target {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--fan-accent);
}
.upload-field {
  border: 1px dashed var(--fan-line);
  padding: 16px;
  border-radius: 9px;
}
.upload-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.upload-preview > div {
  min-width: 0;
}
.upload-image {
  height: 130px;
  border-radius: 7px;
  background-size: cover;
  background-position: center;
}
.upload-preview button {
  margin-top: 6px;
  width: 100%;
}
.upload-status {
  font-size: 11px;
  color: var(--fan-muted);
  margin: 8px 0 0;
}
.community-profile {
  text-align: center;
  padding: 25px;
}
.community-profile .fan-avatar {
  width: 100px !important;
  height: 100px !important;
  display: block;
  margin: 0 auto 20px;
}
.community-profile h3 {
  font-size: 26px;
}
.community-profile p {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.community-profile a {
  font-size: 11px;
  color: var(--fan-muted);
}
@media (max-width: 1000px) {
  .fan-layout {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 20px;
  }
  .fan-feed-tabs button {
    font-size: 9px;
    padding: 10px 8px;
  }
  .fan-hero-title {
    padding: 28px;
  }
  .fan-hero-title h1 {
    font-size: 65px;
  }
  .member-button {
    padding: 12px;
    gap: 10px;
  }
  .fan-community {
    padding: 22px;
  }
  .fan-feed-heading {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .fan-community {
    padding: 14px;
    border-radius: 14px;
    margin-top: 12px;
  }
  .community-switch {
    gap: 5px;
    margin-bottom: 16px;
  }
  .community-switch a {
    padding: 9px;
    font-size: 8px;
  }
  .fan-system,
  .fan-hero-foot {
    font-size: 6px;
    padding: 12px;
    letter-spacing: 0.5px;
  }
  .fan-system > span:last-child {
    display: none;
  }
  .fan-hero-title {
    padding: 24px 18px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .fan-hero-title h1 {
    font-size: clamp(42px, 12vw, 62px);
  }
  .fan-hero-title p {
    font-size: 8px;
  }
  .fan-hero-title > div > span {
    font-size: 11px;
  }
  .fan-hero-art {
    position: relative;
    right: auto;
    bottom: auto;
    width: 85%;
    margin: 0 auto 8px;
    padding: 15px 10px 32px;
    opacity: 0.85;
  }
  .fan-hero-art > img {
    height: 60px;
    transform: scale(1.55);
  }
  .fan-hero-art:before {
    font-size: 35px;
    left: -16px;
    top: -16px;
  }
  .fan-hero-art .fan-sticker {
    padding: 4px;
    font-size: 5px;
    bottom: 8px;
    right: 5px;
  }
  .fan-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
  }
  .fan-sidebar {
    gap: 15px;
  }
  .member-panel #community-members {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .member-button {
    flex-direction: column;
    padding: 14px 4px;
    gap: 8px;
    text-align: center;
    border: 0;
  }
  .member-button b {
    font-size: 11px;
  }
  .member-button small {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
  .member-button em {
    display: none;
  }
  .member-button .fan-avatar {
    width: 40px !important;
    height: 40px !important;
  }
  .agency-return {
    padding: 10px;
    border-top: 1px solid var(--fan-line);
  }
  .fan-welcome {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .fan-welcome > span {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .fan-welcome h2,
  .fan-welcome p {
    display: none;
  }
  .fan-feed-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 6px;
  }
  .fan-feed-tabs button {
    white-space: normal;
    line-height: 1.5;
    font-size: 9px;
  }
  .fan-feed-heading {
    margin-top: 22px;
    gap: 12px;
  }
  .fan-feed-heading h2 {
    font-size: 17px;
  }
  .fan-feed-heading #feed-kicker {
    font-size: 6px;
  }
  .fan-post-list .post-row {
    padding: 17px;
    border-radius: 10px;
  }
  .fan-post-list .post-row h3 {
    font-size: 17px;
  }
  .feed-body {
    font-size: 12px;
  }
  .fan-author b {
    font-size: 12px;
  }
  .fan-author time {
    font-size: 8px;
  }
  .feed-counts {
    gap: 12px;
    font-size: 10px;
  }
  .feed-counts > b {
    font-size: 8px;
  }
  .post-photos img {
    height: 200px;
  }
  .fan-post-detail .comment-row.is-reply {
    margin-left: 15px;
    padding-left: 12px;
  }
  .fan-post-detail .comment-form {
    padding: 14px;
  }
  .fan-post-detail .post-controls a {
    width: 100%;
    margin: 5px 0 0;
  }
  .fan-post-detail .post-photos {
    grid-template-columns: 1fr;
  }
  .upload-field {
    padding: 12px;
  }
  .upload-image {
    height: 100px;
  }
  .community-profile {
    padding: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fan-post-list .post-row {
    transition: none;
  }
}
html[data-motion='off'] .fan-post-list .post-row {
  transition: none;
}

/* The whole shell adopts the active group only for this route. */
html[data-community-theme='lucky'],
html[data-community-theme='lucky'] body[data-page='community'][data-viewer] {
  color-scheme: light;
  --bg: #f3e9ef;
  --surface: #fffafd;
  --surface2: #ecd4e3;
  --text: #352435;
  --muted: #806679;
  --line: #d9c4d3;
  --accent: #ba3e83;
  --accent-soft: #f4d4e7;
  --nav: #f8edf5;
  --danger: #a33b6e;
}
html[data-community-theme='obsidus'],
html[data-community-theme='obsidus'] body[data-page='community'][data-viewer] {
  color-scheme: dark;
  --bg: #141416;
  --surface: #222225;
  --surface2: #454446;
  --text: #eee9dd;
  --muted: #aaa59c;
  --line: #4c4841;
  --accent: #d7b774;
  --accent-soft: #343029;
  --nav: #19191c;
  --danger: #d7b774;
}
html[data-community-theme] {
  background: var(--bg);
}
html[data-community-theme] body[data-page='community'] {
  background-color: var(--bg);
  background-image: url('noise.svg');
  background-size: 190px;
  color: var(--text);
}
html[data-community-theme] :is(.agency-strip, .site-nav, .site-footer) {
  background: var(--nav);
  color: var(--text);
  border-color: var(--line);
}
html[data-community-theme] .site-header {
  color: var(--text);
  background: transparent;
}
html[data-community-theme] .site-nav a[aria-current='page'] {
  border-color: var(--accent);
  color: var(--accent);
}
html[data-community-theme] :is(.header-controls button, .language-controls, .floating-comms) {
  border-color: var(--line);
}
html[data-community-theme] .floating-comms {
  background: var(--surface);
  color: var(--text);
}
html[data-community-theme] .fan-community {
  margin-top: 0;
  border-color: transparent;
  box-shadow: none;
}

/* Keep the full challenge visible without the tall compact layout. */
.board-form .captcha-slot {
  width: 100%;
  max-width: 216px;
  height: 47px;
  min-width: 0;
}
.board-form .captcha-widget {
  width: 300px;
  height: 65px;
  transform-origin: top left;
}

.upload-preview > div {
  position: relative;
}
.upload-preview .attachment-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: #252126;
  color: #fff;
  border: 1px solid #ffffff90;
  font: 20px/1 sans-serif;
}
.image-url-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.image-url-row input {
  min-width: 0;
  flex: 1;
}
.image-url-row button {
  flex: none;
  font-size: 11px;
  padding: 8px;
}
.fan-community.staff,
[data-kind='community-post'][data-community='staff'] {
  --fan-bg: #f5f6f8;
  --fan-paper: #fff;
  --fan-ink: #25282d;
  --fan-muted: #737981;
  --fan-line: #e1e4e8;
  --fan-accent: #db3543;
  --fan-soft: #f8ebed;
  --fan-metal: #f3f4f6;
  background: var(--fan-bg);
  border-radius: 8px;
  box-shadow: none;
}
.staff-masthead {
  padding: 18px 0 26px;
  border-bottom: 2px solid #262a31;
}
.staff-wordmark {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1.5px;
}
.staff-wordmark > span {
  font-weight: 400;
  color: var(--fan-accent);
}
.staff-masthead p {
  font-size: 13px;
  color: var(--fan-muted);
  margin-bottom: 0;
}
.staff .fan-layout {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 35px;
  margin-top: 26px;
}
.staff-channel-nav {
  border: 1px solid var(--fan-line);
  background: #fff;
  border-radius: 6px;
  padding: 18px;
}
.staff-channel-nav > small {
  color: var(--fan-muted);
  font: 10px var(--mono);
  letter-spacing: 2px;
}
.staff-channel-nav a {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--fan-line);
  text-decoration: none;
  color: var(--fan-ink);
}
.staff-channel-nav a:last-child {
  border-bottom: 0;
}
.staff-channel-nav a[aria-current] {
  color: var(--fan-accent);
}
.staff-channel-nav b {
  display: block;
  font-size: 15px;
}
.staff-channel-nav span {
  display: block;
  font-size: 11px;
  color: var(--fan-muted);
  margin-top: 5px;
}
.staff-channel-note {
  padding: 8px 18px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--fan-muted);
}
.staff-channel-note b {
  color: var(--fan-ink);
}
.staff .fan-post-list {
  gap: 0;
  border: 1px solid var(--fan-line);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.staff .fan-post-list .post-row {
  border: 0;
  border-bottom: 1px solid var(--fan-line);
  border-radius: 0;
  box-shadow: none;
  padding: 24px;
  transform: none;
}
.staff .fan-post-list .post-row:hover {
  background: #fafafb;
  box-shadow: none;
}
.staff .fan-author {
  margin-bottom: 13px;
}
.staff .fan-author .fan-avatar {
  display: none;
}
.staff .fan-author > span {
  width: 100%;
}
.staff .fan-author time {
  width: auto;
  margin-left: auto;
}
.staff .feed-counts {
  border: 0;
  margin-top: 12px;
  padding-top: 0;
}
.staff .fan-post-list .post-row h3 {
  font-size: 18px;
}
.staff .feed-body {
  color: #646b75;
  font-size: 12px;
  -webkit-line-clamp: 2;
}
.staff .post-photos {
  max-width: 300px;
}
.staff .post-photos img {
  height: 120px;
}
.staff .fan-feed-heading {
  margin-top: 10px;
}
.staff .fan-welcome {
  display: none;
}
.staff-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}
.staff-tags span {
  font-size: 10px;
  color: #aa3745;
  background: #fff0f2;
  border: 1px solid #f0d4da;
  border-radius: 4px;
  padding: 4px 7px;
}
.staff-tag-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 14px;
}
.staff-tag-filter select {
  max-width: 100%;
  min-width: 0;
  flex: 1;
}
.staff-fields {
  display: grid;
  gap: 14px;
}
@media (max-width: 700px) {
  .staff .fan-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .staff-channel-nav {
    display: flex;
    gap: 12px;
    padding: 13px;
  }
  .staff-channel-nav > small,
  .staff-channel-note {
    display: none;
  }
  .staff-channel-nav a {
    flex: 1;
    border: 0;
    padding: 0;
  }
  .staff-channel-nav b {
    font-size: 13px;
  }
  .staff-channel-nav span {
    font-size: 9px;
  }
  .staff .fan-post-list .post-row {
    padding: 17px;
  }
  .staff .fan-author time {
    margin-left: 0;
    width: 100%;
  }
  .staff-masthead {
    padding-top: 0;
  }
  .staff-wordmark {
    font-size: 29px;
  }
}

/* Attachments retain their original proportions inside post details. */
.post-photos, .fan-post-detail .post-photos { grid-template-columns: 1fr; align-items: start; }
.post-photos img[data-preserve-ratio], .staff .post-photos img[data-preserve-ratio] { height: auto; background-size: contain; background-repeat: no-repeat; object-fit: contain; }
.staff .post-photos { max-width: 100%; }
.upload-image { background-size: contain; background-repeat: no-repeat; }
/* Plain hashtag entry and shared suggestions. */
.staff-tags .staff-hashtag { padding: 0; border: 0; background: none; color: var(--fan-accent, #556b89); font-size: 12px; }
.hashtag-editor { min-width: 0; }
.hashtag-editor input { width: 100%; }
.hashtag-editor small { display: block; margin-top: 6px; color: #687483; font-size: 12px; }
.hashtag-suggestions { max-height: 180px; overflow-y: auto; margin-top: 8px; border: 1px solid #d2d8e0; border-radius: 8px; background: #fff; }
.hashtag-suggestions[hidden] { display: none; }
.hashtag-suggestions button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 0; box-shadow: none; background: #fff; color: #32485f; text-align: left; font-size: 13px; overflow-wrap: anywhere; }
.hashtag-suggestions button:hover, .hashtag-suggestions button[aria-selected="true"] { background: #edf1f6; color: #172b45; }

.selected-hashtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected-hashtag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid #d2d8e0; border-radius: 6px; padding: 3px 7px; color: #32485f; background: #f6f7f9; overflow-wrap: anywhere; font-size: 12px; }
.selected-hashtag button { flex: 0 0 28px; min-height: 28px; padding: 2px; border: 0; box-shadow: none; background: transparent; color: #32485f; font-size: 18px; }
.hashtag-editor .hashtag-add { margin-top: 8px; padding: 6px 10px; border: 1px solid #c4cdd7; background: #f4f6f8; color: #32485f; font-size: 12px; }

.hashtag-input { display: flex; align-items: center; gap: 8px; padding-left: 12px; border: 1px solid #d2d8e0; border-radius: 8px; background: #f5f6f8; color: #687483; }
.hashtag-editor .hashtag-input textarea { resize: none; padding: 10px 8px; min-height: 44px; height: 44px; line-height: 22px; overflow-y: auto; min-width: 0; flex: 1; border: 0; background: transparent; box-shadow: none; }
.hashtag-input:focus-within { outline: 2px solid #68e8ed; outline-offset: 2px; }
