@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/public/guide-fonts/Inter-latin.woff2") format("woff2");
}
:root {
  color-scheme: dark;
  --bg-deep: #080b1e;
  --bg-card: #0f1332;
  --bg-input: #0a0d24;
  --border: #1a1f4a;
  --text-dim: #8f95bf;
  --accent-1: #7b2ff7;
  --accent-2: #00d4ff;
  --button-ink: #06141d;
  --accent-1-rgb: 123, 47, 247;
  --accent-2-rgb: 0, 212, 255;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --bg: var(--bg-deep);
  --panel: var(--bg-card);
  --line: var(--border);
  --text: #e0e0e0;
  --muted: var(--text-dim);
  --accent: var(--accent-2);
  --ink: var(--button-ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 600;
}
button:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-input));
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 44px;
  caret-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  resize: none;
  line-height: 1.5;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
::selection {
  background: var(--accent);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.primary:hover {
  background: color-mix(in srgb, var(--accent) 80%, white);
}
.text-button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.community-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 960px;
  margin: auto;
  border-inline: 1px solid var(--line);
  background: var(--bg);
  padding-top: env(safe-area-inset-top);
}
.community-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 18px;
  flex-shrink: 0;
}
.artist-icon {
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}
.identity {
  min-width: 0;
  flex: 1;
}
.identity h1 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.identity a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  flex: 0 0 44px;
  padding: 0;
  background: transparent;
}
.channels {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 0 24px 12px;
}
.channels button {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  border-radius: 8px;
  min-width: 0;
}
.channels button[aria-pressed="true"] {
  background: var(--bg-input);
  color: var(--text);
}
.channels span {
  font-size: 11px;
  margin-left: 5px;
}
.status {
  margin: 0;
  padding: 0 24px;
  color: #ffbead;
  font-size: 13px;
  line-height: 1.5;
  flex-shrink: 0;
}
.status:not(:empty) {
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.conversation {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #454d59 transparent;
  scrollbar-width: thin;
  padding: 24px;
  scroll-padding-bottom: 24px;
}
.welcome {
  max-width: 390px;
  margin: clamp(10px, 4vh, 48px) auto 24px;
}
.welcome-mark {
  color: var(--accent);
  margin-bottom: 22px;
}
.welcome-mark svg {
  width: 46px;
  height: 46px;
  stroke-width: 1.5;
}
.welcome h2,
.empty-state h2 {
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0 0 12px;
}
.welcome p,
.empty-state p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.welcome form {
  margin-top: 24px;
}
.welcome label {
  display: block;
  margin: 14px 0 7px;
  font-size: 13px;
  font-weight: 600;
}
.welcome form .primary {
  width: 100%;
  margin-top: 20px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.auth-links button {
  font-size: 12px;
  padding-inline: 0;
}
.legal-note {
  font-size: 11px !important;
  line-height: 1.6;
}
.empty-state {
  text-align: center;
  padding: clamp(20px, 8vh, 90px) 16px;
}
.empty-state h2 {
  font-size: 24px;
}
.message {
  padding: 16px 0;
  border-bottom: 1px solid #1d2026;
  overflow-wrap: anywhere;
  scroll-margin: 16px;
}
.message:last-child {
  border-bottom: 0;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  font-size: 13px;
}
.message-author {
  font-weight: 700;
}
.creator-mark {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.message time {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.message-text {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0;
  max-width: 72ch;
}
.message-gif {
  display: block;
  max-width: min(240px, 100%);
  max-height: 240px;
  border-radius: 10px;
  margin: 10px 0;
  object-fit: contain;
}
.message audio,
.message video {
  width: min(100%, 520px);
  display: block;
  margin: 12px 0;
  border-radius: 8px;
  max-height: 390px;
  background: #000;
}
.message-reply {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}
.message-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.message-actions button {
  font-size: 12px;
  padding: 5px 9px;
  min-height: 36px;
  background: transparent;
  border-color: transparent;
}
.message-actions .reaction {
  background: var(--bg-input);
  border-color: var(--line);
  min-width: 42px;
}
.message-actions .reaction[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-input));
}
.reaction-picker {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.reaction-picker button {
  font-size: 20px;
  min-width: 44px;
}
.message details {
  display: inline-block;
}
.message summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  padding: 10px;
  min-height: 36px;
}
.message details > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.pinned-label {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
}
.delivery {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.message:target,
.message.highlight {
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-input));
  border-radius: 8px;
  padding-inline: 12px;
}
.composer {
  padding: 14px 24px 10px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--bg-card);
}
.composer textarea {
  border: 0;
  background: transparent;
  padding: 4px 0 10px;
  max-height: 140px;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.composer-tools .muted {
  flex: 1;
  text-align: right;
}
.composer-tools .primary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.composer-tools svg {
  width: 18px;
}
.upload-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  min-height: 44px;
  padding: 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.upload-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.upload-label:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.attachment-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0 10px;
}
.read-only {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
}
.community-credit {
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  text-align: center;
  flex-shrink: 0;
  background: var(--bg-card);
}
.community-credit a {
  font-size: 11px;
  font-weight: 600;
  color: #b4bac5;
  text-decoration: none;
}
.community-credit a:hover {
  color: #fff;
}
.settings-panel {
  padding: 16px 24px;
  background: #11151b;
  border-block: 1px solid var(--line);
  max-height: 45dvh;
  overflow: auto;
}
.settings-panel h2 {
  font-size: 15px;
  margin: 0 0 6px;
}
.settings-panel p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.settings-row > div {
  flex: 1;
}
.settings-row label {
  font-size: 13px;
}
.settings-row select {
  width: auto;
  max-width: 60%;
  font-size: 12px;
}
.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-actions button {
  font-size: 12px;
}
.install-dialog {
  color-scheme: light;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #b9c2ce;
  border-radius: 20px;
  background: #e8edf4;
  color: #202630;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.install-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.install-dialog {
  color-scheme: light;
  --accent: #0069cf;
  --ink: #fff;
}
.install-dialog h2 {
  margin: 0 0 12px;
  font-size: 21px;
  overflow-wrap: anywhere;
}
.install-dialog p,
.install-dialog li {
  font-size: 14px;
  line-height: 1.55;
}
.install-dialog ol {
  padding-left: 24px;
}
.install-dialog li + li {
  margin-top: 12px;
}
.install-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.install-heading h2 {
  flex: 1;
  min-width: 0;
}
.install-heading button {
  flex: none;
  padding: 10px;
  width: 44px;
}
.install-link input {
  margin-block: 8px;
}
.install-dialog button,
.install-dialog input {
  color: #202630;
  background: #f5f7fa;
  border-color: #b9c2ce;
}
.install-dialog .primary {
  background: #0069cf;
  color: #fff;
  border-color: #0069cf;
}
.setup-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.admission-dialog { width: min(540px, calc(100vw - 24px)); }
.admission-dialog label, #applicationFields label { display: block; font-size: 14px; font-weight: 650; margin: 16px 0 8px; }
.admission-dialog textarea, .admission-dialog select { width: 100%; font: inherit; font-size: 16px; background: #f5f7fa; color: #202630; border: 1px solid #8998ab; border-radius: 10px; padding: 12px; }
.admission-dialog textarea, #applicationFields textarea { resize: vertical; min-height: 76px; }
.admission-dialog h3 { margin: 24px 0 8px; font-size: 18px; }
.admission-dialog .muted { color: #495260; }
.admission-tabs, .admission-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admission-tabs button { flex: 1; }
.admission-tabs [aria-pressed="true"] { background: #d5e3f4; border-color: #5c7797; }
.admission-actions select { flex: 1; min-width: 150px; width: auto; }
.admission-question { padding-bottom: 16px; }
.admission-remove { margin-top: 8px; font-size: 13px; }
#saveAdmission { margin-top: 24px; width: 100%; }
.admission-request { padding: 8px 0 24px; border-bottom: 1px solid #b9c2ce; }
.admission-request dt { margin-top: 16px; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.admission-request dd { margin: 6px 0 16px; line-height: 1.55; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
#applicationForm { text-align: left; }
.install-dialog .setup-note {
  color: #495260;
  margin-bottom: 0;
}
.creator-install { flex: none; font-size: 11px; padding: 8px; min-height: 44px; }
.record-preview { display: block; width: 100%; max-height: 34dvh; margin-top: 16px; border-radius: 12px; }
video.record-preview { background: #000; }
.record-timer { font-variant-numeric: tabular-nums; text-align: center; }
.announcement-link { display: inline-block; margin-bottom: 8px; color: #164b82; font-size: 12px; text-underline-offset: 3px; }
.message.mine .announcement-link { color: #fff; }
.gif-panel {
  padding: 12px 24px;
  max-height: 40dvh;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #151920;
}
.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}
.gif-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}
.gif-grid button {
  padding: 0;
  border: 0;
  background: var(--bg-input);
  overflow: hidden;
  height: 90px;
}
.gif-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.giphy-credit {
  font-size: 11px;
  color: var(--muted);
}
.report-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.report-row p {
  font-size: 14px;
  line-height: 1.5;
}
.report-row button {
  margin-right: 8px;
}
@media (max-width: 600px) {
  .community-shell {
    border: 0;
  }
  .community-header {
    padding: calc(16px + 0px) 16px 14px;
    gap: 12px;
  }
  .identity h1 {
    font-size: 18px;
  }
  .artist-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .channels {
    padding: 0 16px 10px;
  }
  .channels button {
    flex: 1;
    font-size: 13px;
  }
  .conversation {
    padding: 18px 16px;
  }
  .composer {
    padding: 12px 16px 6px;
  }
  .status {
    padding-inline: 16px;
  }
  .settings-panel,
  .gif-panel {
    padding-inline: 16px;
  }
  .settings-row {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .settings-row select {
    max-width: 100%;
  }
  .settings-row > div {
    flex-basis: 100%;
  }
  .settings-row p {
    margin: 4px 0;
  }
  .composer-tools button {
    padding-inline: 11px;
  }
  .composer-tools .muted {
    font-size: 12px;
  }
  .upload-label {
    font-size: 11px;
    padding-inline: 7px;
  }
  .message time {
    font-size: 12px;
  }
  .welcome {
    margin-top: 16px;
  }
  .welcome h2 {
    font-size: 26px;
  }
  .gif-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .community-credit {
    padding-top: 8px;
  }
  .message-actions button {
    min-height: 44px;
  }
  .message summary {
    min-height: 44px;
  }
  .reaction-picker button {
    min-height: 44px;
  }
  .auth-links {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s ease-out,
      border-color 0.15s ease-out;
  }
  .message.highlight {
    animation: highlight-fade 1.5s ease-out;
  }
  @keyframes highlight-fade {
    from {
      background: #234652;
    }
    to {
      background: color-mix(in srgb, var(--accent) 15%, var(--bg-input));
    }
  }
}

/* Subscriptions keep the conversation visible behind a compact payment picker. */
.composer-tools .subscribe-button { font-size: 12px; padding-inline: 10px; min-height: 44px; flex-shrink: 0; color: #164b82; background: #e8edf4; border-color: #a7b2c2; }
.subscription-dialog { width: min(480px, calc(100vw - 24px)); padding: 22px; color: #202630; background: #f5f7fa; }
.subscription-dialog .install-heading { align-items: center; }
.subscription-dialog h2 { margin: 0; font-size: 21px; line-height: 1.25; }
.subscription-dialog h2:focus { outline: none; }
.subscription-dialog .subscription-status { color: #36465c; margin: 12px 0; }
.subscription-status:empty { display: none; }
.subscription-dialog .tier-description { color: #36465c; margin: 16px 0; }
.subscription-tiers { display: grid; gap: 10px; margin-top: 20px; }
.subscription-dialog .subscription-tier { width: 100%; padding: 15px; border-radius: 14px; background: #fff; border: 1px solid #a7b2c2; text-align: left; }
.subscription-dialog .subscription-tier:hover { background: #edf3fb; border-color: #245bc4; }
.tier-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; }
.tier-number { font-size: 11px; color: #42516a; }
.tier-name { font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.tier-monthly { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; color: #164b82; }
.subscriber-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 12px 0 0; color: #202630; }
.subscriber-avatar { display: grid; place-items: center; background: #e2e8f1; border-radius: 50%; width: 28px; height: 28px; font-size: 12px; flex-shrink: 0; }
.subscriber-name { font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.subscriber-mark { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; color: #164b82; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.subscriber-mark img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; background: #000; flex-shrink: 0; }
.message-meta .subscriber-mark { max-width: 100%; }
.subscription-dialog .tier-price { margin: 18px 0 14px; font-size: 22px; font-weight: 650; color: #164b82; font-variant-numeric: tabular-nums; }
.subscription-dialog .subscription-caption { font-size: 12px; color: #42516a; margin-bottom: 0; }
.tier-benefits { margin: 20px 0; padding-left: 20px; color: #25364b; }
.subscription-dialog .tier-benefits li + li { margin-top: 8px; }
.subscription-dialog .subscription-back { margin-top: 16px; padding: 8px 0; min-height: 44px; background: none; border: 0; color: #164b82; text-decoration: underline; text-underline-offset: 3px; }
.subscription-purchase { margin-top: 24px; padding-top: 12px; border-top: 1px solid #c1cad8; }
.subscription-dialog .subscription-note { font-size: 12px; color: #42516a; line-height: 1.6; }
.subscription-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; padding-block: 12px; min-height: 44px; }
.subscription-consent input { width: 20px; height: 20px; min-height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: #245bc4; }
.subscription-consent a { color: #164b82; text-underline-offset: 2px; }
.subscription-dialog .subscription-pay { width: 100%; margin-top: 10px; background: #245bc4; border-color: #245bc4; color: #fff; font-size: 14px; }
.subscription-actions { display: grid; gap: 10px; margin-top: 20px; }
.community-page #rolloutCheckout { width: min(480px, calc(100% - 24px)); color-scheme: light; background: #f5f7fa; color: #202630; border-color: #a7b2c2; border-radius: 20px; box-shadow: 0 18px 48px #0003; }
.community-page #rolloutCheckout h2, .community-page #rolloutCheckout .rhPayClose { color: #202630; }
.community-page #rolloutCheckout .rhPayStatus, .community-page #rolloutCheckout .rhPayPolicies, .community-page #rolloutCheckout .rhPayPolicies a { color: #36465c; }
.community-page #rolloutCheckout .rhPayClose { border-color: #a7b2c2; }
.community-page #rolloutCheckout .rhPayCheck { color: #fff; background: #245bc4; border-color: #245bc4; }
.community-page #rolloutCheckout button:focus-visible { outline-color: #154baa; }
.subscription-dialog button:focus-visible, .subscription-dialog input:focus-visible { outline: 2px solid #154baa; outline-offset: 3px; }
@media (max-width: 420px) {
  .subscription-dialog { padding: 18px; max-height: calc(100dvh - 32px); }
  .subscription-dialog h2 { font-size: 19px; }
  .subscription-dialog .subscription-tier { padding: 12px; }
  .tier-heading { grid-template-columns: 1fr auto; gap: 4px 8px; }
  .tier-number { grid-column: 1 / -1; }
  .tier-name { font-size: 15px; }
}

/* The supplied silver chat reference governs the community controls.
   The creator's existing artwork and palette remain on the outer page. */
body {
  padding: 18px;
  background: var(--bg-deep);
  isolation: isolate;
}
.community-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: var(--community-frame-opacity, 1);
}
.community-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.community-shell {
  --bg: #e5e9f0;
  --panel: #e5e9f0;
  --bg-card: #e5e9f0;
  --bg-input: #e9edf3;
  --border: #cbd2dc;
  --line: #cbd2dc;
  --text: #202630;
  --text-dim: #586372;
  --muted: #4c586a;
  --accent: #0069cf;
  --ink: #ffffff;
  color-scheme: light;
  color: var(--text);
  position: relative;
  height: auto;
  min-height: calc(100dvh - 36px);
  max-width: 1240px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    inset 2px 2px 3px #fff,
    16px 20px 44px rgba(20, 20, 20, 0.28);
}
.community-shell::before {
  content: "";
  height: 3px;
  flex: 0 0 3px;
  background: var(--gradient);
}
.community-banner {
  flex: 0 0 auto;
  background: var(--bg-deep);
}
.community-banner img {
  display: block;
  width: 100%;
  height: auto;
}
.community-header {
  padding: 10px 18px;
  background: linear-gradient(145deg, #f2f4f8, #e2e6ee);
}
.artist-icon {
  object-fit: contain;
  border-radius: 50%;
  background: #edf2f8;
  padding: 3px;
  box-shadow:
    5px 6px 12px #c4c4c4,
    -4px -4px 10px #fff;
}
/* This light transparent logo needs its own dark backing. */
#artistIcon[src^="/unclereece/logo-sm"] {
  background: #000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}
.identity h1 {
  font-weight: 600;
}
.identity a {
  color: #4d6179;
}
.community-workspace {
  display: flex;
  flex: 1 0 600px;
  height: max(600px, 65dvh);
  min-height: 0;
}
.community-room {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #e5e9f0;
}
.channels {
  flex-direction: row;
  flex-wrap: wrap;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  padding: 3px;
  gap: 4px;
  border: 0;
  min-width: 0;
  border-radius: 12px;
  background: #dce2eb;
}
.community-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  flex-shrink: 0;
  padding: 0 18px 8px;
  border-bottom: 1px solid var(--border);
}
.community-navigation > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
  font-size: 12px;
  color: #4d6179;
  white-space: nowrap;
  text-decoration-thickness: 1px;
}
.channel-heading {
  font-size: 13px;
  font-weight: 600;
  margin: 0 14px 10px;
  color: #4d5868;
}
.channel-filters {
  display: flex;
  padding: 5px;
  margin: 0 6px 12px;
  border-radius: 26px;
  background: #dce1ea;
  box-shadow:
    inset 3px 3px 7px #c7c7c7,
    inset -3px -3px 7px #fbfbfb;
}
.channels .channel-filters button {
  min-height: 38px;
  min-width: 70px;
  padding: 6px 14px;
  border-radius: 22px;
  justify-content: center;
  font-size: 15px;
  font-weight: 400;
}
.channels .channel-filters button[aria-pressed="true"] {
  background: linear-gradient(135deg, #fff, #e9edf4);
  box-shadow:
    3px 5px 9px #c1c1c1,
    -2px -2px 6px #fff;
}
#noUnreadChannels {
  padding: 0 12px;
  font-size: 13px;
}
.channels button {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  text-align: left;
  gap: 6px;
  padding: 8px 10px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}
.channels button[aria-pressed="true"] {
  color: #171d27;
  background: #f8fafc;
  box-shadow: 0 2px 4px rgba(35, 45, 60, 0.12);
}
.channels span {
  margin: 0;
}
.channel-symbol {
  display: none;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  color: #196fba;
  background: linear-gradient(135deg, #f4faff, #c0ddec);
  box-shadow:
    3px 5px 10px rgba(126, 126, 126, 0.25),
    -3px -3px 7px #fff;
  flex: 0 0 auto;
}
.channel-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex-shrink: 0;
}
.channel-copy strong {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.channel-copy small {
  display: none;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.unread-badge {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 28px;
  border-radius: 9px;
  padding: 0 6px;
  background: linear-gradient(145deg, #e32450, #c90d39);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow:
    0 5px 12px rgba(80, 80, 80, 0.22),
    inset 1px 1px rgba(255, 255, 255, 0.3);
}
.channels .unread-badge {
  flex: 0 0 auto;
  margin-left: 0;
  min-width: 18px;
  height: 20px;
  border-radius: 6px;
  font-size: 10px;
  padding: 0 4px;
}
.conversation {
  padding: 28px 68px;
}
.message,
.message.mine {
  position: relative;
  width: fit-content;
  min-width: min(100%, 240px);
  max-width: min(92%, 560px);
  padding: 0;
  margin: 0 auto 24px 0;
  border: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.message.mine {
  margin-left: auto;
  margin-right: 0;
}
.message-meta {
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 9px;
}
.message-author {
  font-size: 14px;
  font-weight: 600;
}
.message time {
  color: #596575;
  font-size: 12px;
}
.message.mine .message-meta {
  justify-content: flex-end;
}
.message.mine time {
  margin-left: 0;
}
.creator-mark {
  color: #1464ac;
  font-size: 11px;
}
.message-content {
  padding: 16px 18px;
  border-radius: 23px;
  background: linear-gradient(140deg, #f1f3f7, #d7dce5);
  box-shadow:
    8px 10px 18px rgba(127, 127, 127, 0.32),
    -6px -6px 14px rgba(255, 255, 255, 0.95),
    inset 1px 1px 2px #fff;
}
.message.mine .message-content {
  color: #fff;
  background: linear-gradient(130deg, #0058d4, #0076ce);
  box-shadow:
    7px 10px 18px rgba(80, 80, 80, 0.24),
    -3px -3px 9px rgba(255, 255, 255, 0.7),
    inset 0 1px 2px rgba(255, 255, 255, 0.65);
}
.message-text {
  font-size: 17px;
  line-height: 1.5;
}
.message-avatar {
  position: absolute;
  top: 31px;
  left: -52px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #effbff, #c0d9e6);
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #244b68;
  font-size: 13px;
  font-weight: 600;
  object-fit: contain;
  padding: 2px;
  box-shadow:
    4px 5px 10px rgba(118, 118, 118, 0.26),
    -3px -3px 8px rgba(255, 255, 255, 0.8);
}
.message.mine .message-avatar {
  left: auto;
  right: -52px;
  background: linear-gradient(135deg, #d8eaff, #bbd0ed);
}
.message .message-avatar.creator-avatar {
  background: #000;
}
.moderation-tabs,
.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 14px;
}
.moderation-tabs button,
.member-actions button {
  min-height: 44px;
  font-size: 13px;
}
.moderation-tabs [aria-pressed="true"] {
  background: #fff;
  color: #163d6c;
}
.report-row strong {
  overflow-wrap: anywhere;
}
.message-actions {
  gap: 1px;
  margin-top: 8px;
}
.message.mine .message-actions {
  justify-content: flex-end;
}
.message-actions button,
.message summary {
  min-height: 44px;
  color: #505d70;
  box-shadow: none;
}
.message-content .message-reply {
  color: inherit;
  opacity: 0.9;
  border: 1px solid currentColor;
  padding: 6px 9px;
}
.message-content > .message-play {
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  box-shadow: none;
  padding: 8px 12px;
}
.message:target .message-content,
.message.highlight .message-content {
  outline: 2px solid #0069cf;
  outline-offset: 4px;
}
button,
.upload-label {
  border-radius: 14px;
}
.icon-button {
  background: linear-gradient(135deg, #f5f7fa, #dce2eb);
  box-shadow:
    4px 5px 10px #c7c7c7,
    -4px -4px 9px #fff;
  border: 1px solid #e5eaf1;
}
.primary {
  color: #fff;
  background: linear-gradient(135deg, #0058d4, #0076ce);
  border: 0;
  box-shadow:
    4px 5px 10px rgba(80, 80, 80, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}
.primary:hover {
  background: #0058bb;
}
.composer {
  padding: 16px 24px 12px;
  border-top: 1px solid var(--border);
  background: #e5e9f0;
}
.composer textarea {
  color: #263444;
  background: #e3e8f0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow:
    inset 4px 4px 8px #cbcbcb,
    inset -4px -4px 8px #fff;
}
.composer-tools {
  padding-top: 12px;
}
.composer-tools .icon-button {
  background: transparent;
  box-shadow: none;
  border-color: var(--border);
}
.composer-tools .icon-button[aria-expanded="true"] {
  background: #d8e5f4;
  border-color: #0069cf;
}
.gif-panel,
.settings-panel {
  background: #e8edf4;
}
.welcome-mark {
  background: linear-gradient(135deg, #f8fbff, #d0e1ef);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow:
    7px 8px 16px #c8c8c8,
    -7px -7px 16px #fff;
}
.community-credit {
  background: #e5e9f0;
  border-top: 1px solid var(--border);
  color: #526073;
  padding: 12px;
  font-size: 11px;
}
.community-credit a {
  color: inherit;
}
.community-credit a:hover {
  color: #004d99;
  text-decoration: underline;
}
.status:not(:empty) {
  color: #263444;
  background: #d8e5f4;
}
@media (max-width: 700px) {
  body {
    padding: 8px;
  }
  .community-shell {
    height: calc(100dvh - 16px);
    min-height: 0;
    border-radius: 20px;
  }
  .community-header {
    padding: 10px 12px 4px;
    gap: 10px;
  }
  .artist-icon { width: 38px; height: 38px; }
  .identity h1 {
    font-size: 17px;
  }
  .community-workspace {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto;
  }
  .channels {
    flex-direction: row;
    flex: 1 0 auto;
    padding: 3px;
    gap: 4px;
    border: 0;
  }
  .community-navigation {
    gap: 4px 8px;
    padding: 0 12px 8px;
  }
  .channel-heading,
  .channel-filters,
  .channel-symbol,
  .channel-copy small {
    display: none;
  }
  .channels button {
    flex: 1 0 auto;
    min-height: 44px;
    padding: 8px 6px;
    gap: 6px;
    border-radius: 10px;
    justify-content: center;
    text-align: center;
  }
  .channel-copy strong {
    font-size: 12px;
  }
  .unread-badge {
    min-width: 22px;
    height: 24px;
    font-size: 12px;
    border-radius: 7px;
  }
  .community-room {
    flex: 1;
  }
  .conversation {
    padding: 16px 42px;
  }
  .message,
  .message.mine {
    min-width: 0;
    max-width: 100%;
    padding: 0;
    margin-bottom: 20px;
  }
  .message-meta {
    gap: 6px;
    padding: 0;
  }
  .message-author {
    font-size: 12px;
  }
  .message time {
    font-size: 12px;
  }
  .message-content {
    padding: 13px 14px;
    border-radius: 20px;
  }
  .message-text {
    font-size: 16px;
    line-height: 1.5;
  }
  .message-avatar {
    width: 29px;
    height: 29px;
    left: -35px;
    font-size: 11px;
  }
  .message.mine .message-avatar {
    right: -35px;
  }
  .message-actions {
    gap: 0;
  }
  .message-actions button,
  .message summary {
    padding-inline: 6px;
    font-size: 11px;
  }
  .composer {
    padding: 8px 12px;
  }
  .composer textarea {
    min-height: 44px;
    height: 44px;
    padding: 10px 12px;
  }
  .composer-tools {
    gap: 7px;
  }
  .counter {
    font-size: 12px;
  }
  .upload-label {
    font-size: 11px;
    padding-inline: 8px;
  }
  .community-credit {
    padding: 6px;
  }
  #charCount { display: none; }
}
@media (max-width: 360px) {
  .composer-tools {
    flex-wrap: nowrap;
  }
  .counter {
    order: 5;
    width: 100%;
    text-align: right;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .message.highlight {
    animation: none;
  }
}
