  :root {
    --disc-page-offset-left: 2rem;
    --disc-font: var(--bb-body-font, ui-sans-serif, system-ui, sans-serif);
  }

  .disc-shell,
  .disc-thread-page,
  .disc-board-title-area {
    font-family: var(--disc-font);
  }
  .disc-shell h1, .disc-shell h2, .disc-shell h3,
  .disc-thread-page h1, .disc-thread-page h2,
  .disc-board-title-area h1 { font-family: var(--bb-heading-font, var(--disc-font)); }
  .disc-shell {
    --disc-sender-width: 2.25rem;
    --disc-message-padding-x: 1.1rem;
    --disc-message-gap: 0.75rem;
    --disc-reply-indent: 2.25rem;
    min-width: 0;
    --disc-border: var(--bb-box-border, var(--bb-input-border, #d1d5db));
    --disc-soft: color-mix(in srgb, var(--bb-box-header-bg, #eef4e2) 48%, var(--bb-page-bg, #ffffff));
    --disc-ink: var(--bb-page-text, #111827);
    --disc-muted: var(--bb-placeholder-text, #64748b);
    --disc-link: var(--bb-link, var(--bb-accent, #2563eb));
    --disc-accent: var(--bb-accent, var(--bb-btn-primary, #5c7a36));
    --disc-accent-text: var(--bb-accent-text, var(--bb-btn-primary-text, #ffffff));
    --disc-accent-border: var(--bb-accent-border, var(--bb-btn-primary-border, var(--disc-accent)));
    --disc-card: var(--bb-page-bg, #ffffff);
    --disc-paper: var(--bb-page-bg, #ffffff);
    --disc-elevated: color-mix(in srgb, var(--bb-page-bg, #ffffff) 88%, var(--disc-accent) 12%);
    --disc-line-soft: color-mix(in srgb, var(--disc-border) 68%, transparent);
    --disc-shadow: 0 12px 28px color-mix(in srgb, var(--disc-ink) 9%, transparent);
    max-width: 1180px;
    width: min(1180px, calc(100% - var(--disc-page-offset-left, 0px)));
    margin: 0 auto 2rem var(--disc-page-offset-left, 0px);
    padding: 0;
    color: var(--disc-ink);
  }
  .disc-shell--embedded {
    width: 100%;
    max-width: none;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
  .embedded-discussion-boards,
  .embedded-discussion-board.is-single {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    gap: 1rem;
  }
  .embedded-discussion-board.is-single {
    gap: 0.75rem;
  }
  .embedded-discussion-board .disc-shell {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
  .disc-shell--narrow {
    max-width: 66rem;
  }
  .disc-shell--compact {
    max-width: 48rem;
  }
  .disc-thread-page {
    max-width: 1180px;
  }
  .disc-shell--conversation,
  .disc-thread-conversation {
    max-width: 1180px;
  }
  #content > main > .py-8 > .disc-shell {
    width: min(1180px, calc(100% - var(--disc-page-offset-left, 0px)));
    margin: 0 auto 2rem var(--disc-page-offset-left, 0px);
  }
  #content > main > .py-8 > .disc-board-title-area {
    width: min(1180px, calc(100% - var(--disc-page-offset-left, 0px)));
    margin: 0 auto 0 var(--disc-page-offset-left, 0px);
  }
  #content > main > .py-8 > .disc-thread-page {
    width: min(1180px, calc(100% - var(--disc-page-offset-left, 0px)));
    margin: 0 auto 3.5rem var(--disc-page-offset-left, 0px);
  }
  .disc-shell a:not(.button):not(.disc-btn) {
    color: var(--disc-link);
    position: relative;
    top: 0;
    text-decoration: none;
    transition: top 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  }
  .disc-shell a:not(.button):not(.disc-btn):hover {
    top: -1px;
  }
  .disc-context-brand-link {
    display: grid;
    grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
    padding: 0.58rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--bb-box-border, var(--disc-border, #d1d5db)) 42%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bb-page-bg, #ffffff) 88%, var(--bb-box-header-bg, #eef4e2));
    color: var(--disc-ink, var(--bb-page-text, #111827));
    text-decoration: none;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--disc-ink, #111827) 6%, transparent);
    top: 0 !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  }
  .disc-context-brand-link:hover,
  .disc-context-brand-link:focus-visible {
    opacity: 1 !important;
    filter: none !important;
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--bb-page-bg, #ffffff) 76%, var(--bb-box-header-bg, #eef4e2));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--disc-ink, #111827) 10%, transparent);
  }

  .disc-context-brand-copy {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
  }

  .disc-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid color-mix(in srgb, var(--bb-box-border, var(--disc-border)) 74%, transparent);
    border-radius: 8px;
    background: var(--disc-card);
    box-shadow: var(--disc-shadow);
  }
  .disc-hero-main { min-width: 0; }
  .disc-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
    color: var(--disc-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .disc-kicker::before {
    content: "";
    display: inline-block;
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
    background: var(--disc-accent);
  }
  .disc-hero h1,
  .disc-hero h2 {
    margin: 0;
    color: var(--disc-ink);
    font-size: clamp(1.32rem, 2vw, 1.78rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }
  .disc-hero-sub {
    margin-top: 0.28rem;
    color: var(--disc-muted);
    font-size: 0.88rem;
  }
  .disc-hero-sub a,
  .disc-panel-sub a {
    color: var(--disc-link) !important;
    font-weight: 800;
  }
  .disc-thread-location {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.38rem;
    color: var(--disc-muted);
    font-size: 0.88rem;
    line-height: 1.4;
  }
  .disc-thread-location span {
    color: var(--disc-muted);
  }
  .disc-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .disc-btn,
  .disc-shell .button.disc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--disc-border);
    background: var(--disc-card);
    color: var(--disc-link);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 0 color-mix(in srgb, var(--disc-ink) 7%, transparent);
  }
  .disc-btn.primary,
  .disc-shell .button.disc-btn.primary {
    border-color: var(--disc-accent-border);
    background: var(--disc-accent);
    color: var(--disc-accent-text) !important;
  }
  .disc-btn.danger {
    border-color: var(--bb-btn-danger-border, var(--bb-btn-danger, #dc2626));
    background: var(--bb-btn-danger, #dc2626);
    color: var(--bb-btn-danger-text, #fff) !important;
  }
  .disc-shell .button.primary,
  .disc-shell button.primary { color: var(--disc-accent-text) !important; }
  .disc-btn {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
  }
  .disc-btn:hover {
    box-shadow: 0 0.45rem 1rem color-mix(in srgb, var(--disc-ink) 12%, transparent);
    transform: translateY(-1px);
  }
  .disc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    background: var(--disc-soft);
    border: 1px solid var(--disc-border);
    color: var(--disc-muted);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.1;
  }
  .disc-badge.alert { background: var(--bb-btn-danger, #dc2626); border-color: var(--bb-btn-danger-border, var(--bb-btn-danger, #dc2626)); color: var(--bb-btn-danger-text, #fff) !important; }
  .disc-badge.warning { background: var(--bb-warning-bg, #fef3c7); border-color: var(--bb-warning-border, #f59e0b); color: var(--bb-warning-text, #92400e); }
  .disc-badge.hidden { background: var(--bb-badge-hidden-bg, #ede9fe); border-color: var(--bb-badge-hidden-text, #6d28d9); color: var(--bb-badge-hidden-text, #6d28d9); }
  .disc-controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--disc-line-soft);
    border-radius: 8px;
    background: var(--disc-elevated);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--disc-ink) 5%, transparent);
  }
  .disc-controls label { color: var(--disc-muted); font-size: 0.78rem; font-weight: 800; }
  .disc-feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.78rem;
    border-bottom: 1px solid var(--disc-line-soft);
    background: var(--disc-soft);
  }
  .disc-feed-tabs,
  .disc-feed-tools {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
  }
  .disc-feed-tabs .db-tab.primary {
    border-width: 2px;
    border-color: var(--bb-tabs-border, #3a4568);
    background: var(--bb-tabs-bg, #4f5d8a);
    color: var(--bb-tabs-text, #ffffff) !important;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--disc-ink) 20%, transparent);
    transform: none;
    font-weight: 900;
  }
  .disc-feed-tools {
    min-width: min(100%, 34rem);
  }
  .disc-feed-tools .disc-input {
    flex: 1;
    min-width: 12rem;
  }
  .disc-board-select-form {
    margin-bottom: 0.85rem;
    box-shadow: none;
  }
  .db-thread-list {
    display: grid;
    gap: 0.45rem;
    padding: 0.65rem;
  }
  .db-thread-list .disc-thread-card {
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--disc-line-soft);
    border-radius: 8px;
    background: var(--disc-card);
  }
  .disc-thread-card.is-active .disc-thread-card-title { font-weight: 750; }
  .disc-input,
  .disc-select,
  .disc-shell input[type="text"],
  .disc-shell input[type="search"],
  .disc-shell select,
  .disc-shell textarea {
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: var(--disc-card);
    color: var(--disc-ink);
    font-size: 0.88rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  }
  .disc-input:focus,
  .disc-select:focus,
  .disc-shell input[type="text"]:focus,
  .disc-shell input[type="search"]:focus,
  .disc-shell select:focus,
  .disc-shell textarea:focus {
    border-color: color-mix(in srgb, var(--disc-accent) 72%, var(--disc-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--disc-accent) 16%, transparent);
    outline: none;
  }
  .disc-input,
  .disc-select,
  .disc-shell input[type="text"],
  .disc-shell input[type="search"],
  .disc-shell select { min-height: 2.25rem; padding: 0.4rem 0.65rem; }
  .disc-shell textarea { padding: 0.6rem 0.7rem; }
  .disc-thread-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    padding: 0.88rem;
    border-bottom: 1px solid color-mix(in srgb, var(--disc-border) 70%, transparent);
    color: inherit;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
  }
  .disc-thread-card.is-menu-open { z-index: 120; }
  .disc-thread-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--disc-ink) 8%, transparent);
  }
  .disc-thread-card.is-active {
    background: var(--bb-box-header-bg, var(--disc-soft));
    border-left-color: var(--disc-accent);
  }
  .disc-thread-card-title {
    color: var(--disc-ink);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .disc-thread-card-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.28rem;
    color: var(--disc-muted);
    font-size: 0.76rem;
  }
  .disc-thread-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: var(--disc-card);
    border: 1px solid var(--disc-border);
    color: var(--disc-muted);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .disc-thread-menu-wrap {
    position: relative;
    flex-shrink: 0;
  }
  .disc-thread-menu-wrap.open { z-index: 130; }
  .disc-thread-menu-btn { font-size: 1rem; font-weight: 900; line-height: 1; }
  .disc-thread-menu-btn:hover,
  .disc-thread-menu-wrap.open .disc-thread-menu-btn {
    background: var(--disc-soft);
    color: var(--disc-ink);
  }
  .disc-thread-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 140;
    display: none;
    min-width: 11rem;
    padding: 0.25rem;
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: var(--disc-card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  }
  .disc-thread-menu-wrap.open .disc-thread-menu { display: block; }
  .disc-thread-menu form { margin: 0; }
  .disc-thread-menu button,
  .disc-thread-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2rem;
    padding: 0.45rem 0.62rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--disc-ink) !important;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
  }
  .disc-thread-menu button:hover,
  .disc-thread-menu a:hover,
  .disc-thread-menu .is-current {
    background: var(--disc-soft);
  }
  .disc-thread-menu .danger {
    color: var(--bb-btn-danger, #dc2626) !important;
  }

  .disc-panel {
    min-width: 0;
    border: 1px solid var(--disc-line-soft);
    border-radius: 8px;
    background: var(--disc-card);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--disc-ink) 6%, transparent);
  }
  .disc-thread-index,
  .disc-thread-panel {
    overflow: visible;
  }
  .disc-org-groups {
    display: grid;
    gap: 0.8rem;
  }
  .disc-org-group {
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: transparent;
    overflow: hidden;
  }
  .disc-org-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.82rem 0.95rem;
    border-left: 4px solid var(--disc-accent);
    background: var(--disc-card);
    color: var(--disc-ink);
    cursor: pointer;
    list-style: none;
  }
  .disc-org-group summary::-webkit-details-marker { display: none; }
  .disc-org-group summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid var(--disc-border);
    border-radius: 999px;
    color: var(--disc-muted);
    font-weight: 900;
  }
  .disc-org-group[open] summary::after { content: "-"; }
  .disc-org-summary-main {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
  }
  .disc-org-title {
    color: var(--disc-ink);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .disc-org-title a { color: inherit !important; }
  .disc-org-summary-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-left: auto;
  }
  .disc-org-group-body {
    position: relative;
    padding: 0.85rem 0.85rem 0.85rem 1.15rem;
    border-top: 1px solid var(--disc-border);
    background: color-mix(in srgb, var(--disc-soft) 72%, var(--disc-card));
  }
  .disc-org-group-body::before {
    content: "";
    position: absolute;
    top: 0.85rem;
    bottom: 0.85rem;
    left: 0.48rem;
    width: 3px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--disc-accent) 48%, var(--disc-border));
  }
  .disc-org-group-body > .db-section {
    position: relative;
    margin-left: 0.3rem;
    border-left: 4px solid var(--disc-accent);
  }
  .disc-org-group-body .db-section:last-child { margin-bottom: 0 !important; }
  .disc-program-group {
    position: relative;
    border: 1px solid color-mix(in srgb, var(--disc-border) 78%, transparent);
    border-radius: 8px;
    background: var(--disc-card);
    overflow: hidden;
    margin: 0 0 0.85rem 1rem;
  }
  .disc-program-group::before {
    content: "";
    position: absolute;
    top: 1.15rem;
    left: -1rem;
    width: 0.9rem;
    border-top: 3px solid color-mix(in srgb, var(--disc-accent) 54%, var(--disc-border));
  }
  .disc-program-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.72rem 0.85rem;
    border-left: 4px solid color-mix(in srgb, var(--disc-accent) 65%, var(--disc-link));
    background: color-mix(in srgb, var(--disc-soft) 58%, var(--disc-card));
    color: var(--disc-ink);
    cursor: pointer;
    list-style: none;
  }
  .disc-program-group summary::-webkit-details-marker { display: none; }
  .disc-program-group summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid var(--disc-border);
    border-radius: 999px;
    color: var(--disc-muted);
    font-weight: 900;
  }
  .disc-program-group[open] summary::after { content: "-"; }
  .disc-program-summary-main {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
  }
  .disc-program-title {
    color: var(--disc-ink);
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .disc-program-title a { color: inherit !important; }
  .disc-program-group-body {
    position: relative;
    padding: 0.8rem 0.8rem 0.8rem 1.05rem;
    border-top: 1px solid var(--disc-border);
    background: var(--disc-card);
  }
  .disc-program-group-body::before {
    content: "";
    position: absolute;
    top: 0.8rem;
    bottom: 0.8rem;
    left: 0.46rem;
    width: 2px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--disc-link) 44%, var(--disc-border));
  }
  .disc-program-group-body .db-section {
    position: relative;
    border-left: 4px solid color-mix(in srgb, var(--disc-link) 52%, var(--disc-accent));
  }
  .disc-program-group-body .db-section .disc-panel-head {
    background: color-mix(in srgb, var(--disc-soft) 42%, var(--disc-card));
  }
  .disc-board-kind-iteration .disc-kicker::before {
    background: color-mix(in srgb, var(--disc-link) 62%, var(--disc-accent));
  }
  .disc-program-group-body .db-section:last-child { margin-bottom: 0 !important; }
  .disc-panel-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--disc-border);
    background: var(--bb-box-header-bg, var(--disc-soft));
  }
  .disc-panel-head.is-menu-open { z-index: 120; }
  .disc-panel-head h2,
  .disc-panel-head h3 {
    margin: 0;
    color: var(--bb-box-header-text, var(--disc-ink));
    font-size: 1.05rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .disc-panel-sub { margin-top: 0.25rem; color: var(--disc-muted); font-size: 0.8rem; }
  .disc-empty {
    padding: 1.1rem 1rem;
    color: var(--disc-muted);
    text-align: center;
    font-size: 0.82rem;
    background: transparent;
  }
  .disc-msg-list {
    padding: 0.75rem 0;
  }
  .disc-msg {
    position: relative;
    display: grid;
    grid-template-columns: var(--disc-sender-width) minmax(0, 1fr);
    column-gap: var(--disc-message-gap);
    row-gap: 0.18rem;
    align-items: start;
    padding: 0.7rem var(--disc-message-padding-x);
    border-radius: 0;
    color: var(--disc-ink);
    outline-offset: -2px;
  }
  .disc-msg:hover,
  .disc-msg.actions-open { background: color-mix(in srgb, var(--disc-accent) 4%, var(--disc-card)); }
  .disc-msg:focus-visible { outline: 2px solid var(--disc-accent); }
  .disc-msg-sender { display: contents; }
  .disc-sender-photo { grid-column: 1; grid-row: 1 / span 2; min-width: 0; line-height: 0; padding-top: 0.08rem; }
  .disc-sender-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .disc-avatar {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--disc-sender-width);
    height: var(--disc-sender-width);
    border: 0;
    border-radius: 10px;
    background: var(--disc-soft);
    color: var(--disc-ink);
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
  }
  .disc-avatar-profile-link { display: inline-flex; border-radius: 10px; color: inherit; line-height: 0; }
  .disc-avatar-profile-link:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 2px; }
  .disc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .disc-avatar [hidden] { display: none; }
  .disc-msg-main { grid-column: 2; grid-row: 2; min-width: 0; }
  .disc-msg-content { display: flow-root; min-width: 0; }
  .disc-msg-head {
    display: flex;
    align-items: baseline;
    gap: 0.3rem 0.55rem;
    flex-wrap: wrap;
    color: var(--disc-muted);
    font-size: 0.72rem;
    line-height: 1.45;
  }
  .disc-msg-author { min-width: 0; overflow-wrap: anywhere; color: var(--disc-ink); font-size: 0.85rem; font-weight: 650; }
  .disc-msg-time { color: var(--disc-muted); font-size: 0.7rem; font-weight: 400; white-space: nowrap; }
  .disc-msg-head .bb-user-hats { align-self: center; margin: 0; line-height: 1; }
  .disc-msg-body { max-width: 78ch; color: var(--disc-ink); font-size: 0.9rem; line-height: 1.65; overflow-wrap: anywhere; }
  .disc-msg-body p { margin: 0 0 0.45rem; }
  .disc-msg-body p:last-child { margin-bottom: 0; }
  .disc-msg-body ul,
  .disc-msg-body ol { margin: 0.35rem 0 0.5rem 1.1rem; }
  .disc-msg.is-reply-block { margin-inline-start: var(--disc-reply-indent); }
  .disc-msg.is-reply-block::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0.15rem;
    border-inline-start: 2px solid color-mix(in srgb, var(--disc-accent) 22%, var(--disc-card));
    pointer-events: none;
  }

  .disc-reply-card {
    border-top: 1px solid var(--disc-border);
    padding: 0.75rem;
    background: var(--disc-card);
  }
  .disc-composer-reply-bar {
    display: none;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
    padding: 0.45rem 0.65rem;
    border-left: 3px solid var(--disc-muted);
    border-radius: 8px;
    background: var(--disc-soft);
    color: var(--disc-muted);
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .disc-composer-reply-bar.show { display: flex; }
  .disc-composer-reply-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 0.1rem 0.35rem;
    min-width: 0;
    flex: 1;
  }
  .disc-composer-reply-info > span:first-child { white-space: nowrap; }
  .disc-composer-reply-author {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--disc-link);
    font-weight: 600;
  }
  .disc-composer-reply-text {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .disc-composer-reply-cancel {
    flex-shrink: 0;
    min-width: 28px;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--disc-muted);
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
  }
  .disc-composer-reply-cancel:hover { background: color-mix(in srgb, var(--bb-page-text, #111827) 8%, transparent); }
  .disc-editor {
    min-height: 7rem;
    border: 1px solid var(--disc-border);
    border-radius: 0 0 8px 8px;
    padding: 0.7rem 0.8rem;
    font-size: 0.94rem;
    line-height: 1.45;
    background: var(--disc-card);
    outline: none;
  }
  .disc-editor:empty:before { content: attr(data-placeholder); color: var(--disc-muted); }
  .disc-editor:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--disc-accent) 22%, transparent); }
  .disc-editor-toolbar {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid var(--disc-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    padding: 0.4rem;
    background: var(--disc-soft);
  }
  .disc-editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    border: 1px solid transparent;
    background: var(--disc-card);
    border-radius: 6px;
    color: var(--disc-ink);
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
  }
  .disc-editor-btn:hover { border-color: var(--disc-border); }
  .discussion-emoji-wrap { position: relative; }
  .discussion-emoji-box {
    position: fixed;
    z-index: 10050;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.2rem;
    width: 17.5rem;
    max-width: calc(100vw - 1rem);
    max-height: min(18rem, calc(100vh - 1rem));
    overflow-y: auto;
    padding: 0.45rem;
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: var(--disc-card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  }
  .discussion-emoji-box[hidden] { display: none; }
  .discussion-emoji-chip {
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 1.05rem;
    line-height: 1;
    width: 1.9rem;
    height: 1.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .discussion-emoji-chip:hover { background: var(--disc-soft); }
  .discussion-custom-emoji,
  .reaction-custom-emoji {
    width: 1.35rem;
    height: 1.35rem;
    object-fit: contain;
    display: block;
  }
  .reaction-chip-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .reaction-chip-emoji .reaction-custom-emoji { width: 1.1rem; height: 1.1rem; }
  .disc-status-note {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--disc-border);
    background: var(--bb-warning-bg, #fef3c7);
    color: var(--bb-warning-text, #92400e);
    font-size: 0.84rem;
    font-weight: 800;
  }
  .disc-status-note[hidden] { display: none; }
  .disc-permissions {
    margin-bottom: 1rem;
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: var(--disc-card);
    overflow: hidden;
  }
  .disc-permissions summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    list-style: none;
    background: var(--disc-soft);
    color: var(--disc-ink);
    font-size: 0.9rem;
    font-weight: 900;
  }
  .disc-permissions summary::-webkit-details-marker { display: none; }
  .disc-permissions summary::after { content: "+"; color: var(--disc-muted); font-weight: 900; }
  .disc-permissions[open] summary::after { content: "-"; }
  .disc-permission-body { padding: 0.9rem; }
  .disc-choice-set {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
  }
  .disc-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    background: var(--disc-card);
    font-size: 0.84rem;
    font-weight: 800;
  }
  .disc-picker {
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    margin-bottom: 0.85rem;
    overflow: hidden;
  }
  .disc-picker-head { padding: 0.55rem 0.7rem; background: var(--disc-soft); border-bottom: 1px solid var(--disc-border); }
  .disc-picker-head strong { display: block; font-size: 0.78rem; color: var(--disc-ink); }
  .disc-picker-head span { display: block; font-size: 0.72rem; color: var(--disc-muted); }
  .disc-picker-list { max-height: 14rem; overflow: auto; padding: 0.45rem 0.65rem; }
  .disc-picker-list label {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.35rem 0;
    color: var(--disc-ink);
    font-size: 0.84rem;
    line-height: 1.25;
  }
  .disc-permission-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
  }
  .disc-permission-table th,
  .disc-permission-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid color-mix(in srgb, var(--disc-border) 70%, transparent);
    color: var(--disc-ink);
    text-align: left;
    vertical-align: middle;
  }
  .disc-permission-table th {
    color: var(--disc-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }
  .disc-permission-table th:nth-child(2),
  .disc-permission-table th:nth-child(3),
  .disc-permission-table td:nth-child(2),
  .disc-permission-table td:nth-child(3) {
    text-align: center;
    width: 8.2rem;
  }
  .disc-picker-list .disc-permission-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    font-weight: 800;
    white-space: nowrap;
  }
  .disc-form-card {
    max-width: 760px;
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: var(--disc-card);
    overflow: hidden;
  }
  .disc-form-body { padding: 1rem; }
  .disc-form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
  .disc-inline-action {
    margin: 0.85rem;
    border: 1px solid var(--disc-border);
    border-radius: 8px;
    background: var(--disc-card);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--disc-ink) 6%, transparent);
    overflow: visible;
  }
  .disc-inline-thread {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--disc-card);
    box-shadow: none;
    overflow: visible;
  }
  .disc-inline-danger {
    border-color: color-mix(in srgb, var(--bb-btn-danger, #dc2626) 44%, var(--disc-border));
    border-left: 4px solid var(--bb-btn-danger, #dc2626);
  }
  .disc-field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }
  .disc-field label {
    color: var(--disc-ink);
    font-size: 0.82rem;
    font-weight: 800;
  }
  .disc-field label span {
    color: var(--disc-muted);
    font-weight: 600;
  }
  .disc-field .disc-input,
  .disc-field textarea,
  .disc-field .disc-editor {
    width: 100%;
    box-sizing: border-box;
  }
  #discussion-inline-new-thread,
  .disc-form-card {
    color: var(--bb-page-text, #111827);
  }
  #discussion-inline-new-thread .disc-form-body,
  .disc-form-card .disc-form-body {
    background: var(--bb-page-bg, #ffffff);
    color: var(--bb-page-text, #111827);
  }
  #discussion-inline-new-thread .disc-field label,
  .disc-form-card label {
    color: var(--bb-page-text, #111827) !important;
    opacity: 1;
  }
  #discussion-inline-new-thread .disc-input,
  .disc-form-card .disc-input {
    border-color: var(--bb-input-border, #9ca3af);
    background: var(--bb-page-bg, #ffffff) !important;
    color: var(--bb-page-text, #111827) !important;
    -webkit-text-fill-color: var(--bb-page-text, #111827);
    caret-color: var(--bb-page-text, #111827);
    opacity: 1;
  }
  #discussion-inline-new-thread .disc-input::placeholder,
  .disc-form-card .disc-input::placeholder {
    color: color-mix(in srgb, var(--bb-page-text, #111827) 62%, transparent);
    -webkit-text-fill-color: color-mix(in srgb, var(--bb-page-text, #111827) 62%, transparent);
    opacity: 1;
  }
  #discussion-inline-new-thread .disc-choice,
  #discussion-inline-new-thread .disc-picker-head,
  #discussion-inline-new-thread .disc-picker-head span,
  .disc-form-card .disc-choice,
  .disc-form-card .disc-picker-head,
  .disc-form-card .disc-picker-head span {
    color: var(--bb-page-text, #111827) !important;
    opacity: 1;
  }
  .disc-delete-summary {
    display: grid;
    gap: 0.15rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--bb-btn-danger, #dc2626) 28%, var(--disc-border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--bb-btn-danger, #dc2626) 8%, var(--disc-card));
  }
  .disc-delete-summary strong {
    color: var(--disc-ink);
  }
  .disc-delete-summary span {
    color: var(--disc-muted);
    font-size: 0.82rem;
  }
  .disc-inline-editor {
    min-height: 7rem;
    background: var(--bb-page-bg, #fff) !important;
    color: var(--bb-page-text, #111827) !important;
    caret-color: var(--bb-page-text, #111827);
  }
  .disc-inline-report-preview {
    margin-bottom: 1rem;
    border: 1px solid var(--disc-border);
    background: var(--disc-card);
  }
  .disc-shell--embedded-conversation {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .disc-shell--embedded-conversation .disc-thread-conversation {
    max-width: none;
  }
  .disc-shell--embedded-conversation .disc-thread-panel {
    border: 0;
    border-radius: 0;
  }

  @keyframes discussionPostFlash {
    0%, 60% { opacity: 0.32; }
    100% { opacity: 0; }
  }
  .disc-msg.is-first-unread {
    outline: 2px solid var(--disc-flash-color, #a78bfa);
    outline-offset: -2px;
  }
  .disc-msg-flash {
    position: absolute;
    inset: 0;
    border: 1px solid var(--disc-flash-color, #a78bfa);
    border-radius: inherit;
    background: var(--disc-flash-color, #a78bfa);
    opacity: 0;
    pointer-events: none;
    animation: discussionPostFlash 2.4s ease-out;
  }
  @media (prefers-reduced-motion: reduce) {
    .disc-msg-flash { animation: none; opacity: 0.26; }
  }
  @media (max-width: 860px) {
    .disc-hero { align-items: flex-start; flex-direction: column; }
    .disc-hero-actions { justify-content: flex-start; }
  }
  @media (max-width: 640px) {
    .disc-shell { padding: 0; }
    .disc-controls { align-items: stretch; }
    .disc-controls input,
    .disc-controls select { width: 100%; }
    .disc-thread-card { grid-template-columns: 1fr; }
    .disc-thread-card-count { width: fit-content; }

    .disc-panel-head { flex-direction: column; }
    .disc-org-group summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
    }
    .disc-org-summary-meta {
      grid-column: 1 / -1;
      justify-content: flex-start;
      margin-left: 0;
    }
    .disc-program-group summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
    }
    .disc-org-group-body { padding-left: 0.75rem; }
    .disc-org-group-body::before,
    .disc-program-group::before,
    .disc-program-group-body::before { display: none; }
    .disc-program-group { margin-left: 0; }
    .disc-program-group-body { padding-left: 0.75rem; }
    .disc-shell { --disc-sender-width: 2rem; --disc-message-padding-x: 0.8rem; --disc-message-gap: 0.65rem; }
    .disc-msg { padding-block: 0.65rem; }
    .disc-avatar { font-size: 0.7rem; }
    .disc-choice-set { flex-direction: column; }
    .disc-choice { width: 100%; box-sizing: border-box; }
    .disc-permission-table,
    .disc-permission-table thead,
    .disc-permission-table tbody,
    .disc-permission-table tr,
    .disc-permission-table th,
    .disc-permission-table td {
      display: block;
      width: 100%;
      box-sizing: border-box;
    }
    .disc-permission-table thead { display: none; }
    .disc-permission-table tr {
      padding: 0.5rem 0;
      border-bottom: 1px solid color-mix(in srgb, var(--disc-border) 70%, transparent);
    }
    .disc-permission-table td {
      border-bottom: 0;
      padding: 0.25rem 0;
      text-align: left !important;
    }
    .disc-picker-list .disc-permission-check { justify-content: flex-start; }
  }

  /* Club UI parity: discussion boards should follow preceptor club thread styling. */
  .disc-shell a:hover,
  .disc-shell button:hover {
    opacity: 1 !important;
    filter: none !important;
  }

  .disc-context-brand-link {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
  }
  .disc-context-brand-link:hover,
  .disc-context-brand-link:focus-visible {
    background: transparent;
    box-shadow: none;
    transform: translateY(-2px);
  }
  .disc-context-brand {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
  }
  .disc-context-brand-copy {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    color: var(--bb-placeholder-text, #64748b);
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
  }
  .disc-context-brand-copy:hover,
  .disc-context-brand-copy:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .disc-hero {
    border: 2px solid var(--bb-box-border, #5c7a36);
    border-radius: var(--bb-card-radius, 0.5rem);
    background: var(--bb-page-bg, #ffffff);
    box-shadow: none;
  }
  .disc-hero h1,
  .disc-hero h2 {
    font-size: 1.4rem;
    font-weight: 700;
  }
  .disc-kicker::before {
    display: none;
  }
  .disc-btn,
  .disc-shell .button.disc-btn {
    border-radius: 6px;
    box-shadow: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
  }
  .disc-btn:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
  }

  .disc-thread-index {
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .disc-thread-index > .disc-panel-head {
    margin-bottom: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .disc-thread-index > .disc-panel-head h2 {
    color: var(--bb-page-text, #111827);
    font-size: 1.05rem;
  }
  .db-thread-list {
    display: block;
    padding: 0;
  }
  .disc-thread-card,
  .db-thread-list .disc-thread-card {
    display: flex;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.6rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bb-input-border, #e5e7eb);
    border-left: 1px solid var(--bb-input-border, #e5e7eb);
    border-radius: var(--bb-card-radius, 0.5rem);
    background: var(--bb-page-bg, #ffffff);
    color: inherit;
    box-shadow: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
  }
  .disc-thread-card:hover,
  .db-thread-list .disc-thread-card:hover {
    border-color: var(--bb-input-border, #e5e7eb);
    background: var(--bb-page-bg, #ffffff);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: none;
  }

  .disc-thread-card-title {
    color: var(--bb-link, #1233a0);
    font-size: 1rem;
    font-weight: 600;
  }

  .disc-thread-card-meta {
    color: var(--bb-btn-neutral, #6b7280);
    font-size: 0.76rem;
  }

  .disc-thread-card-count {
    min-width: 0;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bb-btn-neutral, #9ca3af);
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
  }

  .disc-thread-page {
    box-sizing: border-box;
    color: var(--bb-page-text, #1a1a1a);
    display: grid;
    gap: 0;
    width: min(1180px, calc(100% - var(--disc-page-offset-left, 0px)));
    max-width: 1180px;
    min-height: calc(100dvh - 150px);
    margin: 0 auto 3.5rem var(--disc-page-offset-left, 0px);
    text-align: left;
  }
  .disc-thread-page > * {
    width: 100%;
  }
  .disc-thread-title-area {
    box-sizing: border-box;
    display: grid;
    gap: 0.85rem;
    width: 100%;
    margin: 0;
    padding: 4 4 3rem;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .disc-thread-title-area .disc-hero-main {
    min-width: 0;
  }
  .disc-thread-title-area .disc-hero-main h1 {
    margin: 0;
    color: var(--bb-page-text, #111827);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
  }
  .disc-thread-title-area .disc-thread-location,
  .disc-thread-title-area .disc-thread-location span {
    margin-top: 0.5rem;
    color: var(--bb-btn-neutral, #6b7280);
    font-size: 0.78rem;
  }
  .disc-board-title-area {
    box-sizing: border-box;
    display: grid;
    gap: 0;
    max-width: 1180px;
    width: min(1180px, calc(100% - var(--disc-page-offset-left, 0px)));
    margin: 0 auto 0 var(--disc-page-offset-left, 0px);
    padding: 0 0 3rem;
    text-align: left;
  }
  .disc-shell--conversation {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    max-width: 1180px;
    height: auto;
    min-height: 420px;
    margin: 0;
    margin-left: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--bb-page-bg, #ffffff);
    box-shadow: none;
    overflow: hidden;
  }

  .disc-board-title-area > .disc-board-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .disc-chat-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    width: 100%;
    margin-left: 0;
    min-width: 0;
  }
  .disc-chat-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    margin-top: 1.5rem;
    margin-left: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    top: 0 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .disc-chat-logo-link:hover,
  .disc-chat-logo-link:focus-visible {
    box-shadow: none;
    transform: translateY(-2px);
  }
  .disc-chat-logo-link img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
  }
  .disc-shell--conversation .disc-hero-main {
    flex: 1;
    min-width: 0;
  }
  .disc-shell--conversation .disc-hero h1 {
    margin: 0;
    color: var(--bb-page-text, #111827);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .disc-shell--conversation .disc-hero h1::before {
    content: none;
  }
  .disc-shell--conversation .disc-thread-location,
  .disc-shell--conversation .disc-thread-location span {
    margin-top: 0.12rem;
    color: var(--bb-btn-neutral, #6b7280);
    font-size: 0.78rem;
  }
  .disc-shell--conversation .disc-hero-actions {
    flex-shrink: 0;
  }
  .disc-shell--conversation .disc-thread-conversation,
  .disc-shell--conversation .disc-thread-panel {
    background: var(--bb-page-bg, #ffffff);
  }
  .disc-shell--conversation .disc-thread-conversation {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
  }
  .disc-shell--conversation .disc-thread-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
    overflow: hidden;
  }
  .disc-shell--conversation .disc-msg-list {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    background: var(--disc-card);
  }
  .disc-shell--conversation .disc-msg-author,
  .disc-shell--conversation .disc-msg-author a { color: var(--disc-ink) !important; }
  .disc-shell--conversation .disc-msg-body a { color: var(--disc-link) !important; text-decoration: underline; text-underline-offset: 2px; }
  .disc-shell--conversation .disc-msg-reactions {
    gap: 4px;
    margin-top: 5px;
    padding-top: 2px;
  }
  .disc-react-chip {
    border: 1px solid var(--disc-accent-border);
    background: var(--disc-elevated);
    color: var(--disc-link);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 0.8rem;
  }
  .disc-react-chip.reacted {
    border-color: var(--disc-accent-border);
    background: var(--disc-accent);
    color: var(--disc-accent-text);
  }
  .disc-shell--conversation .disc-msg-actions {
    position: absolute;
    top: -0.5rem;
    right: 0.65rem;
    bottom: auto;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    gap: 2px;
    margin: 0;
    padding: 0.18rem;
    border: 1px solid var(--disc-line-soft);
    border-radius: 7px;
    background: var(--disc-card);
    box-shadow: 0 3px 12px color-mix(in srgb, var(--disc-ink) 9%, transparent);
  }
  .disc-shell--conversation .disc-msg.actions-open .disc-msg-actions {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  @media (hover: hover) and (pointer: fine) {
    .disc-shell--conversation .disc-msg:hover .disc-msg-actions {
      display: flex;
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
    }
  }
  .disc-shell--conversation .disc-msg-actions:not(:has(.disc-act, .disc-action-note)) {
    display: none !important;
  }
  .disc-shell--conversation .disc-action-row {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.78rem;
  }
  .disc-shell--conversation .disc-action-row form {
    display: inline-flex;
    margin: 0;
  }
  .disc-shell--conversation .disc-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--disc-muted) !important;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1;
    padding: 0;
    text-decoration: none !important;
  }
  .disc-shell--conversation .disc-act:hover {
    background: var(--disc-accent);
    color: var(--disc-accent-text) !important;
  }

  .disc-message-icon { display: block; flex-shrink: 0; }
  .disc-shell--conversation .disc-act:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 1px; }
  .disc-shell--conversation .disc-act--danger:hover {
    background: var(--bb-danger-bg, #fee2e2);
    color: var(--bb-danger-text, #b91c1c) !important;
  }

  .disc-shell--conversation .disc-msg-reactions:not(:has(*)) {
    display: none;
  }

  .disc-shell--conversation .disc-msg.is-editing {
    padding-bottom: 0.7rem;
    background: color-mix(in srgb, var(--bb-page-bg, #fff) 94%, var(--bb-link, #4f46e5));
  }

  .disc-shell--conversation .disc-msg.is-editing .disc-msg-actions {
    display: none !important;
  }

  .disc-in-place-edit {
    display: grid;
    gap: 0;
    margin-top: 0.35rem;
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 9px;
    background: var(--bb-page-bg, #fff);
    overflow: hidden;
  }

  .disc-in-place-edit-toolbar {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.3rem 0.4rem;
    border: 0;
    border-bottom: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 0;
    background: var(--bb-nav-bg, #f8fafc);
  }

  .disc-in-place-edit-toolbar button,
  .disc-in-place-edit-toolbar label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 1.9rem;
    height: 1.8rem;
    margin: 0;
    padding: 0 0.4rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--bb-page-text, #111827);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
  }

  .disc-in-place-edit-toolbar button:hover,
  .disc-in-place-edit-toolbar label:hover {
    background: var(--bb-nav-hover, #e8edf3);
  }

  .disc-in-place-edit-toolbar input[type="color"] {
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .disc-attachment-btn input[type="file"],
  .disc-in-place-edit-toolbar input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .disc-attachment-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.38rem 0.65rem;
    border-top: 1px solid var(--bb-input-border, #d1d5db);
    background: var(--bb-nav-bg, #f8fafc);
    color: var(--bb-page-text, #111827);
    font-size: 0.75rem;
    overflow-wrap: anywhere;
  }

  .disc-attachment-selection[hidden] {
    display: none;
  }

  .disc-selected-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    max-width: 16rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 7px;
    background: var(--bb-page-bg, #fff);
  }

  .disc-selected-attachment img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 5px;
    object-fit: cover;
  }

  .disc-post-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.45rem;
  }

  .disc-post-attachments:not(:has(*)) {
    display: none;
  }

  .disc-post-attachment { min-width: 0; max-width: 100%; }

  .disc-post-attachment img {
    display: block;
    width: auto;
    max-width: min(22rem, 100%);
    max-height: 18rem;
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 8px;
    object-fit: contain;
    background: var(--bb-page-bg, #fff);
  }

  .disc-post-file {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-sizing: border-box;
    max-width: min(22rem, 100%);
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 7px;
    background: var(--bb-nav-bg, #f8fafc);
    color: var(--bb-link, #4f46e5) !important;
    font-size: 0.8rem;
    font-weight: 650;
    overflow-wrap: anywhere;
  }

  .disc-in-place-edit-field {
    min-height: 6.5rem;
    padding: 0.7rem 0.8rem;
    background: var(--bb-page-bg, #fff);
    color: var(--bb-page-text, #111827);
    caret-color: var(--bb-page-text, #111827);
    font-size: 0.92rem;
    line-height: 1.5;
    outline: none;
  }

  .disc-in-place-edit-field:focus {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bb-link, #4f46e5) 35%, transparent);
  }

  .disc-in-place-edit-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    padding: 0.45rem;
    border-top: 1px solid var(--bb-input-border, #d1d5db);
    background: var(--bb-nav-bg, #f8fafc);
  }

  .disc-in-place-edit-footer [data-edit-status] {
    margin-right: auto;
    color: var(--bb-danger-text, #b91c1c);
    font-size: 0.75rem;
  }

  .reaction-picker.disc-inline-reaction-picker {
    position: fixed;
    z-index: 10050;
    display: flex;
    flex-wrap: wrap;
    gap: 0.22rem;
    max-width: min(20rem, calc(100vw - 1rem));
    padding: 0.4rem;
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 9px;
    background: var(--bb-page-bg, #fff);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
  }

  .reaction-picker.disc-inline-reaction-picker .reaction-picker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 1.05rem;
    cursor: pointer;
  }
  .disc-shell--conversation .disc-reply-card {
    flex: 0 0 auto;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--disc-line-soft);
    background: var(--disc-card);
    box-shadow: none;
  }
  .disc-shell--conversation .disc-reply-card > form {
    padding: 0.45rem 0.6rem 0.6rem;
    border: 1px solid var(--disc-border);
    border-radius: 12px;
    background: var(--disc-card);
    transition: border-color 120ms ease, box-shadow 120ms ease;
  }
  .disc-shell--conversation .disc-reply-card > form:focus-within { border-color: var(--disc-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--disc-accent) 12%, transparent); }
  .disc-shell--conversation .disc-reply-card.is-inline-reply { margin-inline-start: calc(var(--disc-sender-width) + var(--disc-message-gap)); padding-top: 0.3rem; border-top: 0; }
  .disc-shell--conversation .disc-composer-reply-bar { margin: 0 0 0.4rem; border: 0; border-inline-start: 2px solid var(--disc-accent); border-radius: 4px; background: var(--disc-soft); color: var(--disc-ink); }
  .disc-shell--conversation .disc-editor-toolbar { display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0; padding: 0 0 0.25rem; border: 0; background: transparent; }
  .disc-shell--conversation .disc-editor-btn { min-width: 1.9rem; min-height: 1.9rem; height: auto; padding: 0.25rem 0.4rem; border: 0; border-radius: 5px; background: transparent; color: var(--disc-muted); font-size: 0.85rem; }
  .disc-shell--conversation .disc-editor-btn:hover { background: var(--disc-soft); color: var(--disc-ink); }
  .disc-shell--conversation .disc-editor-btn:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 1px; }
  .disc-composer-row { display: flex; align-items: flex-end; gap: 0.5rem; }
  .disc-shell--conversation .disc-editor { flex: 1; min-width: 0; min-height: 44px; max-height: 180px; overflow-y: auto; padding: 0.3rem 0.15rem; border: 0; border-radius: 0; background: transparent; color: var(--disc-ink); font: inherit; font-size: 0.9rem; line-height: 1.6; box-shadow: none; }
  .disc-shell--conversation .disc-editor:focus { outline: none; box-shadow: none; }
  .disc-shell--conversation .disc-composer-send { min-height: 2.25rem; border-radius: 8px; padding: 0.5rem 0.85rem; font-size: 0.8rem; font-weight: 600; }
  .disc-thread-page-contact {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100%;
    margin: auto 0 0;
    padding: 0.85rem 0.25rem 0.15rem;
    border-top: 1px solid var(--bb-input-border, #e5e7eb);
    color: var(--bb-btn-neutral, #6b7280);
    font-size: 0.84rem;
    line-height: 1.45;
  }
  .disc-thread-page-contact a {
    color: var(--bb-link, #4f46e5) !important;
  }
  .disc-composer-send {
    flex-shrink: 0;
  }
  .reaction-picker,
  .discussion-emoji-box {
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 12px;
    background: var(--bb-page-bg, #ffffff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  }
  .reaction-picker-btn:hover,
  .discussion-emoji-chip:hover {
    background: var(--bb-box-header-bg, var(--disc-elevated));
    box-shadow: inset 0 0 0 1px var(--disc-accent-border);
  }

  @media (max-width: 860px) {
  .disc-thread-page {
      min-height: calc(100dvh - 96px);
    }
    .disc-thread-title-area,
    .disc-board-title-area {
      padding-bottom: 2rem;
    }
    .disc-shell--conversation {
      min-height: 0;
      max-width: 100%;
    }
    .disc-thread-title-area {
      gap: 0.45rem;
    }
    .disc-chat-title-row {
      gap: 0.45rem;
    }
    .disc-shell--conversation .disc-hero h1 {
      font-size: 1.02rem;
    }
    .disc-shell--conversation .disc-msg-list { --disc-sender-width: 2rem; --disc-message-padding-x: 0.8rem; --disc-message-gap: 0.65rem; --disc-reply-indent: 1.2rem; }
    .disc-shell--conversation .disc-msg-actions { top: 0; right: 0.4rem; }
    .disc-shell--conversation .disc-reply-card { padding: 0.65rem; }
    .disc-shell--conversation .disc-reply-card.is-inline-reply { margin-inline-start: 0.8rem; }
    .disc-shell--conversation .disc-editor {
      font-size: 16px;
    }
    .disc-composer-send {
      padding: 8px 14px;
    }
  }

  @media (max-width: 640px) {
    .disc-context-brand-link {
      align-items: center;
      padding: 0;
    }
    .disc-context-brand {
      gap: 0.55rem;
    }

    .disc-thread-card,
    .db-thread-list .disc-thread-card {
      gap: 0.6rem;
      padding: 0.75rem 0.85rem;
    }

  }

  .disc-thread-index {
    padding: 0;
    overflow: visible;
  }

  .disc-thread-index > .disc-status-note,
  .disc-thread-index > .disc-empty {
    margin: 1rem;
  }

  .disc-workspace {
    min-width: 0;
    border: 1px solid var(--bb-input-border, #e2e8f0);
    border-radius: 12px;
    background: var(--bb-page-bg, #fff);
  }

  .disc-thread-index-header,
  .disc-conversation-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--bb-input-border, #e2e8f0);
    border-radius: 12px 12px 0 0;
    background: color-mix(in srgb, var(--disc-card) 95%, var(--disc-accent));
    color: var(--disc-ink);
  }

  .disc-thread-index-header {
    justify-content: space-between;
  }

  .disc-thread-index-header h2,
  .disc-conversation-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .disc-conversation-header h2 {
    flex: 1;
    min-width: 0;
  }

  .disc-thread-count {
    font-size: 0.75rem;
    opacity: 0.8;
  }

  .disc-thread-back {
    display: inline-flex;
    align-items: center;
    color: var(--bb-link, #4f46e5) !important;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 500;
    text-decoration: none;
  }

  .disc-new-thread-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--bb-accent-border, var(--bb-accent, #5c7a36));
    border-radius: 7px;
    background: var(--bb-accent, #5c7a36);
    color: var(--bb-accent-text, #fff) !important;
    font-size: 0.8rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  .disc-thread-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .disc-import-thread-list { min-width: 0; margin: 1rem 0; }
  .disc-import-thread-list legend { max-width: 100%; overflow-wrap: anywhere; }
  .disc-import-thread-choice { display: flex; align-items: start; gap: 0.65rem; padding: 0.65rem 0; }
  .disc-import-thread-choice > span { min-width: 0; overflow-wrap: anywhere; }
  .disc-import-thread-choice small { display: block; color: var(--disc-muted); }

  .disc-new-thread-action:hover {
    filter: brightness(0.94);
    color: var(--bb-accent-text, #fff) !important;
  }

  .disc-new-thread-action > span {
    font-size: 1.25rem;
    font-weight: 500;
  }

  .disc-thread-list {
    display: grid;
    gap: 0;
    padding: 0.3rem 0;
  }

  .disc-thread-list-item {
    position: relative;
    display: flex;
    align-items: stretch;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid var(--disc-line-soft);
    border-radius: 0;
    background: var(--disc-card);
    transition: background 0.15s ease;
  }

  .disc-thread-list-item:hover {
    background: var(--bb-nav-hover, #eef2f7);
    box-shadow: none;
  }

  .disc-thread-list-item.is-menu-open {
    z-index: 120;
  }

  .disc-thread-list-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    flex: 1;
    gap: 0.35rem 1rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    color: var(--bb-page-text, #172033) !important;
    text-decoration: none;
  }

  .disc-thread-list-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .disc-thread-source-icon {
    display: inline-block;
    width: 1.2em;
    font-size: 0.92em;
    text-align: center;
  }

  .disc-thread-list-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    color: color-mix(in srgb, var(--bb-page-text, #172033) 70%, transparent);
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .disc-thread-list-status {
    grid-column: 1;
    justify-self: start;
    padding: 0.16rem 0.42rem;
    border-radius: 5px;
    background: var(--bb-badge-hidden-bg, #ede9fe);
    color: var(--bb-badge-hidden-text, #6d28d9);
    font-size: 0.63rem;
    font-weight: 700;
  }

  .disc-thread-list-item .disc-thread-menu-wrap {
    align-self: center;
    margin: 0 .5rem 0 .15rem;
  }

  .disc-thread-list-empty {
    padding: 1.5rem 1rem;
    color: var(--bb-cart-btn-border, #2f55a1);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
  }

  .disc-thread-detail-pane {
    min-width: 0;
    border-radius: inherit;
    background: var(--bb-page-bg, #fff);
  }

  .disc-workspace .disc-shell--embedded-conversation,
  .disc-workspace .disc-thread-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .disc-workspace .disc-shell--embedded-conversation {
    flex: 0 1 auto;
    min-height: 0;
  }

  .disc-thread-detail-pane > .disc-inline-thread,
  .disc-workspace .disc-shell--embedded-conversation {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
  }

  .disc-workspace .disc-msg-list[data-discussion-post-viewport] {
    position: relative;
    box-sizing: border-box;
    flex: 0 1 auto;
    height: auto;
    max-height: clamp(28rem, 58vh, 38rem);
    overflow-y: auto;
    overscroll-behavior: auto;
    scrollbar-gutter: stable;
  }

  .disc-older-posts-status {
    display: block;
    width: fit-content;
    min-height: 44px;
    margin: 0 auto 0.6rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--bb-input-border, #d1d5db);
    border-radius: 6px;
    background: var(--bb-page-bg, #fff);
    color: color-mix(in srgb, var(--bb-page-text, #172033) 78%, transparent);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    font-size: 0.75rem;
    font-weight: 650;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
  }
  .disc-older-posts-status.is-loading { opacity: 0.65; cursor: wait; }
  .disc-older-posts-status.is-complete { box-shadow: none; cursor: default; }

  @media (max-width: 760px) {
    .disc-thread-list {
      padding: 0.4rem 0;
    }

    .disc-thread-list-link {
      grid-template-columns: minmax(0, 1fr);
      padding: 0.55rem 0.6rem;
    }

    .disc-thread-list-meta {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.75rem;
    }

    .disc-conversation-header h2 {
      flex-basis: calc(100% - 3rem);
    }

    .disc-workspace .disc-msg-list[data-discussion-post-viewport] {
      max-height: clamp(22rem, 60dvh, 32rem);
    }
  }

  .disc-thread-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding: 0.35rem 0.8rem;
    border-bottom: 1px solid var(--disc-line-soft);
    background: var(--disc-card);
  }
  .disc-thread-tabs button {
    min-width: 0;
    padding: 0.45rem 0.7rem;
    color: var(--disc-ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 0.82rem;
    cursor: pointer;
  }
  .disc-thread-tabs button[aria-selected="true"] {
    background: var(--disc-soft);
    border-color: transparent;
    color: var(--disc-ink);
    font-weight: 600;
  }
  .disc-thread-tabs button:focus-visible { outline: 2px solid var(--disc-link); outline-offset: 1px; }
  [data-disc-thread-panel][hidden] { display: none !important; }
  .disc-thread-page--session-chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
  }
  .disc-thread-page--session-chat > .disc-shell--conversation {
    flex: 0 0 auto;
    min-height: 0;
    height: calc(100dvh - 16rem);
  }
  .disc-thread-page--session-chat [data-chat-viewport],
  .disc-thread-page--session-chat [data-session-chat-viewport] {
    flex: 1 1 0;
    overflow-y: auto;
    overflow-anchor: none;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
  .disc-thread-page--session-chat .disc-reply-card {
    flex: 0 0 auto;
    max-height: 45dvh;
    overflow-y: auto;
  }
  .disc-thread-page--session-chat .disc-thread-tabs {
    flex: 0 0 auto;
  }
  .disc-thread-page--session-chat .disc-thread-resources {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .disc-session-history-button {
    display: block;
    margin: 0.4rem auto;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--disc-border);
    border-radius: 6px;
    background: var(--bb-page-bg, #fff);
    color: var(--bb-page-text, #172033);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
  }
  .disc-thread-resources { min-width: 0; padding: 0.65rem 0.85rem; }
  .disc-resource-row {
    display: grid;
    grid-template-columns: minmax(7rem, 0.65fr) minmax(0, 2fr) 56px minmax(6.35rem, auto);
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--disc-line-soft);
  }
  .disc-resource-row > * { min-width: 0; }
  .disc-resource-row:last-child { border-bottom: 0; }
  .disc-resource-who { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; gap: 0.5rem; padding-right: 0.6rem; border-right: 1px solid var(--disc-line-soft); }
  .disc-resource-who time { color: var(--disc-muted); font-size: 0.7rem; line-height: 1.3; }
  .disc-resource-person { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; font-weight: 600; }
  .disc-resource-link { overflow-wrap: anywhere; font-size: 0.88rem; font-weight: 600; text-decoration: none; }
  .disc-resource-link:hover { text-decoration: underline; }
  .disc-resource-preview { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--disc-line-soft); border-radius: 8px; background: var(--disc-soft); overflow: hidden; }
  .disc-resource-preview img { width: 100%; height: 100%; object-fit: cover; }
  .disc-resource-side { display: flex; align-items: center; justify-content: flex-end; align-self: stretch; padding-left: 0.65rem; border-left: 1px solid var(--disc-line-soft); }
  .disc-resource-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--disc-line-soft);
    border-radius: 7px;
    background: var(--disc-soft);
    color: var(--disc-link);
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
  }
  .disc-resource-action-link:hover { background: var(--disc-elevated); border-color: var(--disc-border); }
  .disc-resource-action-link:focus-visible,
  .disc-resource-preview:focus-visible,
  .disc-resource-link:focus-visible { outline: 2px solid var(--disc-link); outline-offset: 2px; }
  .disc-resource-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.5rem; font-size: 0.8rem; }
  @media (max-width: 640px) {
    .disc-resource-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 0.65rem; }
    .disc-resource-who { grid-column: 1; grid-row: 1; border-right: 0; gap: 0.15rem; }
    .disc-resource-link { grid-column: 1; grid-row: 2; }
    .disc-resource-preview { grid-column: 2; grid-row: 1; justify-self: end; }
    .disc-resource-side { grid-column: 2; grid-row: 2; border-left: 0; padding-left: 0; }
  }
  @media (max-width: 320px) {
    .disc-resource-row { grid-template-columns: minmax(0, 1fr); }
    .disc-resource-preview { grid-column: 1; grid-row: 3; justify-self: start; }
    .disc-resource-side { grid-column: 1; grid-row: 4; justify-content: flex-start; }
  }
  .disc-reply-view-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.25rem 0.85rem;
    padding: 0.35rem 1.1rem;
    border-bottom: 1px solid var(--disc-line-soft);
    color: var(--disc-muted);
    font-size: 0.7rem;
    background: var(--disc-card);
  }
  .disc-reply-view-controls[hidden],
  .disc-reply-bulk-controls[hidden],
  [data-disc-reply-posts] .discussion-post[hidden],
  .disc-reply-preview[hidden] { display: none; }
  .disc-reply-setting {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
  }
  .disc-reply-setting--hide { margin-inline-end: auto; }
  .disc-reply-setting label { cursor: pointer; }
  .disc-reply-switch {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    width: 32px;
    height: 28px;
    padding: 0 0 0 4px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
  }
  .disc-reply-switch::before { content: ""; position: absolute; inset: 6px 2px; border: 1px solid var(--disc-border); border-radius: inherit; background: var(--disc-soft); }
  .disc-reply-switch span {
    display: block;
    position: relative;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--disc-muted);
    transition: transform 120ms ease;
  }
  .disc-reply-switch[aria-checked="true"]::before { background: var(--disc-accent); border-color: var(--disc-accent); }
  .disc-reply-switch[aria-checked="true"] span { transform: translateX(12px); background: var(--disc-accent-text); }
  .disc-reply-switch:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 3px; }
  .disc-reply-bulk-controls { display: inline-flex; gap: 0.45rem; }
  .disc-reply-bulk-controls button,
  [data-disc-reply-save-retry] {
    border: 0;
    border-radius: 5px;
    min-height: 28px;
    padding: 0.15rem 0.35rem;
    background: transparent;
    color: var(--disc-link);
    font: inherit;
    cursor: pointer;
  }
  .disc-reply-bulk-controls button:disabled { opacity: 0.45; cursor: default; }
  .disc-reply-bulk-controls button:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 2px; }
  [data-disc-reply-save-status]:empty { display: none; }
  .disc-reply-count {
    display: block;
    margin: 0 0 0.3rem calc(var(--disc-message-padding-x) + var(--disc-sender-width) + var(--disc-message-gap));
    min-height: 28px;
    padding: 0.25rem 0.35rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--disc-link);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 550;
    cursor: pointer;
  }
  .disc-reply-count::before { content: "⌄"; display: inline-block; margin-inline-end: 0.4rem; }
  .disc-reply-count[aria-expanded="false"]::before { content: "›"; }
  .disc-reply-count:hover { text-decoration: underline; }
  .disc-reply-preview {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
    margin-bottom: 0.15rem;
    padding-inline-start: 0.4rem;
    border-inline-start: 2px solid var(--disc-border);
    color: var(--disc-muted) !important;
    font-size: 0.76rem;
    text-decoration: none;
  }
  .disc-reply-preview strong { flex-shrink: 0; }
  .disc-reply-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .disc-reply-preview:hover { color: var(--disc-link) !important; }
  .disc-reply-count:focus-visible,
  .disc-reply-preview:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 2px; }
  @media (max-width: 540px) {
    .disc-reply-view-controls { padding-inline: 0.7rem; gap: 0.1rem 0.45rem; }
    .disc-reply-bulk-controls { flex-basis: 100%; justify-content: flex-end; }
    .disc-msg-head { gap: 0.2rem 0.4rem; }
    .disc-msg-time { font-size: 0.65rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .disc-reply-switch span, .disc-reply-card > form { transition: none; }
  }
  .discussion-mention { color: var(--disc-link); background: color-mix(in srgb, var(--disc-accent) 12%, transparent); border-radius: 4px; padding: 0 0.15rem; font-weight: 600; }
  .disc-mention-picker { position: fixed; z-index: 10070; box-sizing: border-box; max-height: min(240px, calc(100dvh - 16px)); overflow-y: auto; padding: 0.3rem; border: 1px solid var(--disc-border); border-radius: 9px; background: var(--disc-card); color: var(--disc-ink); box-shadow: var(--disc-shadow); font: 0.85rem/1.4 var(--disc-font); }
  .disc-mention-picker[hidden] { display: none; }
  .disc-mention-picker button { display: block; width: 100%; min-height: 32px; padding: 0.4rem 0.55rem; text-align: start; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
  .disc-mention-picker button:hover, .disc-mention-picker [aria-selected="true"] { background: var(--disc-soft); color: var(--disc-link); }
  .disc-mention-picker [role="status"] { padding: 0.4rem 0.55rem; color: var(--disc-muted); }
/* Reaction names remain readable above scrolling chat panes and the phone keyboard. */
.disc-reaction-inspect { display: inline-flex; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; }
.disc-reaction-inspect:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 2px; border-radius: 8px; }
.disc-reaction-names { position: fixed; z-index: 10100; box-sizing: border-box; max-width: min(320px, calc(100vw - 16px)); max-height: 40dvh; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--disc-border, #64748b); border-radius: 8px; background: var(--disc-card, var(--bb-page-bg, #fff)); color: var(--disc-ink, var(--bb-page-text, #172033)); box-shadow: 0 4px 20px #0003; font: 14px/1.45 var(--disc-font, system-ui, sans-serif); overflow-wrap: anywhere; }

  .disc-thread-title-editor { display: flex; align-items: center; gap: .5rem; min-width: 0; }
  [data-disc-thread-title-editor] > [hidden] { display: none !important; }
  .disc-thread-icon-action {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; align-self: center; width: 2rem; height: 2rem; min-height: 0;
    padding: 0; border: 0; border-radius: .35rem; box-shadow: none;
    background: transparent; color: var(--disc-muted); cursor: pointer;
  }
  .disc-thread-icon-action:hover { background: var(--disc-soft); color: var(--disc-link); }
  .disc-thread-icon-action:focus-visible { outline: 2px solid var(--disc-accent); outline-offset: 2px; }
  .disc-thread-list-item .disc-thread-rename { margin-inline-end: .15rem; }
  .disc-thread-list-item > .disc-thread-rename-form { padding: .65rem 1rem; }
  .disc-editor-toolbar .disc-format-group { display: inline-flex; align-items: center; gap: .1rem; }
  .disc-editor-toolbar .disc-format-group + .disc-format-group { margin-inline: .3rem; }
  .disc-editor-toolbar[data-disc-basic-formatting] {
    width: fit-content; max-width: 100%; gap: .1rem; align-items: center; padding: .1rem 0 .2rem;
    border: 0; border-radius: 0; background: transparent;
  }
  .disc-editor-toolbar[data-disc-basic-formatting] .disc-editor-btn,
  .disc-editor-toolbar[data-disc-basic-formatting] .disc-composer-gif {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; min-height: 2rem; padding: .25rem;
    border: 0; box-shadow: none; background: transparent; color: var(--disc-muted);
  }
  .disc-editor-toolbar[data-disc-basic-formatting] .disc-editor-btn:hover { background: var(--disc-soft); color: var(--disc-ink); }

  .disc-thread-rename-form { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: .5rem; min-width: 0; }
  .disc-thread-rename-form input[name="title"] { flex: 1 1 12rem; min-width: 0; padding: .5rem .7rem; border: 1px solid var(--disc-border); border-radius: .4rem; background: var(--disc-card); color: var(--disc-ink); font: inherit; }
  .disc-thread-rename-form [role="status"] { font-size: .85rem; }
  :is(.disc-msg-body, .disc-editor, .disc-in-place-edit-field, .discussion-editor) :is(ul, ol) { margin: .35rem 0 .5rem; padding-inline-start: 1.5rem; }
  :is(.disc-msg-body, .disc-editor, .disc-in-place-edit-field, .discussion-editor) ul { list-style-type: disc; }
  :is(.disc-msg-body, .disc-editor, .disc-in-place-edit-field, .discussion-editor) ol { list-style-type: decimal; }
  .disc-media-viewer { box-sizing: border-box; width: min(1100px, calc(100vw - 2rem)); max-width: none; max-height: 94dvh; margin: auto; padding: 0; border: 1px solid var(--disc-border, #64748b); border-radius: 12px; background: var(--disc-card, #fff); color: var(--disc-ink, #172033); box-shadow: 0 12px 50px #0005; }
  .disc-media-viewer::backdrop { background: #000b; }
  .disc-media-viewer > header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .65rem .85rem; border-bottom: 1px solid var(--disc-border, #64748b); }
  .disc-media-viewer header > strong { min-width: 0; overflow-wrap: anywhere; }
  .disc-media-viewer header > div { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
  .disc-media-viewer button, .disc-media-viewer header a { padding: .4rem .6rem; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
  .disc-media-viewer button:hover, .disc-media-viewer header a:hover { background: var(--disc-soft, #e2e8f0); }
  .disc-media-viewer [data-media-close] { font-size: 1.5rem; line-height: 1; }
  .disc-media-viewer [data-media-size][hidden] { display: none; }
  .disc-media-viewer [data-media-error] { padding: .75rem; }
  .disc-media-viewer [data-media-error][hidden], .disc-media-content [hidden] { display: none; }
  .disc-media-content { max-height: 80dvh; overflow: auto; padding: .75rem; text-align: center; }
  .disc-media-content img, .disc-media-content video { display: block; width: 100%; max-width: 100%; max-height: 75dvh; object-fit: contain; margin: auto; }
  .disc-media-viewer.is-zoomed img { width: auto; max-width: none; max-height: none; }
  .disc-media-content iframe { display: block; width: 100%; height: 75dvh; border: 0; background: white; }
  .disc-media-content audio { width: min(100%, 40rem); }
  .disc-post-attachment a:has(img), .disc-web-gif-link:has(img) { cursor: zoom-in; }
