/* ═══════════════════════════════════════════════
   COMMUNITY — Corner Notes and Corner Chat
   ═══════════════════════════════════════════════ */

body.community-page .main-content {
  min-height: calc(100vh - var(--nav-height) - 126px);
  padding-top: var(--space-8);
}

body.community-page .page-header {
  display: none;
}

body.community-page .page-header__label::before {
  content: none;
}

body.community-page {
  --community-readable-font: Inter, "Apple SD Gothic Neo", "PingFang SC", "Noto Sans CJK KR", "Noto Sans CJK SC", sans-serif;
  --community-panel-bg: rgba(18, 22, 18, 0.86);
  --community-panel-bg-soft: rgba(12, 16, 12, 0.76);
  --community-line: rgba(255, 255, 255, 0.12);
  --community-line-strong: rgba(0, 255, 65, 0.22);
  --community-text-soft: rgba(238, 242, 238, 0.8);
  --community-text-dim: rgba(238, 242, 238, 0.62);
}

.community-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 2px;
  width: min(100%, 360px);
  margin-bottom: 16px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--community-line);
  border-radius: var(--card-radius);
}

.community-tab {
  position: relative;
  min-height: 40px;
  padding: 0 var(--space-3);
  color: var(--community-text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition:
    color var(--duration-fast),
    background var(--duration-fast),
    border-color var(--duration-fast),
    text-shadow var(--duration-fast);
}

.community-tab:hover,
.community-tab.active {
  color: var(--color-accent);
  background: rgba(0, 255, 65, 0.035);
  border-color: var(--color-border-accent);
  text-shadow: 0 0 10px var(--color-accent-glow);
}

.community-tab:focus-visible,
.community-action:focus-visible,
.community-back:focus-visible,
.whisper-card__open:focus-visible,
.whisper-row:focus-visible,
.community-inline-action:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 3px;
}

.community-status {
  min-height: 30px;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid var(--community-line);
  border-radius: var(--card-radius);
  color: var(--community-text-soft);
  background: rgba(255, 255, 255, 0.026);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.4px;
  line-height: 1.45;
}

.community-status:empty {
  display: none;
}

.community-status.is-ok {
  color: var(--color-accent);
  border-color: var(--color-border-accent);
  background: rgba(0, 255, 65, 0.026);
}

.community-status.is-warn {
  color: var(--color-highlight);
  border-color: rgba(255, 170, 0, 0.2);
  background: rgba(255, 170, 0, 0.025);
}

.community-status.is-error {
  color: #ff5577;
  border-color: rgba(255, 85, 119, 0.35);
  background: rgba(255, 85, 119, 0.035);
}

.community-panel {
  display: none;
}

.community-panel.active {
  display: block;
}

#whisper-list-view[hidden],
#whisper-detail[hidden],
#notice-list-view[hidden],
#notice-detail[hidden],
#reply-form[hidden],
[data-reply-open][hidden] {
  display: none !important;
}

.community-notice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.community-notice,
.whisper-card,
.whisper-detail-card,
.whisper-reply,
.community-form {
  background: var(--community-panel-bg);
  border: 1px solid var(--community-line);
  border-radius: var(--card-radius);
}

.community-notice,
.whisper-detail-card,
.whisper-reply,
.community-form {
  padding: 18px;
}

.community-notice.is-pinned {
  border-color: var(--color-border-accent);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.035);
}

.community-notice__head,
.whisper-card__top,
.whisper-card__meta,
.community-form__head,
.community-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.community-kicker,
.community-board__label {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.community-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--community-text-soft);
  border: 1px solid var(--community-line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  line-height: 1;
  text-transform: uppercase;
}

.community-author-chip strong {
  color: var(--color-accent);
  font-weight: 400;
}

.community-notice h2,
.whisper-card h2,
.whisper-detail-card h2 {
  margin-top: 10px;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 1.6px;
  line-height: 1.25;
}

.community-notice p,
.whisper-card p,
.whisper-detail-card__body,
.whisper-reply p {
  margin-top: 10px;
  color: var(--community-text-soft);
  font-size: 12px;
  line-height: 1.65;
}

.community-notice a,
.whisper-card a,
.whisper-detail-card a,
.whisper-reply a {
  color: var(--color-accent);
  overflow-wrap: anywhere;
}

.community-board {
  display: grid;
  gap: 8px;
}

.community-pinned-notes {
  display: grid;
  gap: 7px;
}

.community-pinned-notes[hidden] {
  display: none;
}

.community-pinned-notes__label {
  padding: 0 2px 2px;
  color: var(--color-highlight);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.community-pinned-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: var(--space-4);
  row-gap: 5px;
  min-height: 54px;
  padding: 10px 12px;
  background: rgba(20, 18, 10, 0.72);
  border: 1px solid rgba(255, 170, 0, 0.28);
  border-radius: var(--card-radius);
  cursor: pointer;
}

.community-pinned-note > div {
  display: contents;
}

.community-pinned-note h2 {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(244, 255, 241, 0.92);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-pinned-note.has-note-order h2 {
  grid-column: 1;
}

.community-pinned-note p {
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  margin: 0;
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-pinned-note span {
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}

.community-pinned-note__date {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  text-align: right;
  letter-spacing: var(--tracking-mono);
}

.community-pinned-note.has-note-order .community-pinned-note__date {
  grid-column: 1 / -1;
}

.community-note-order {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  gap: 4px;
}

.community-note-order button {
  display: grid;
  width: 24px;
  height: 22px;
  place-items: center;
  color: var(--color-accent);
  background: rgba(0, 255, 65, 0.06);
  border: 1px solid rgba(0, 255, 65, 0.32);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.community-note-order button:hover {
  color: var(--color-bg);
  background: var(--color-accent);
}

.community-note-order button:disabled,
.community-note-order button:disabled:hover {
  color: rgba(244, 255, 241, 0.28);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.1);
  cursor: default;
}

.community-pinned-note__tag,
.whisper-row__badge {
  color: var(--color-highlight);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.whisper-row__badge {
  flex: 0 0 auto;
}

.community-table--notes .whisper-row__title-text,
.community-table--notes .whisper-row__writer,
.community-table--notes .whisper-row__date {
  font-family: var(--font-mono);
}

.community-table--notes .whisper-row__title-text {
  font-size: 12px;
  letter-spacing: 1.2px;
}

.community-table--notes .whisper-row__writer,
.community-table--notes .whisper-row__date {
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
}

.community-table--notes {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.075);
}

.community-board__filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  background: var(--community-panel-bg-soft);
  border: 1px solid var(--community-line);
  border-radius: var(--card-radius);
}

.community-board__filters[hidden] {
  display: none;
}

.community-search {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.community-search input {
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  color: rgba(244, 255, 241, 0.9);
  background: #050505;
  border: 1px solid var(--community-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-mono);
}

.community-search input:focus {
  outline: none;
  border-color: var(--color-border-accent);
  box-shadow: 0 0 0 1px var(--color-border-accent);
}

.community-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--community-text-soft);
  border: 1px solid var(--community-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.community-filter-toggle:has(input:checked) {
  color: var(--color-accent);
  border-color: var(--color-border-accent);
  background: rgba(0, 255, 65, 0.045);
}

.community-filter-toggle input {
  position: relative;
  width: 13px;
  height: 13px;
  margin: 0;
  appearance: none;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
}

.community-filter-toggle input::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid var(--color-accent);
  border-width: 0 1px 1px 0;
  opacity: 0;
  transform: rotate(45deg);
}

.community-filter-toggle input:checked {
  background: rgba(0, 255, 65, 0.08);
  border-color: rgba(0, 255, 65, 0.4);
}

.community-filter-toggle input:checked::after {
  opacity: 1;
}

.community-board__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 52px;
  padding: 0 14px;
  background: rgba(18, 18, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--card-radius);
}

.community-form {
  display: grid;
  gap: 14px;
}

.community-compose[hidden] {
  display: none;
}

.community-form label {
  display: grid;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.community-form input,
.community-form textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3);
  color: var(--color-text);
  background: #050505;
  border: 1px solid var(--color-border-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-mono);
  text-transform: none;
}

.community-form textarea {
  resize: vertical;
}

.community-form input:focus,
.community-form textarea:focus {
  outline: none;
  border-color: var(--color-border-accent);
  box-shadow: 0 0 0 1px var(--color-border-accent);
}

.community-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.community-attach-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--community-line);
  border-radius: var(--card-radius);
}

.community-attach-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.community-tool {
  min-height: 36px;
  padding: 0 10px;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  transition:
    color var(--duration-fast),
    border-color var(--duration-fast),
    background var(--duration-fast);
}

.community-tool:hover,
.community-tool:focus-visible {
  color: var(--color-accent);
  background: rgba(0, 255, 65, 0.035);
  border-color: var(--color-border-accent);
  outline: none;
}

.community-link-field[hidden],
.community-attachment-tray[hidden] {
  display: none;
}

.community-attachment-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.community-attachment-chip {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  margin: 0;
  background: #030303;
  border: 1px solid var(--color-border);
  border-radius: 5px;
}

.community-attachment-chip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #000;
}

.community-attachment-chip figcaption {
  overflow: hidden;
  padding: 6px 8px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.community-attachment-chip button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--color-border-accent);
  border-radius: 50%;
  font-family: var(--font-mono);
  line-height: 1;
}

.community-visibility {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.community-visibility label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 34px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.community-visibility input {
  width: 13px;
  min-height: 13px;
  accent-color: var(--color-accent);
}

.community-form__foot,
.community-form__actions {
  align-items: end;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono);
}

.community-form__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-3);
}

.community-action,
.community-back {
  min-height: 38px;
  padding: 0 14px;
  color: var(--color-accent);
  border: 1px solid var(--color-border-accent);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(0, 255, 65, 0.05);
}

.community-action--muted {
  color: var(--color-text-muted);
  border-color: var(--color-border-strong);
}

.community-action:hover,
.community-back:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.community-board__list {
  display: grid;
  gap: 8px;
}

.community-board__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.community-board__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.community-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--community-text-soft);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--community-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  transition:
    color var(--duration-fast),
    background var(--duration-fast),
    border-color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.community-icon-action:hover,
.community-icon-action:focus-visible,
.community-icon-action.is-active {
  color: var(--color-accent);
  background: rgba(0, 255, 65, 0.045);
  border-color: rgba(0, 255, 65, 0.32);
  outline: none;
  box-shadow: inset 0 0 16px rgba(0, 255, 65, 0.055);
}

.community-icon-action--primary {
  color: var(--color-accent);
  border-color: rgba(0, 255, 65, 0.3);
  background: rgba(0, 255, 65, 0.055);
}

.community-action:disabled,
.community-icon-action:disabled,
.community-text-action:disabled,
.community-form button:disabled {
  color: var(--community-text-dim);
  background: rgba(255, 255, 255, 0.018);
  border-color: var(--community-line);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.45;
}

.community-action:disabled:hover,
.community-icon-action:disabled:hover,
.community-text-action:disabled:hover,
.community-form button:disabled:hover {
  color: var(--community-text-dim);
  background: rgba(255, 255, 255, 0.018);
  border-color: var(--community-line);
}

.community-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
}

.community-pagination button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--color-accent);
  background: rgba(0, 255, 65, 0.025);
  border: 1px solid var(--color-border-accent);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.community-pagination button:disabled {
  color: var(--color-text-muted);
  border-color: var(--color-border);
  background: transparent;
  cursor: default;
  opacity: 0.45;
}

.community-action--primary {
  min-width: 148px;
  min-height: 42px;
  border-color: rgba(0, 255, 65, 0.35);
  background: rgba(0, 255, 65, 0.06);
  box-shadow: inset 0 0 18px rgba(0, 255, 65, 0.08), 0 0 0 1px rgba(0, 255, 65, 0.04);
}

.community-action--danger {
  color: #ff6b7f;
  border-color: rgba(255, 107, 127, 0.38);
  background: rgba(255, 107, 127, 0.045);
}

.community-action--danger:hover {
  color: #ff8da0;
  border-color: rgba(255, 107, 127, 0.55);
  background: rgba(255, 107, 127, 0.075);
}

.community-confirm[hidden] {
  display: none;
}

.community-confirm {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.community-confirm__panel {
  width: min(100%, 430px);
  padding: var(--space-5);
  background: rgba(12, 12, 12, 0.98);
  border: 1px solid rgba(0, 255, 65, 0.16);
  border-radius: var(--card-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.56), inset 0 0 22px rgba(0, 255, 65, 0.025);
}

.community-confirm__panel h2 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: 1.4px;
}

.community-confirm__panel p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-family: var(--community-readable-font);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.community-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.whisper-list {
  display: block;
}

#notice-list {
  display: grid;
  gap: 8px;
}

.community-table {
  border: 1px solid var(--community-line);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--community-panel-bg-soft);
}

.community-table__head,
.whisper-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: var(--space-4);
  row-gap: 5px;
}

.community-table__head {
  min-height: 42px;
  padding: 0 14px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-strong);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.whisper-row {
  min-height: 54px;
  padding: 9px 14px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--community-line);
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

.whisper-row:last-child {
  border-bottom: 0;
}

.whisper-row:hover {
  background: rgba(0, 255, 65, 0.055);
}

.whisper-row__num,
.whisper-row__writer,
.whisper-row__date,
.whisper-row__replies {
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
}

.whisper-row__num,
.whisper-row__replies {
  text-align: center;
}

.whisper-row__title {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 1;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.whisper-row.has-note-order .whisper-row__title {
  grid-column: 1;
}

.whisper-row__title-text {
  min-width: 0;
  overflow: hidden;
  color: rgba(244, 255, 241, 0.9);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whisper-row:hover .whisper-row__title-text {
  color: var(--color-accent);
}

.whisper-row__count {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.whisper-row__writer,
.whisper-row__date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whisper-row__writer {
  grid-column: 1;
  grid-row: 2;
}

.whisper-row__date {
  grid-column: 2;
  grid-row: 2;
  text-align: right;
}

.whisper-card {
  overflow: hidden;
  transition: border-color var(--duration-fast), transform var(--duration-fast);
}

.whisper-card:hover {
  border-color: var(--color-border-accent);
  transform: translateY(-1px);
}

.whisper-card__open {
  display: block;
  width: 100%;
  padding: var(--space-5);
  color: inherit;
  text-align: left;
}

.whisper-card__top,
.whisper-card__meta {
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono);
}

.whisper-detail-card__body {
  color: rgba(244, 255, 241, 0.86);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.35px;
  line-height: 1.68;
}

.whisper-card__meta--detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: 10px;
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  line-height: 1.35;
}

.community-content-embeds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 180px));
  gap: 8px;
  max-width: 420px;
  margin-top: 12px;
}

.community-content-embeds img,
.community-content-embeds video,
.community-link-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #000;
}

.community-content-embeds .community-media-item--sticker {
  object-fit: contain;
  padding: 14px;
  background: rgba(0, 0, 0, 0.44);
}

.community-inline-link {
  display: block;
  grid-column: 1 / -1;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 1.2px;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.22);
  text-underline-offset: 3px;
}

.community-inline-link:hover {
  color: var(--color-accent);
}

.community-body-link {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.22);
  text-underline-offset: 3px;
}

.community-body-link:hover {
  color: var(--color-accent);
}

.community-inline-link span {
  display: inline-block;
  margin-right: 8px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-decoration: none;
  text-transform: uppercase;
}

.community-link-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.community-link-preview span {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  padding: 2px var(--space-2);
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--color-border-accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.community-empty {
  min-height: 88px;
  padding: 18px;
  color: var(--community-text-soft);
  background: var(--community-panel-bg-soft);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--card-radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.8px;
  display: flex;
  align-items: center;
}

.community-detail {
  width: 100%;
}

.community-detail__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.community-detail__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.community-detail__toolbar .community-action,
.community-detail__toolbar .community-back {
  min-height: 38px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.community-detail__toolbar .community-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
}

.community-detail__toolbar .community-back::before {
  content: '← ';
}

.community-detail__toolbar .community-back:hover {
  color: var(--color-accent);
  background: transparent;
  border-color: transparent;
}

.whisper-replies {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.whisper-replies h3 {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.community-form--reply {
  margin-top: var(--space-5);
}

@media (max-width: 820px) {
  body.community-page .main-content {
    padding-top: var(--space-6);
  }

  .community-notice-list {
    grid-template-columns: 1fr;
  }

  .community-form__row {
    grid-template-columns: 1fr;
  }

  .community-attach-toolbar {
    grid-template-columns: 1fr;
  }

  .community-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-tab {
    padding: 0 var(--space-3);
  }

  .community-board__footer {
    grid-template-columns: 1fr;
  }

  .community-board__filters {
    grid-template-columns: 1fr;
  }

  .community-board__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .community-filter-toggle,
  .community-action--primary,
  .community-icon-action {
    width: 100%;
  }

  .community-pinned-note {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .community-pagination {
    justify-content: space-between;
  }

  .community-confirm__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .community-notice__head,
  .whisper-card__top,
  .whisper-card__meta,
  .community-form__head,
  .community-form__foot,
  .community-detail__toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-detail__actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .community-thread__post-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
  }

  .community-thread__tools {
    justify-content: flex-end;
    width: auto;
  }

  .community-action,
  .community-form__actions {
    width: 100%;
  }

  .community-form__actions {
    justify-content: stretch;
  }

  .community-table {
    border: 0;
    background: transparent;
  }

  .community-table__head {
    display: none;
  }

  .whisper-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: var(--space-2);
    row-gap: 5px;
    min-height: 58px;
    margin-bottom: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--card-radius);
    background: rgba(18, 18, 18, 0.72);
  }

  .whisper-row__date {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .whisper-row__writer {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    text-align: left;
  }

  .whisper-row__title {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .whisper-row__title-text {
    white-space: nowrap;
  }
}

/* Thread view: post and replies sit directly on the page, with light separators. */
.community-thread {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.community-thread__post {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--community-line);
}

.community-thread__post-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.community-field-label {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.community-thread__post h2 {
  min-width: 0;
  margin: 0;
  color: rgba(244, 255, 241, 0.94);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 1.2px;
  line-height: 1.36;
}

.community-thread__tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.community-heart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  color: rgba(0, 255, 65, 0.72);
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.24);
  border-radius: 999px;
  font-family: var(--font-mono);
  box-shadow: inset 0 0 14px rgba(0, 255, 65, 0.035);
}

.community-heart-button span {
  color: inherit;
  font-size: 15px;
  line-height: 1;
}

.community-heart-button em {
  display: none;
}

.community-heart-button:hover,
.community-heart-button.is-liked {
  color: var(--color-accent);
  border-color: rgba(0, 255, 65, 0.55);
  background: rgba(0, 255, 65, 0.055);
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.16), inset 0 0 14px rgba(0, 255, 65, 0.055);
}

.community-heart-button:hover span,
.community-heart-button.is-liked span,
.community-heart-button.is-liked em {
  color: var(--color-accent);
}

.community-thread .whisper-replies {
  display: block;
  gap: 0;
  margin-top: 0;
}

.whisper-replies__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.community-thread .whisper-replies h3 {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  border-bottom: 0;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: none;
}

.community-thread .whisper-replies h3 span {
  color: var(--color-text);
  font-size: 18px;
}

.whisper-replies__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.whisper-replies__sort button {
  min-height: 0;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: var(--tracking-mono);
}

.whisper-replies__sort button::before {
  content: "✓";
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.28);
}

.whisper-replies__sort button.active,
.whisper-replies__sort button.active::before,
.whisper-replies__sort button:hover {
  color: var(--color-accent);
}

.whisper-reply-list {
  display: grid;
}

.community-thread .whisper-reply {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.community-thread .whisper-reply:has(.whisper-reply__menu[open]) {
  z-index: 8;
}

.whisper-reply__main {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--community-line);
}

.whisper-reply__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--community-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.whisper-reply__author {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: rgba(244, 255, 241, 0.9);
  font-size: 10px;
  line-height: 1.35;
}

.whisper-reply__author em {
  color: var(--color-text-muted);
  font-style: normal;
}

.whisper-reply__main p {
  margin-top: var(--space-2);
  color: rgba(244, 255, 241, 0.84);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.35px;
}

.whisper-reply__children {
  position: relative;
  margin-left: var(--space-5);
  border-left: 0;
}

.whisper-reply__children::before {
  content: none;
}

.community-inline-action {
  min-height: 0;
  padding: 0;
  color: var(--color-accent);
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  opacity: 0.82;
}

.whisper-reply__side {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-align: right;
}

.whisper-reply__menu {
  position: relative;
  z-index: 2;
}

.whisper-reply__menu summary {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: rgba(0, 255, 65, 0.72);
  border: 1px solid rgba(0, 255, 65, 0.22);
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1;
  list-style: none;
  background: rgba(0, 255, 65, 0.035);
  box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.035);
}

.whisper-reply__menu summary::-webkit-details-marker {
  display: none;
}

.whisper-reply__menu summary:hover,
.whisper-reply__menu[open] summary {
  color: var(--color-accent);
  border-color: rgba(0, 255, 65, 0.55);
  background: rgba(0, 255, 65, 0.09);
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.22), inset 0 0 14px rgba(0, 255, 65, 0.08);
}

.whisper-reply__menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  min-width: 96px;
  padding: 4px;
  background: rgba(8, 8, 8, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.62);
}

.whisper-reply:nth-last-child(-n + 2) > .whisper-reply__main .whisper-reply__menu-panel,
.whisper-reply__menu.is-menu-up .whisper-reply__menu-panel {
  top: auto;
  bottom: calc(100% + 4px);
}

.whisper-reply__menu-panel button {
  min-height: 28px;
  padding: 0 var(--space-3);
  color: var(--color-text);
  border: 0;
  border-radius: 3px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-align: left;
  text-transform: uppercase;
}

.whisper-reply__menu-panel button:hover {
  color: var(--color-accent);
  background: rgba(0, 255, 65, 0.08);
}

.community-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.community-text-action {
  min-height: 0;
  padding: 0;
  color: rgba(0, 255, 65, 0.78);
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.community-text-action:hover,
.community-text-action:focus-visible {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.32);
  outline: none;
}

.community-inline-actions .community-text-action + .community-text-action::before {
  content: "/";
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.18);
}

.whisper-reply__main p .whisper-reply__mention {
  color: var(--color-text-muted) !important;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-decoration: none;
}

.whisper-reply__main p .whisper-reply__mention:hover {
  color: var(--color-text-muted) !important;
}

.community-owner-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.community-inline-action:hover {
  color: var(--color-accent-hover);
  background: transparent;
  opacity: 1;
}

.community-empty--compact {
  margin: var(--space-4) var(--space-5);
}

@media (max-width: 820px) {
  .whisper-replies__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .whisper-replies__sort {
    flex-wrap: wrap;
  }

  .whisper-reply__children {
    margin-left: var(--space-4);
  }

  .whisper-reply__side {
    align-items: center;
    text-align: left;
  }
}
