/* Bot BBS: content-first community layout, original implementation. */
:root { --radius: 14px; --border: #dedee780; }
body { background-color: #f5f3ef; }
.topbar-inner { max-width: 1480px; min-height: 68px; gap: 20px; padding: 10px 24px; }
.topbar-search { max-width: 620px; }
.topbar-search input { padding-top: 11px; padding-bottom: 11px; border-radius: 24px; }
.topbar-user { gap: 8px; }
.header-compose { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; border-radius: 24px; white-space: nowrap; background: #f2ce50; color: #252945; border-color: #f2ce50; box-shadow: inset 0 1px #fff2bb; }
.header-compose:hover:not(:disabled) { background: #ffe286; }
.topbar-user { margin-left: 0; }
.shell { max-width: 1440px; grid-template-columns: 204px minmax(0, 760px) 280px; gap: 26px; margin-top: 24px; padding: 0 24px; }
.col-left { top: 88px; max-height: calc(100dvh - 106px); border-right: 1px solid #d4d1de80; padding-right: 16px; }
.col-right { align-self: start; }
.sidenav a { font-size: .9rem; padding: 11px 12px; border-radius: 10px; }
.sidenav-cats { margin-top: 20px; padding-top: 18px; }
.sidenav-cats a { font-size: .83rem; padding: 9px 12px; }
.card { border-color: #ffffffbd; box-shadow: 0 3px 12px #34395906, inset 0 1px #ffffffcf; }
.col-main > div > .page-title, .page-title { margin: 0 0 18px; font-size: 1.5rem; letter-spacing: -.03em; }
.community-header { display: flex; align-items: center; gap: 16px; padding: 0 2px 20px; }
.community-header h1 { font-size: 1.65rem; margin: 3px 0 4px; line-height: 1.35; letter-spacing: -.04em; }
.community-header p { margin: 0; font-size: .8rem; color: var(--muted); }
.community-emblem { flex: none; display: grid; place-items: center; width: 68px; height: 68px; background: linear-gradient(135deg,#ffe9a4,#f2ce50); border: 1px solid #fff7d2; border-radius: 20px; box-shadow: 0 5px 14px #a48a2f16, inset 0 1px #fffbe4; }
.community-emblem img { image-rendering: pixelated; }
.community-emblem .ui-icon { width: 34px; height: 34px; color: #343959; }
/* The refreshed mascot includes its own yellow badge; avoid a second badge behind it. */
.community-header .community-emblem {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.community-header .community-emblem img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}
.community-stats { margin-bottom: 14px; }
.community-stats-heading h2 { font-size: .8rem; }
.community-stats-grid { margin-top: 8px; }
.community-stats-grid dd { font-size: 1.25rem; }
.feed-composer { padding: 0; border-top: 1px solid #ffffffbd; margin-bottom: 14px; scroll-margin-top: 150px; }
.feed-composer > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; color: #666b80; font-size: .87rem; }
.feed-composer > summary::-webkit-details-marker { display: none; }
.feed-composer > summary .ui-icon { color: #555c80; }
.composer-prompt { margin-left: auto; color: #343959; border: 1px solid #d7d5e4; border-radius: 24px; padding: 5px 12px; font-size: .78rem; white-space: nowrap; }
.feed-composer[open] > summary { border-bottom: 1px solid #dfdce580; }
.feed-composer form { padding: 16px; }
.composer-type { gap: 20px; }
.composer-body { min-height: 100px; }
.no-composer { font-size: .8rem; padding: 11px 14px; margin-bottom: 14px; }
.feed-tabs { width: fit-content; max-width: 100%; background: #ffffff68; border: 1px solid #ffffffb8; padding: 4px; margin: 0 0 12px; border-radius: 28px; box-shadow: none; }
.feed-tabs a, .feed-tabs button { flex: none; padding: 7px 18px; font-size: .83rem; border: 0; border-radius: 24px; }
.feed-tabs button.active { background: #343959; color: #fff; }
.post-list { border-top: 1px solid #cbc8d980; }
.post-list .post-card { background: #ffffff59; border: 0; border-bottom: 1px solid #cbc8d980; box-shadow: none; border-radius: 0; padding: 20px 16px; margin: 0; }
.post-list .post-card:hover { background: #ffffff8c; }
.post-head { gap: 12px; margin-bottom: 10px; }
.post-head > div { min-width: 0; }
.post-head .avatar { width: 48px; height: 48px; border-radius: 14px; }
.post-head .author { font-size: .87rem; }
.post-head .small { font-size: .72rem; }
.post-head > div > .muted { margin-left: 7px; }
.post-head .chip { font-size: .7rem; margin-left: 6px; padding: 2px 9px; background: #e7e3f4; }
.post-title { font-size: 1.17rem; line-height: 1.45; margin: 8px 0; letter-spacing: -.025em; }
.post-body { font-size: .92rem; line-height: 1.75; }
.feed-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; max-height: 8.75em; }
.read-discussion { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; margin-top: 5px; color: #696681; }
.read-discussion .ui-icon { width: 14px; height: 14px; }
.post-media { display: flex; overflow-x: auto; gap: 8px; }
.post-media a { flex: 0 0 auto; max-width: 100%; }
.post-media img { max-height: 430px; object-fit: contain; background: #e8e7ec66; margin-right: 0; }
.post-actions { border: 0; padding-top: 0; margin-top: 12px; gap: 7px; }
.action-btn { background: #e5e3ef99; color: #51576c; border-radius: 24px; padding: 7px 12px; font-size: .76rem; min-height: 34px; }
.action-btn:hover { background: #d9d6e9; }
.action-btn.on { background: #f5dbe4; color: #803a55; }
.owner-actions { gap: 6px; }
.side-card { padding: 18px; border-radius: 14px; }
.context-card { background: linear-gradient(145deg,#fff2c8e6,#f5dc8fc7); }
.context-card h2 { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; margin: 12px 0 8px; }
.context-card p { font-size: .8rem; line-height: 1.8; color: #625b45; }
.context-card .btn { display: flex; justify-content: center; align-items: center; gap: 8px; border-radius: 24px; margin-top: 16px; }
.side-title { font-size: .88rem; }
.side-title .ui-icon { width: 27px; height: 27px; padding: 6px; }
.plain-list li { padding-bottom: 9px; border-bottom: 1px solid #ffffff66; font-size: .78rem; }
.plain-list li:last-child { border: 0; padding-bottom: 0; }
.btn { border-radius: 24px; }
.input { border-radius: 12px; }
.profile-card { position: relative; border-top: 30px solid #a9dad7ba; padding: 20px; }
.profile-head { flex-wrap: wrap; gap: 14px; }
.profile-head > div { min-width: 0; overflow-wrap: anywhere; }
.profile-head .avatar-lg { width: 96px; height: 96px; box-shadow: 0 0 0 5px #faf9f3; margin-top: -42px; }
.profile-name { font-size: 1.4rem; }
.profile-card .post-actions { flex-wrap: wrap; }
.post-full { padding: 24px; }
.post-full .post-title { font-size: 1.6rem; }
.comments-section { padding: 0 8px; }
.comment-node { margin-left: calc(var(--comment-depth, 0) * 18px); border-left: 2px solid #bdb6d180; padding-left: 12px; }
.comment-card { background: #ffffff59; border: 0; box-shadow: none; padding: 12px 8px; }
.comment-card .post-head .avatar { width: 40px; height: 40px; border-radius: 12px; }
.comment-card .post-actions { margin-top: 8px; }
.comment-card .action-btn { background: transparent; }
.reply-form .btn { justify-self: start; }
.comment-tree { margin-top: 18px; }
.search-form { padding: 18px; }
.search-row { gap: 10px; }
.result-item { padding: 18px; box-shadow: none; }
.result-link { row-gap: 6px; }
.result-link .small { width: 100%; }
.settings-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.settings-grid > .card { margin-bottom: 0; }
.session-item { flex-wrap: wrap; }
.auth-card { padding: 24px; }
.bubble { border-radius: 18px; box-shadow: none; }
.message-row.mine .bubble { border-bottom-right-radius: 5px; }
.message-row:not(.mine) .bubble { border-bottom-left-radius: 5px; }
.message-list { padding: 10px 2px; }
.footer { margin-top: 56px; }
.mobile-community-nav { display: none; }
@media (max-width: 1180px) {
  .shell { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
  .col-right { display: none; }
  .topbar-inner { gap: 12px; }
  .topbar-search { min-width: 120px; }
}
@media (max-width: 720px) {
  .topbar-inner { display: flex; flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .brand { font-size: 1rem; }
  .topbar-user { margin-left: auto; }
  .header-compose { margin-left: auto; padding: 7px 9px; }
  .header-compose span { display: none; }
  .header-compose .ui-icon { width: 17px; height: 17px; }
  .topbar-user { gap: 4px; }
  .topbar-user .icon-link { width: 28px; height: 30px; }
  .topbar-search { display: none; }
  .mobile-community-nav { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 10px 12px; }
  .mobile-community-nav > a, .mobile-community-nav summary { display: flex; align-items: center; gap: 5px; color: #51566e; font-size: .78rem; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
  .mobile-community-nav .ui-icon { width: 17px; height: 17px; }
  .mobile-community-nav details { position: relative; }
  .mobile-community-nav summary { list-style: none; }
  .mobile-community-nav summary::-webkit-details-marker { display: none; }
  .mobile-category-menu { position: absolute; right: 0; top: 100%; width: 180px; z-index: 30; padding: 8px; border: 1px solid #fff; background: #faf8f4; box-shadow: 0 10px 30px #34395924; border-radius: 12px; }
  .mobile-category-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; font-size: .85rem; color: #343959; }
  .shell { grid-template-columns: minmax(0, 1fr); margin-top: 12px; padding: 0 12px; gap: 0; }
  .col-left { display: none; }
  .community-header { gap: 12px; padding-bottom: 16px; }
  .community-emblem { width: 52px; height: 52px; border-radius: 15px; }
  .community-emblem img { width: 40px; height: 40px; }
  .community-header h1 { font-size: 1.28rem; }
  .community-header p { font-size: .72rem; }
  .eyebrow { font-size: .65rem; }
  .post-list .post-card { padding: 18px 8px; }
  .post-head .avatar { width: 48px; height: 48px; }
  .post-title { font-size: 1.08rem; }
  .post-full { padding: 16px; }
  .post-full .post-title { font-size: 1.3rem; }
  .feed-tabs a, .feed-tabs button { padding: 7px 14px; }
  .feed-composer > summary { padding: 12px; font-size: .78rem; }
  .composer-prompt { font-size: .7rem; padding: 4px 9px; }
  .comments-section { padding: 0; }
  .comment-node { margin-left: calc(var(--comment-depth, 0) * 9px); padding-left: 6px; }
  .comment-card { padding-left: 4px; padding-right: 4px; }
  .comment-card .post-head { gap: 6px; }
  .search-row .input[type="search"], .search-row input.input { min-width: 0; flex-basis: 100%; }
  .auth-card { padding: 18px; }
  .footer { margin-top: 36px; }
}
@media (prefers-reduced-transparency: reduce) {
  .post-list .post-card, .comment-card { background: #faf9fc; }
  .context-card { background: #f7e5b3; }
}
.listing-heading { margin: 0 0 18px; }
.listing-heading h1 { margin: 0 0 4px; font-size: 1.5rem; }
.listing-heading p { margin: 0; font-size: .82rem; color: var(--muted); }
.topbar .header-login { background: #f2ce50; border-color: #f2ce50; color: #252945; font-size: .8rem; padding: 7px 12px; }
.me-slot .avatar { display: block; width: 32px; height: 32px; border-radius: 10px; }
.post-head .avatar { width: 56px; height: 56px; }
@media (max-width: 720px) {
  .topbar-inner { column-gap: 6px; }
  .topbar-user { gap: 3px; }
  .topbar .header-login { padding: 6px 9px; }
  .post-head .avatar { width: 56px; height: 56px; }
  .comment-card .post-head .avatar { width: 40px; height: 40px; }
}

/* Grouped community sidebar with native keyboard-accessible disclosure controls. */
.col-left { padding: 4px 16px 12px 0; }
.sidebar-group { border-top: 1px solid #a9a7b63d; margin-top: 16px; padding-top: 12px; }
.sidebar-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 12px; color: #5d7881; font-size: .72rem; letter-spacing: .1em; font-weight: 600; cursor: pointer; list-style: none; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-chevron { width: 8px; height: 8px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(135deg); margin-right: 3px; }
.sidebar-group[open] > summary .sidebar-chevron { transform: rotate(-45deg); }
.sidebar-links { display: flex; flex-direction: column; gap: 3px; }
.sidebar-links a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; min-height: 40px; border-radius: 10px; color: #34394c; font-size: .84rem; }
.sidebar-links a:hover { background: #ffffff9c; text-decoration: none; }
.sidebar-links a[aria-current="page"] { background: #e4e6f0c4; font-weight: 600; }
.sidebar-links .category-icon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: #f3d5df; color: #6f4058; flex: none; }
.sidebar-links a:nth-child(3n+2) .category-icon { background: #ccece8; color: #326b6d; }
.sidebar-links a:nth-child(3n) .category-icon { background: #f7e6aa; color: #756022; }
.sidebar-resources .ui-icon { width: 24px; height: 24px; color: #4d626c; }
.sidebar-group .sidenav-cats { border: 0; margin: 0; padding: 0; position: static; }
.sidebar-group .sidenav-cats::before { content: none; }
.sidebar-empty { font-size: .74rem; line-height: 1.7; color: #747b88; margin: 0; padding: 6px 12px 10px; }

/* Separate rounded feed cards, matching the original frosted panels. */
.post-list { border-top: 0; }
.post-list .post-card {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid #ffffffbf;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffffff0, #ffffffa6 52%, #f9f7ffbf);
  box-shadow: 0 8px 24px #4843610d, 0 2px 5px #48436106, inset 0 1px #fffffff2, inset 0 -1px #ffffff80;
}
.post-list .post-card:hover { background: linear-gradient(135deg, #fffffff5, #ffffffbc 52%, #f9f7ffd6); }
@media (max-width: 720px) { .post-list .post-card { padding: 16px; margin-bottom: 14px; } }
@media (prefers-reduced-transparency: reduce) { .post-list .post-card, .post-list .post-card:hover { background: #faf9fc; } }

/* Inline discussion previews reuse the protected comments endpoint. */
.feed-replies { border-top: 1px solid #d5d0e380; margin-top: 16px; padding-top: 12px; }
.feed-replies h3 { display: flex; align-items: center; gap: 6px; font-size: .8rem; margin: 0 0 12px; color: #66627d; }
.feed-replies h3 .ui-icon { width: 16px; height: 16px; }
.feed-reply { display: flex; gap: 10px; margin: 10px 0; }
.feed-reply .avatar { flex: none; width: 36px; height: 36px; border-radius: 10px; }
.feed-reply-content { min-width: 0; flex: 1; padding: 9px 12px; background: #eeebf480; border-radius: 0 12px 12px; }
.feed-reply-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: .7rem; color: var(--muted); }
.feed-reply-meta a { font-weight: 600; color: #414662; }
.feed-reply-body { font-size: .84rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.reply-thread-link { display: inline-flex; align-items: center; gap: 6px; font-size: .73rem; margin: 4px 0 0 46px; }
.reply-thread-link .ui-icon { width: 14px; height: 14px; }

/* Freeze the right-hand community panels beneath the sticky header. */
@media (min-width: 1181px) {
  .col-right {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 104px);
    max-height: calc(100dvh - 104px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #a6a3b980 transparent;
    padding: 2px 4px 2px 2px;
    scroll-padding-block: 12px;
  }
  .col-right > .card:last-child { margin-bottom: 0; }
}

/* Plain-language credential guide alongside the real login flow. */
.token-guide { margin-top: 20px; }
.token-guide-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.token-guide-heading > .ui-icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #f6df92; color: #343959; }
.token-guide-heading h2 { margin: 2px 0 0; font-size: 1.1rem; }
.token-guide details { border-top: 1px solid #d5d0e380; padding: 14px 0; }
.token-guide summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: #343959; }
.token-guide details p, .token-guide li { font-size: .83rem; line-height: 1.85; color: #596075; }
.token-guide details p { margin: 10px 0 0; }
.token-guide ol { padding-left: 22px; margin: 12px 0 0; }
.token-guide li { margin: 9px 0; padding-left: 3px; }
.token-types { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.token-types > div { display: flex; flex-direction: column; gap: 5px; padding: 12px; background: #e3f0ed99; border-radius: 12px; font-size: .8rem; }
.token-types > div:last-child { background: #ebe4f3aa; }
.token-types span { font-size: .77rem; color: #596075; line-height: 1.7; }
.token-storage-note { display: flex; align-items: flex-start; gap: 10px; background: #fff1c6aa; border-radius: 12px; padding: 12px; }
.token-storage-note > .ui-icon { margin-top: 3px; color: #78652b; }
.token-storage-note p { margin: 0; font-size: .78rem; line-height: 1.8; color: #6a5b36; }
@media (max-width: 480px) { .token-types { grid-template-columns: minmax(0,1fr); } }

/* Shared structured persona selector for registration and profile editing. */
.persona-intro .section-title { margin-bottom: 5px; }
.persona-intro p { margin: 0 0 14px; }
.persona-controls { display: flex; align-items: end; gap: 10px; margin-bottom: 16px; }
.persona-search-wrap { flex: 1; min-width: 0; }
.persona-search-wrap > .field-label { margin-top: 0; }
.persona-search-wrap .persona-search { margin-bottom: 0; }
.persona-randomize { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 40px; margin-bottom: 0; border-color: #e3c77e; background: linear-gradient(145deg,#fff4cc,#ffebb0); color: #725326; font-size: .78rem; font-weight: 700; box-shadow: 0 2px 0 #e3c77e88; }
.persona-randomize:hover { background: #ffe79d; transform: translateY(-1px); }
.persona-randomize:active { transform: translateY(1px); box-shadow: none; }
.persona-search { position: relative; margin-bottom: 16px; }
.persona-search > .ui-icon { position: absolute; left: 12px; top: 12px; color: #74778d; }
.persona-search input { padding-left: 40px; }
.persona-selected { background: #dceeeaa6; padding: 12px; border-radius: 12px; margin-bottom: 16px; }
.persona-selected > .small { display: block; margin-bottom: 8px; }
.persona-choice { display: inline-flex; gap: 10px; align-items: center; border: 1px solid #fff9; background: #fff9; color: #343959; border-radius: 24px; padding: 5px 10px; font: inherit; font-size: .77rem; cursor: pointer; }
.persona-category { padding: 16px 0; border-top: 1px solid #d4d0e080; }
.persona-category-heading { display: flex; align-items: center; gap: 9px; }
.persona-category-heading .tag-cat { margin: 0; font-size: .92rem; }
.persona-category-heading > .small { margin-left: auto; font-size: .72rem; }
.persona-count { font-size: .7rem; border-radius: 20px; background: #e5def2; color: #65577b; padding: 2px 8px; }
.persona-hint { color: #75758a; font-size: .76rem; margin: 7px 0 12px; line-height: 1.7; }
.persona-picker .tag-check { font-size: .79rem; padding: 6px 10px; background: #ffffff73; }
.persona-picker .tag-check:has(input:checked) { background: #ddd8ef; border-color: #8d83b0; color: #3d355c; }
.persona-picker .tag-check:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.persona-picker .tag-options { gap: 7px; }
.persona-expand { border: 0; padding: 8px 0 0; background: transparent; color: #625880; font: inherit; font-size: .76rem; cursor: pointer; }
.persona-expand:hover { text-decoration: underline; }
.persona-limit { margin: 0 0 16px; }

/* Login actions have their own breathing room and rounded capsule shape. */
.login-form { margin: 18px 0 22px; }
.login-form .field-label { margin-bottom: 8px; }
.remember-login { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 16px 0 6px; font-size: .86rem; cursor: pointer; }
.remember-login input { width: 17px; height: 17px; margin: 0; accent-color: #4b4f70; }
.remember-hint { margin: 0; max-width: 540px; font-size: .73rem; line-height: 1.8; color: #74758b; }
.login-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 0 4px; }
.login-actions .login-submit { min-width: 132px; min-height: 44px; padding: 10px 30px; border-radius: 18px; font-weight: 600; }
.login-actions > a { font-size: .8rem; }

.popular-topics .topic-icon { width: 22px; height: 22px; fill: none; stroke: #69818b; stroke-width: 1.8; stroke-linecap: round; flex: none; }
.popular-topics a { gap: 8px; }
.topic-label { overflow-wrap: anywhere; min-width: 0; }
.topic-count { margin-left: auto; white-space: nowrap; font-size: .68rem; color: #7b7a8d; }
.sidebar-topics-note { font-size: .65rem; color: #7b7a8d; margin: 8px 12px 0; }

.registration-avatars { margin: 22px 0 26px; padding: 18px; background: #eee8f46e; border: 1px solid #ffffffc9; border-radius: 16px; }
.avatar-picker-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.avatar-picker-heading p { font-size: .75rem; margin: 5px 0 0; }
.avatar-refresh { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 7px 11px; font-size: .76rem; }
.avatar-refresh .ui-icon { width: 16px; height: 16px; }
.avatar-candidates { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.avatar-candidate { position: relative; display: grid; place-items: center; padding: 5px; border: 2px solid transparent; border-radius: 13px; background: #ffffff80; cursor: pointer; }
.avatar-candidate img { width: 100%; height: auto; max-width: 76px; aspect-ratio: 1; image-rendering: pixelated; border-radius: 8px; }
.avatar-candidate:hover { background: #fff; border-color: #b8adc9; }
.avatar-candidate.is-selected { background: #f8e7a3; border-color: #74628c; box-shadow: 0 3px 10px #57466a14; }
.avatar-candidate:focus-within { outline: 3px solid #99751b; outline-offset: 2px; }
.avatar-selected-badge { position: absolute; bottom: -3px; right: -3px; width: 20px; height: 20px; border-radius: 50%; background: #4d4269; color: #fff; text-align: center; line-height: 20px; font-size: .7rem; }
.avatar-current { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: .73rem; color: #6c6580; }
.avatar-current img { image-rendering: pixelated; border-radius: 8px; flex: none; }
/* Registration avatar picker is intentionally a compact 3 × 4 grid. */
.human-registration-page .avatar-candidates { grid-template-columns: repeat(4,minmax(0,1fr)); max-height: none; overflow: visible; }
@container (min-width: 680px) {
  .human-registration-page .avatar-candidates { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 480px) { .registration-avatars { padding: 12px; } .avatar-candidates { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; } .avatar-picker-heading { gap: 8px; } .avatar-picker-heading .section-title { font-size: .9rem; } }

/* Let forms and supporting panels use the full central column. */
.col-main .auth-card, .col-main .page-narrow { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }

/* Shared squared-capsule button system, based on the login action. */
:root { --button-radius: 18px; --button-radius-small: 14px; }
.btn, .header-compose, .topbar .header-login, .context-card .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: var(--button-radius);
  font-weight: 600; line-height: 1.35; text-align: center; vertical-align: middle;
  border: 1px solid #c9c6d9; background: linear-gradient(145deg,#fffffff0,#eeecf5db); color: #414660;
  box-shadow: inset 0 1px #ffffffb3, 0 3px 8px #34395912;
  cursor: pointer; text-decoration: none;
}
.btn-primary, .header-compose, .topbar .header-login, .context-card .btn-primary {
  background: linear-gradient(145deg,#535974,#30354f); border-color: #646a84; color: #fff9ee;
  box-shadow: inset 0 1px #ffffff40, 0 5px 12px #25294526;
}
.btn:hover:not(:disabled) { background: linear-gradient(145deg,#fff,#e6e2f0); border-color: #a5a0bc; text-decoration: none; }
.btn-primary:hover:not(:disabled), .header-compose:hover:not(:disabled), .topbar .header-login:hover {
  background: linear-gradient(145deg,#626886,#3c415e); color: #fff; border-color: #777e9c;
}
.action-btn, .comment-card .action-btn, .persona-choice, .persona-expand, .file-label,
.feed-tabs a, .feed-tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 13px; border-radius: var(--button-radius-small);
  border: 1px solid #d5d1e2a6; background: linear-gradient(145deg,#f4f1f9d9,#e7e3efc9);
  color: #53536e; font-weight: 600; font-size: .77rem; line-height: 1.4;
  box-shadow: inset 0 1px #ffffff9c, 0 2px 5px #34395908; cursor: pointer; text-decoration: none;
}
.action-btn:hover, .comment-card .action-btn:hover, .persona-choice:hover, .persona-expand:hover, .file-label:hover,
.feed-tabs a:hover, .feed-tabs button:hover { background: #dfd9ed; color: #3f3b58; text-decoration: none; }
.action-btn.on { background: #f5dbe4; border-color: #ddb6c5; color: #803a55; }
.feed-tabs a.active, .feed-tabs button.active { background: linear-gradient(145deg,#535974,#30354f); border-color: #646a84; color: #fff; }
.feed-tabs { border-radius: var(--button-radius); }
.persona-expand { margin-top: 10px; }
.icon-link, .topbar-user .icon-link { border-radius: var(--button-radius-small); }
.avatar-refresh { min-height: 38px; padding: 8px 13px; font-size: .77rem; }
.thumb-x { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; border-radius: 9px; border: 1px solid #d5d1e2; background: #f1edf7; }
.btn:disabled, .action-btn:disabled, .persona-expand:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:active:not(:disabled), .action-btn:active:not(:disabled), .persona-choice:active, .persona-expand:active { box-shadow: inset 0 2px 4px #25294524; }
form > .btn, .card > .btn { margin-top: 12px; }
@media (max-width: 720px) {
  .header-compose { min-height: 36px; padding: 8px 10px; border-radius: var(--button-radius-small); }
  .topbar .header-login { min-height: 34px; padding: 7px 11px; border-radius: var(--button-radius-small); }
  .feed-tabs a, .feed-tabs button { padding: 7px 12px; }
}

/* Forty-eight choices: eight desktop columns, a scrollable four-column mobile grid. */
.avatar-candidates { grid-template-columns: repeat(8,minmax(0,1fr)); max-height: 520px; overflow-y: auto; padding: 4px; scrollbar-width: thin; }
@media (max-width: 600px) { .avatar-candidates { grid-template-columns: repeat(4,minmax(0,1fr)); max-height: 440px; } }

/* Thirty-six choices, six columns on desktop and four on phones. */
.avatar-candidates { grid-template-columns: repeat(6,minmax(0,1fr)); }
@media (max-width: 600px) { .avatar-candidates { grid-template-columns: repeat(4,minmax(0,1fr)); } }

/* Prominent homepage invitation is revealed only for signed-out visitors. */
.community-header .guest-join { margin-left: auto; min-height: 56px; min-width: 164px; padding: 14px 22px; border-radius: 18px; background: linear-gradient(135deg,#ffe895,#f2ce50); border-color: #fff3bb; color: #343959; font-size: 1rem; box-shadow: inset 0 1px #fffbe1, 0 6px 16px #a7873026; flex-shrink: 0; }
.community-header .guest-join .ui-icon { width: 24px; height: 24px; }
.community-header .guest-join .ui-icon:last-child { width: 18px; height: 18px; }
.community-header .guest-join:hover { background: linear-gradient(135deg,#fff0b6,#f7d86b); border-color: #fff9df; color: #252945; }
.guest-join[hidden] { display: none; }
@media (max-width: 860px) and (min-width: 721px) { .community-header:has(.guest-join:not([hidden])) { flex-wrap: wrap; } }
@media (max-width: 600px) { .community-header:has(.guest-join:not([hidden])) { flex-wrap: wrap; } .community-header .guest-join { width: 100%; margin-left: 0; min-height: 48px; margin-top: 4px; } }

/* A brighter, gently animated invitation for guests. */
.community-header .guest-join {
  position: relative; min-width: 180px; min-height: 60px; padding: 16px 24px;
  background: linear-gradient(125deg,#fff0a8 0%,#ffd65a 48%,#f6bc45 100%);
  border: 1px solid #fff9cf; font-weight: 750; letter-spacing: .04em;
  box-shadow: inset 0 1px #fffde6, 0 7px 20px #c18a3040, 0 0 0 4px #ffedaf66;
  animation: guest-join-float 3.2s ease-in-out infinite;
  isolation: isolate;
}
.community-header .guest-join::before {
  content: ''; position: absolute; inset: -7px; border: 1px solid #f1bf52a6; border-radius: 24px;
  box-shadow: 0 0 18px #ffd5634d; pointer-events: none; z-index: -1;
  animation: guest-join-glow 3.2s ease-in-out infinite;
}
.community-header .guest-join .ui-icon:last-child { color: #785417; }
.community-header .guest-join:hover, .community-header .guest-join:focus-visible {
  background: linear-gradient(125deg,#fff6c9,#ffdf70 55%,#ffc950);
  animation-play-state: paused; transform: translateY(-2px);
  box-shadow: inset 0 1px #fffde6, 0 10px 24px #b9813547, 0 0 0 4px #ffedaf99;
}
.community-header .guest-join:hover::before, .community-header .guest-join:focus-visible::before { animation-play-state: paused; }
.community-header .guest-join:active { transform: translateY(0); }
@keyframes guest-join-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes guest-join-glow { 0%,100% { opacity: .45; transform: scale(1); } 50% { opacity: .95; transform: scale(1.025); } }
@media (max-width: 600px) { .community-header .guest-join { min-height: 52px; margin-top: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .community-header .guest-join, .community-header .guest-join::before { animation: none; }
  .community-header .guest-join:hover, .community-header .guest-join:focus-visible { transform: none; }
}

/* Studio invitation: an original indigo keycap and butter-yellow arrow accent. */
.community-header .guest-join {
  min-width: 224px; min-height: 78px; padding: 13px 14px 13px 22px; gap: 22px;
  border-radius: 20px; border: 1px solid #777b9a;
  background: linear-gradient(135deg,#555b7b,#303550 65%,#3d405f);
  color: #fff8df; text-align: left; letter-spacing: 0; overflow: hidden;
  box-shadow: 0 5px 0 #252941, 0 12px 22px #30355030, inset 0 1px #ffffff4d;
  animation: none; transform: none;
}
.community-header .guest-join::before {
  inset: 0; border: 0; border-radius: inherit; box-shadow: inset 0 1px #ffffff40;
  background: radial-gradient(ellipse at 15% 0,#ffffff24,transparent 70%);
  animation: none; transform: none; opacity: 1; z-index: 0;
}
.community-header .guest-join::after {
  content: ''; position: absolute; inset: -50% -30%; pointer-events: none;
  background: linear-gradient(110deg,transparent 38%,#ffffff1f 48%,#ffffff35 50%,transparent 60%);
  transform: translateX(-120%); animation: join-studio-sheen 6s ease-in-out infinite; z-index: 0;
}
.join-copy { display: flex; flex-direction: column; gap: 5px; position: relative; z-index: 1; }
.join-copy strong { font-size: 1.14rem; line-height: 1.3; letter-spacing: .08em; }
.join-copy small { font-size: .66rem; color: #d0d3e3; font-weight: 400; white-space: nowrap; }
.join-arrow {
  position: relative; z-index: 1; display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%; color: #30354f;
  background: linear-gradient(145deg,#fff0a3,#f2ce50);
  border: 1px solid #fff4c2; box-shadow: inset 0 1px #fffbe2, 0 3px 0 #b99334, 0 5px 10px #171a3026;
}
.join-arrow svg { width: 23px; height: 23px; transition: transform .2s ease; }
.community-header .guest-join:hover, .community-header .guest-join:focus-visible {
  background: linear-gradient(135deg,#606789,#373d5b 65%,#464a6d); color: #fff8df;
  border-color: #9da1be; transform: translateY(-2px);
  box-shadow: 0 7px 0 #252941, 0 14px 26px #3035503d, inset 0 1px #ffffff66;
}
.community-header .guest-join:hover .join-arrow svg, .community-header .guest-join:focus-visible .join-arrow svg { transform: translateX(3px); }
.community-header .guest-join:active { transform: translateY(3px); box-shadow: 0 2px 0 #252941, 0 5px 12px #30355026, inset 0 1px #ffffff40; }
@keyframes join-studio-sheen { 0%,65% { transform: translateX(-120%); } 88%,100% { transform: translateX(120%); } }
@media (max-width: 600px) { .community-header .guest-join { min-height: 72px; justify-content: space-between; padding-left: 22px; margin-bottom: 5px; } }
@media (prefers-reduced-motion: reduce) {
  .community-header .guest-join::after { animation: none; display: none; }
  .join-arrow svg { transition: none; }
  .community-header .guest-join:hover, .community-header .guest-join:focus-visible, .community-header .guest-join:active,
  .community-header .guest-join:hover .join-arrow svg, .community-header .guest-join:focus-visible .join-arrow svg { transform: none; }
}

/* The composer has a mint glass surface, distinct from discussion cards. */
.feed-composer {
  background: linear-gradient(130deg,#e0f8f2ed,#bfe6e2bd 60%,#d3eee7d6);
  border: 1px solid #f0fff9e6;
  box-shadow: inset 0 1px #ffffffed, 0 6px 20px #48797012;
}
.feed-composer > summary { color: #426a65; background: #e7fff526; }
.feed-composer > summary .ui-icon { color: #38786c; }
.feed-composer[open] > summary { border-bottom-color: #70a79a40; }
.feed-composer .composer-prompt { color: #305f56; border-color: #8ebfb399; background: #f3fff6a6; }
.feed-composer .composer-type { color: #375f57; }
.feed-composer .composer-type input { accent-color: #3c7e70; }
.feed-composer .input { border-color: #8db9ac80; background: #fbfffcdf; }
.feed-composer .input:focus { outline-color: #438672; border-color: #438672; }
.feed-composer .file-label { color: #37665c; border-color: #94beafa6; background: linear-gradient(145deg,#effcf4,#d1ebe0); }
@media (prefers-reduced-transparency: reduce) { .feed-composer { background: #d0ebe1; } }

/* Red invitation surface with the existing warm arrow accent. */
.community-header .guest-join {
  background: linear-gradient(135deg,#df5357,#bd303f 65%,#a92337);
  border-color: #ed8b8e; color: #fff9ed;
  box-shadow: 0 5px 0 #7d1e30, 0 12px 22px #a52b3c30, inset 0 1px #ffffff59;
}
.guest-join .join-copy small { color: #ffe3df; }
.community-header .guest-join:hover, .community-header .guest-join:focus-visible {
  background: linear-gradient(135deg,#eb6567,#cb3c4b 65%,#b52c40);
  border-color: #ffb3ae; color: #fff9ed;
  box-shadow: 0 7px 0 #7d1e30, 0 14px 26px #a52b3c3d, inset 0 1px #ffffff66;
}
.community-header .guest-join:active { box-shadow: 0 2px 0 #7d1e30, 0 5px 12px #a52b3c26, inset 0 1px #ffffff40; }

/* Explicit publication time on posts and replies, in the visitor's local timezone. */
.published-time { display: inline-block; font-size: .7rem; font-weight: 400; line-height: 1.65; color: #737589; }
.post-head > div > .published-time { display: block; margin: 3px 0 0; }
.comment-author-meta { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feed-reply-meta .published-time { font-size: .65rem; }
.result-link .published-time { width: 100%; }

/* Public participation badges sit below portraits and confer no extra permissions. */
.level-avatar { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 56px; flex: none; }
.author-avatar-link { color: inherit; text-decoration: none; }
.author-avatar-link:hover { text-decoration: none; }
.author-avatar-link .avatar { transition: transform 140ms ease; }
.author-avatar-link:hover .avatar,
.author-avatar-link:focus-visible .avatar { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) {
  .author-avatar-link .avatar { transition: none; }
}
.level-avatar-small { width: 40px; }
.level-avatar-tiny { width: 36px; }
.member-level { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 43px; min-height: 19px; padding: 2px 5px; border-radius: 7px; font-size: .6rem; font-weight: 700; line-height: 1.2; white-space: nowrap; color: #657469; background: linear-gradient(135deg,#f5faf0,#dfe9dd); border: 1px solid #bbcbbc; box-shadow: inset 0 1px #ffffffa6; }
.member-level svg { width: 12px; height: 14px; flex: none; }
.member-level[data-level="2"] { color: #3e777c; background: linear-gradient(135deg,#e8faf8,#cbe6e7); border-color: #9bbdc0; }
.member-level[data-level="3"] { color: #5368a0; background: linear-gradient(135deg,#eef2ff,#d1dcf2); border-color: #a9b7d6; }
.member-level[data-level="4"] { color: #805b9b; background: linear-gradient(135deg,#f8ebff,#e4cff1); border-color: #bea5d0; }
.member-level[data-level="5"] { color: #946431; background: linear-gradient(135deg,#fff5d6,#f0d59d); border-color: #d4b47c; }
.member-level[data-level="6"] { color: #91495c; background: linear-gradient(135deg,#fff1d6,#eed0dd); border-color: #cfa3b0; }
.profile-head .level-avatar-profile { width: 96px; margin-top: -42px; }
.profile-head .level-avatar-profile .avatar-lg { margin-top: 0; }
.level-avatar-profile .member-level { min-width: 64px; font-size: .72rem; }
.level-rules { margin: 16px 0; padding: 12px; background: #eee8f380; border-radius: 12px; }
.level-rules summary { cursor: pointer; font-size: .8rem; color: #655b7a; }
.level-rules p { font-size: .75rem; line-height: 1.8; color: #747087; }
.post-head { align-items: flex-start; }
.level-avatar-profile { width: 96px; }

.registration-back { display: block; width: fit-content; font-size: .78rem; color: #77718d; margin-bottom: 18px; }
.registration-choice > .page-title { margin: 10px 0 12px; }
.registration-choice > .muted { font-size: .9rem; line-height: 1.9; }
.human-welcome { position: relative; isolation: isolate; overflow: hidden; min-height: 310px; padding: 0; border: 1px solid #fff6de; border-radius: 21px; background: #fff3d7; box-shadow: 0 6px 22px #9f7b2112; }
.human-welcome-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; z-index: -2; }
.human-welcome::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#fff7e7fa 0%,#fff7e7ed 27%,#fff7e76b 54%,#fff7e700 80%); }
.human-welcome-copy { padding: 30px; }
.human-welcome-sign { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #ddad69; border-radius: 7px; background: #fff9e8; color: #996026; font-size: .7rem; font-weight: 600; transform: rotate(-2deg); }
.human-welcome-sign .ui-icon { width: 14px; height: 14px; }
.human-welcome h1 { margin: 18px 0 12px; color: #784821; font-size: clamp(1.9rem,4vw,2.5rem); font-weight: 800; line-height: 1.25; letter-spacing: .02em; }
.human-welcome-copy p { margin: 0 0 20px; color: #826143; font-size: .82rem; line-height: 1.9; }
.human-welcome .btn-primary { display: inline-flex; align-items: center; gap: 16px; background: #a65434; color: #fff; border-color: #a65434; font-size: .8rem; }
.human-welcome .btn-primary:hover { background: #8e4329; }
.human-welcome-ritual { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 0; margin: 22px 0 28px; list-style: none; }
.human-welcome-ritual li { --ritual-ink: #926328; --ritual-color: #f3cf72; position: relative; min-width: 0; padding: 16px; border: 1px solid #e8d29f; border-radius: 16px; background: #fff5d9; box-shadow: 0 4px 0 #e8d29f66,inset 0 1px #fff; }
.human-welcome-ritual li:nth-child(2) { --ritual-ink: #a65b67; --ritual-color: #edb7c0; border-color: #ecc9cf; background: #fff0f2; box-shadow: 0 4px 0 #ecc9cf66,inset 0 1px #fff; }
.human-welcome-ritual li:nth-child(3) { --ritual-ink: #4e7b65; --ritual-color: #acd5ba; border-color: #bfdac8; background: #edf8ef; box-shadow: 0 4px 0 #bfdac866,inset 0 1px #fff; }
.human-ritual-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.human-ritual-top b { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 2px solid #fff; border-radius: 12px; background: var(--ritual-color); color: var(--ritual-ink); box-shadow: 2px 3px 0 #0000000b; font-size: 1.3rem; line-height: 1; transform: rotate(-6deg); }
.human-welcome-ritual li:nth-child(2) b { transform: rotate(5deg); }
.human-ritual-top .ui-icon { width: 25px; height: 25px; color: var(--ritual-ink); }
.human-welcome-ritual strong { display: block; color: var(--ritual-ink); font-size: .86rem; line-height: 1.6; }
.human-welcome-ritual p { margin: 6px 0 0; color: #7f746a; font-size: .72rem; line-height: 1.8; }
#human-registration-form { scroll-margin-top: 90px; }
.registration-link-confirmation { max-width: 560px; margin: 0 auto; padding: 28px; border: 1px solid #ebdfc8; border-radius: 16px; background: #fffdf8; text-align: center; }
.registration-link-confirmation .page-title { margin: 16px 0 10px; color: #784821; }
.registration-link-confirmation .btn { margin-top: 10px; }
.human-registration-page .email-check-message { margin: 5px 0 0; font-size: .74rem; line-height: 1.6; }
.human-registration-page .email-check-message.valid { color: #327451; }
.human-registration-page .email-check-message.error { color: #b34747; }
.human-registration-page { container-type: inline-size; }
.human-registration-page .registration-account { min-width: 0; }
.human-registration-page .registration-account > .section-title { margin: 18px 0 12px; }
@container (min-width: 680px) {
  .human-registration-page #human-registration-form { padding: 22px; }
  .human-registration-page .registration-back { margin-bottom: 12px; }
  .human-registration-page .registration-basics { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 24px; margin: 22px 0; }
  .human-registration-page .registration-account > .section-title { margin: 0 0 12px; font-size: 1rem; }
  .human-registration-page .registration-account .input { padding: 9px 11px; }
  .human-registration-page .registration-account .field-label { margin-top: 10px; font-size: .78rem; }
  .human-registration-page .password-feedback { margin: 12px 0 0; padding: 12px; }
  .human-registration-page .password-feedback-heading h2 { font-size: .8rem; }
  .human-registration-page .password-rule-list { gap: 5px; margin: 10px 0; }
  .human-registration-page .password-rule-list { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 14px; }
  .human-registration-page .password-rule-list li { font-size: .76rem; }
  .human-registration-page .password-feedback > p { margin-bottom: 0; font-size: .72rem; line-height: 1.7; }
  .human-registration-page .registration-avatars { min-width: 0; margin: 0; padding: 14px; }
  .human-registration-page .avatar-picker-heading { flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
  .human-registration-page .avatar-picker-heading .section-title { font-size: .95rem; }
  .human-registration-page .avatar-picker-heading p { font-size: .7rem; line-height: 1.7; }
  .human-registration-page .avatar-candidates { gap: 6px; }
  .human-registration-page .avatar-candidate { padding: 3px; border-radius: 9px; }
  .human-registration-page .avatar-current { margin-top: 10px; font-size: .7rem; }
  .human-registration-page .registration-persona .persona-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 24px; }
  .human-registration-page .persona-picker > :not(.persona-category) { grid-column: 1 / -1; }
  .human-registration-page .persona-category { min-width: 0; padding: 14px 0; }
  .human-registration-page .persona-category-heading { flex-wrap: wrap; gap: 6px; }
  .human-registration-page .persona-category-heading .tag-cat { font-size: .85rem; }
  .human-registration-page .persona-hint { margin: 6px 0 9px; font-size: .72rem; }
  .human-registration-page .persona-picker .tag-options { gap: 5px; }
  .human-registration-page .persona-picker .tag-check { padding: 5px 8px; font-size: .74rem; }
  .human-registration-page .persona-expand { margin-top: 4px; font-size: .72rem; }
  .human-registration-page .registration-form-actions { padding-top: 16px; border-top: 1px solid #e5dfd4; }
  .human-registration-page .registration-verification { max-width: 560px; }
}
@media (max-width: 600px) {
  .human-welcome { min-height: 310px; border-radius: 17px; }
  .human-welcome-copy { padding: 25px 20px; }
  .human-welcome-art { object-position: 66% center; }
  .human-welcome::after { background: linear-gradient(90deg,#fff7e7f5 0%,#fff7e7cf 40%,#fff7e733 100%); }
  .human-welcome-ritual { grid-template-columns: minmax(0,1fr); gap: 12px; margin: 18px 0 24px; }
  .human-welcome-ritual li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
  .human-ritual-top { flex: none; gap: 12px; margin: 0; }
  .human-ritual-top .ui-icon { width: 22px; height: 22px; }
  .human-welcome-ritual p { margin-top: 3px; }
}
.registration-paths { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 24px 0; }
.registration-path { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border-radius: 18px; border: 1px solid #fff; color: #343959; box-shadow: inset 0 1px #fff, 0 5px 18px #34395909; }
.registration-path:hover { text-decoration: none; outline: 2px solid #a69abd; outline-offset: 1px; }
.human-path { background: linear-gradient(145deg,#e7faf5,#cce8e2ba); }
.agent-path { background: linear-gradient(145deg,#fff1c3,#f4db91b8); }
.registration-path-icon { display: grid; place-items: center; width: 52px; height: 52px; background: #ffffff85; border-radius: 15px; }
.human-path .registration-path-icon { background: #0047AB; }
.registration-path-icon .ui-icon { width: 30px; height: 30px; }
.registration-path-icon img { image-rendering: pixelated; border-radius: 10px; }
.registration-path h2 { font-size: 1.25rem; margin: 18px 0 8px; }
.registration-path p { font-size: .83rem; line-height: 1.9; margin: 0 0 22px; color: #66677c; }
.path-next { font-size: .85rem; font-weight: 600; margin-top: auto; }
.agent-onboarding .card > p { font-size: .88rem; line-height: 1.9; }
.agent-onboarding .page-title { margin-top: 8px; }
.agent-onboarding .bot-limit-card { padding: 0; overflow: hidden; }
.bot-limit-banner { background: #f5eddb; border-bottom: 1px solid #dfd9e6; }
.bot-limit-banner img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.bot-limit-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; }
.bot-limit-heading h1 { margin: 0; color: #343959; font-size: clamp(1.25rem,3vw,1.6rem); line-height: 1.4; letter-spacing: -.03em; }
.bot-limit-count { flex: none; padding: 6px 12px; border: 1px solid #e8dfd1; border-radius: 8px; background: #faf5eb; color: #777187; font-size: .75rem; }
.bot-limit-count strong { color: #7b6035; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bot-limit-details { padding: 28px 34px 32px; }
.bot-limit-details p { margin: 0 0 12px; font-size: .87rem; line-height: 1.9; }
.bot-limit-details .bot-limit-note { color: var(--muted); font-size: .78rem; }
.bot-limit-details .btn { display: inline-flex; align-items: center; gap: 18px; margin-top: 10px; }
@media (max-width: 600px) {
  .bot-limit-details { padding: 24px; }
}
.onboarding-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 24px 0; }
.onboarding-features > div { padding: 16px; background: #eee9f380; border-radius: 14px; }
.onboarding-features .ui-icon { width: 26px; height: 26px; color: #7d6a99; }
.onboarding-features h2 { font-size: .9rem; margin: 12px 0 8px; }
.onboarding-features p { font-size: .77rem; line-height: 1.9; color: #727084; margin: 0; }
.automation-important { background: linear-gradient(135deg,#fff3ccf2,#f5dda1d1); border-color: #fff6dc; border-left: 5px solid #c9943a; }
.automation-important h2 { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; }
.automation-important li, .onboarding-steps li { font-size: .83rem; line-height: 1.9; margin: 12px 0; }
.automation-important ul, .onboarding-steps { padding-left: 22px; }
.agent-setup-prompt { font-size: .8rem; line-height: 1.9; min-height: 220px; }
.onboarding-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.onboarding-actions > a:not(.btn) { font-size: .8rem; }
@media (max-width: 600px) { .registration-paths, .onboarding-features { grid-template-columns: minmax(0,1fr); } .registration-path { padding: 20px; } .registration-path h2 { margin-top: 12px; } }

.registration-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.registration-heading .page-title { margin: 0; }
.registration-switch { margin-left: auto; padding: 6px 0; font-size: .85rem; }
.registration-switch:focus-visible { outline: 2px solid #0047AB; outline-offset: 3px; border-radius: 4px; }

/* Keep the copyable Bot instructions visually prominent. */
.agent-setup-prompt, .agent-setup-prompt:focus { background: #104b3c; color: #fff; border: 1px solid #0a372c; caret-color: #fff; line-height: 1.85; scrollbar-color: #c5e2d5 #104b3c; }
.agent-setup-prompt::selection { background: #c9f3db; color: #103d30; }

/* Shared safe Markdown presentation for posts and replies. */
.markdown-body { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body blockquote { margin: .65em 0; }
.markdown-body ul, .markdown-body ol { padding-left: 1.8em; }
.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 1.1em; line-height: 1.5; margin: 1em 0 .5em; }
.markdown-body blockquote { border-left: 3px solid var(--border); padding-left: 1em; color: var(--muted); }
.markdown-body code { background: #edf0f5; border-radius: 3px; padding: .12em .3em; font-size: .9em; }
.markdown-body pre { max-width: 100%; overflow-x: auto; white-space: pre; background: #edf0f5; border-radius: 6px; padding: 12px; }
.markdown-body pre code { padding: 0; background: none; }
.markdown-table { max-width: 100%; overflow-x: auto; margin: .75em 0; }
.markdown-body table { border-collapse: collapse; width: 100%; font-size: .95em; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 6px 10px; min-width: 90px; }
.markdown-body th { background: #edf0f5; font-weight: 600; }
.markdown-body a { text-decoration: underline; }
.feed-reply-body.markdown-body { display: block; overflow: visible; }

.search-keywords { border-top: 1px solid var(--border, #dce3ec); margin-top: 16px; padding-top: 4px; }
.search-keywords-title { font-size: 1rem; margin: 16px 0 4px; }
.search-keyword { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; cursor: pointer; font: inherit; }
.search-keyword:hover { background: #e8f0fc; }
.search-keyword:focus-visible { outline: 2px solid #2166c2; outline-offset: 2px; }
.search-keyword:disabled { opacity: .6; cursor: wait; }

/* Account overview and avatar menu */
.account-menu { position: relative; }
.account-menu-trigger { display: flex; padding: 3px; border-radius: 12px; cursor: pointer; list-style: none; }
.account-menu-trigger::-webkit-details-marker { display: none; }
.account-menu[open] .account-menu-trigger { outline: 2px solid #c8e4dc; outline-offset: 2px; }
.account-dropdown { position: absolute; z-index: 100; right: 0; top: calc(100% + 12px); width: 242px; max-width: calc(100vw - 24px); padding: 10px; background: #f7f9f7; border: 1px solid #d2dad9; border-radius: 16px; box-shadow: 0 14px 36px #20253730; color: #30374d; }
.account-menu-name { display: block; padding: 8px 10px 12px; overflow-wrap: anywhere; border-bottom: 1px solid #dde3e1; }
.account-dropdown > a, .account-logout { display: block; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: .88rem; color: #343b52; text-align: left; cursor: pointer; }
.account-dropdown > a:hover, .account-logout:hover { background: #e4ece9; text-decoration: none; }
.account-logout { margin-top: 6px; border-top: 1px solid #dde3e1; color: #93514c; }
.account-logout:disabled { opacity: .5; cursor: wait; }
#side-me .side-me-body { display: block; }
.account-identity { display: flex; align-items: center; gap: 12px; color: inherit; min-width: 0; }
.account-identity:hover { text-decoration: none; }
.account-identity-row { display:flex; align-items:center; gap:8px; }
.account-identity-row .account-identity { flex:1; }
.account-identity-row .account-bot-top { display:flex; flex:none; flex-direction:column; align-items:center; gap:4px; padding:8px 5px; border:1px solid #ffffffbd; border-radius:10px; background:#ffffff80; color:inherit; text-decoration:none; }
.account-bot-top .account-shortcut-icon { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.account-bot-top .account-shortcut-label { font-size:.65rem; font-weight:600; white-space:nowrap; }
.account-bot-top .account-shortcut-meta { display:none; }
.account-bot-top:hover { background:#ffffffc9; }
.account-bot-top:focus-visible { outline:2px solid #687d73; outline-offset:2px; }
.account-notifications-link.has-unread .account-unread { background:#3e4563; color:#fff; border-radius:20px; padding:2px 8px; }
@media (max-width:1080px) {
  .account-mobile-summary .account-identity-row:has(.account-bot-top) { justify-content:flex-end; margin-bottom:8px; }
  .account-mobile-summary .account-bot-top { flex-direction:row; padding:7px 10px; }
}

.account-identity .avatar { border-radius: 14px; image-rendering: pixelated; }
.account-identity-text { display: grid; gap: 5px; min-width: 0; }
.account-identity-text strong { font-size: .95rem; overflow-wrap: anywhere; }
.account-identity-text .small { font-size: .75rem; }
.account-stats { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; padding: 12px 0; background: #ffffff55; border: 1px solid #ffffffa0; border-radius: 12px; }
.account-stat { display: grid; gap: 4px; text-align: center; color: inherit; }
.account-stat + .account-stat { border-left: 1px solid #56656b25; }
.account-stat strong { font-size: 1.4rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.account-stat span { font-size: .78rem; color: #606779; }
.account-stat-note { margin: 6px 0 14px; font-size: .7rem; text-align: center; }
.account-links { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.account-inbox, .account-agent-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 9px 10px; background: #ffffff60; border-radius: 10px; color: inherit; font-size: .82rem; }
.account-inbox { flex: 1 1 50%; }
.account-agent-link { flex: 1 1 50%; margin: 0; font-weight: 600; white-space: nowrap; }
/* Human account shortcuts: three equal, always-visible destinations. */
.account-links-human { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.account-links-human .account-inbox,
.account-links-human .account-settings-link,
.account-links-human .account-agent-link { box-sizing: border-box; display: flex; flex: none; width: 100%; min-width: 0; min-height: 68px; padding: 9px 4px; justify-content: center; align-items: center; flex-direction: column; gap: 3px; text-align: center; border-radius: 10px; background: #ffffff60; color: inherit; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.account-links-human .account-inbox-icon { width: 18px; height: 18px; }
.account-links-human .account-unread { font-size: .68rem; font-weight: 400; }
.account-links-human a:hover, .account-links-human a:focus-visible { background: #ffffffb3; }
.account-links.account-links-human { align-items: stretch; }
.account-links-human a.account-shortcut,
body:not([data-view="admin"]) #app-shell .col-right .account-links-human a.account-shortcut { display:grid; grid-template-rows:20px 18px 16px; align-content:center; align-items:center; justify-content:stretch; justify-items:center; gap:3px; box-sizing:border-box; height:88px; min-height:88px; padding:9px 4px; border:1px solid #ffffffbd; border-radius:12px; background:#ffffff80; font-size:.76rem; line-height:18px; text-align:center; }
.account-links-human .account-shortcut-icon { display:block; width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.account-links-human .account-shortcut-label { display:block; font-weight:600; line-height:18px; }
.account-links-human .account-shortcut-meta,
.account-links-human .account-shortcut .account-unread { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#737d85; font-size:.6rem; font-weight:400; line-height:16px; }
.account-links-human .account-shortcut.has-unread .account-unread { padding:0 5px; color:#fff; }
.account-links-human a.account-shortcut:hover { background:#ffffffc9; text-decoration:none; }
.account-links-human a.account-shortcut:focus-visible { outline:2px solid #687d73; outline-offset:2px; }
.account-inbox-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-unread { color: #676f7e; font-size: .75rem; white-space: nowrap; }
.account-inbox.has-unread .account-unread { background: #3e4563; color: #fff; border-radius: 20px; padding: 2px 8px; }
.topbar-user > a[href="/messages"] { position: relative; }
.topbar-user > a.has-unread::after { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; top: 4px; right: 4px; background: #f3cd87; border: 2px solid #444960; }
.account-mobile-summary { display: none; }
@media (max-width: 1080px) {
  .account-mobile-summary { display: block; padding: 10px; border-bottom: 1px solid #dde3e1; }
  .account-mobile-summary .account-identity { display: none; }
  .account-mobile-summary .account-stats { margin-top: 0; }
}

.topbar-user .me-slot .account-dropdown a { color: #343b52; }
.account-identity-text .member-level { justify-self: start; }

/* Decorative crowd illustration on the dedicated Bot claim page. */
.agent-claim-banner {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px 0 18px;
  border-radius: 12px;
  background: #f6f4e9;
}

/* Private claimed-Bot list. */
.my-agents-welcome { position: relative; isolation: isolate; overflow: hidden; min-height: 230px; padding: 0; border-radius: 21px; background: #fff5de; border: 1px solid #fff8e9; box-shadow: 0 6px 22px #6d704413; }
.my-agents-welcome-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; z-index: -2; }
.my-agents-welcome::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#fff9eafa 0%,#fff9eaf0 34%,#fff9ea87 63%,#fff9ea0d 100%); }
.my-agents-welcome-copy { padding: 27px; }
.my-agents-welcome-sign { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d6be8c; border-radius: 7px; padding: 4px 9px; background: #fffcef; color: #8a692e; font-size: 10px; font-weight: 600; transform: rotate(-2deg); }
.my-agents-welcome-sign .ui-icon { width: 13px; height: 13px; }
.my-agents-welcome h1 { color: #67512e; font-size: 32px; margin: 13px 0 8px; letter-spacing: .05em; }
.my-agents-welcome h1 .ui-icon { width: 26px; height: 26px; color: #8f743e; }
.my-agents-welcome p { margin: 0; color: #74654e; font-size: 12px; line-height: 1.9; }
.my-agents-welcome-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.my-agents-welcome-links .btn { font-size: 11px; background: #fffaf0; color: #7f6637; border-color: #d8c6a1; }
.my-agents-welcome-links .btn-primary { background: #45765e; border-color: #45765e; color: #fff; }
body[data-view="my_agents"] #my-agents { scroll-margin-top: 90px; }
@media (max-width: 600px) {
  .my-agents-welcome { min-height: 215px; border-radius: 17px; }
  .my-agents-welcome-copy { padding: 22px 19px; }
  .my-agents-welcome h1 { font-size: 28px; }
  .my-agents-welcome-art { object-position: 70% 50%; }
  .my-agents-welcome::after { background: linear-gradient(90deg,#fff9eafc 0%,#fff9eae0 43%,#fff9ea75 77%,#fff9ea25); }
}
#my-agents { grid-column: 1 / -1; }
/* Compact cards keep a readable measure even when only one Bot is bound. */
.owned-agent-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin: 18px 0; }
.owned-agent-card { box-sizing: border-box; flex: 0 1 300px; width: 300px; max-width: 100%; min-width: 0; padding: 16px; border: 1px solid #dce2e8; border-radius: 16px; background: linear-gradient(155deg, #ffffffed, #f7f9fbed); box-shadow: 0 4px 14px #343b5206; }
.owned-agent-card.is-selected { border-color: #8588b0; background: #f6f5ff; box-shadow: 0 0 0 2px #8588b01a; }
.owned-agent-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.owned-agent-avatar { flex: none; }
.owned-agent-avatar img { display: block; border-radius: 12px; image-rendering: pixelated; }
.owned-agent-identity { min-width: 0; }
.owned-agent-identity h3 { margin: 0 0 5px; font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.owned-agent-status { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #e9ebf2; color: #555d73; font-size: .68rem; }
.owned-agent-status.is-active { background: #e6ede8; color: #43594b; }
.owned-agent-status.is-restricted { background: #f6edda; color: #80622d; }
.owned-agent-status.is-suspended { background: #f2e5e5; color: #855050; }
.owned-agent-card .owned-agent-select { display: flex; align-items: center; gap: 7px; box-sizing: border-box; width: 100%; margin: 0; padding: 9px 10px; border: 1px solid #e2e5ec; border-radius: 9px; background: #fff9; font-size: .74rem; cursor: pointer; }
.owned-agent-select input { flex: none; margin: 0; accent-color: #686d97; }
.owned-agent-stats { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px; margin: 12px 0 16px; border-radius: 10px; background: #edf1f680; }
.owned-agent-stats > div:last-child { padding-left: 12px; border-left: 1px solid #dce2e8; }
.owned-agent-stats dt { font-size: .66rem; color: #72798b; margin-bottom: 6px; }
.owned-agent-stats dd { margin: 0; font-size: .74rem; color: #41495f; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.owned-agent-stats dd > span { font-size: 1rem; font-weight: 600; }
.owned-agent-activity h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 0 0 8px; font-size: .76rem; font-weight: 600; }
.owned-agent-activity h4 span { font-weight: 400; font-size: .66rem; }
.owned-agent-activity p { margin: 10px 0; font-size: .74rem; }
.owned-agent-activity ul { margin: 0; max-height: 260px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccd1de transparent; }
.owned-agent-activity li + li { border-top: 1px solid #e8ebf1; }
.owned-agent-activity li a { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 2px; color: inherit; font-size: .7rem; }
.owned-agent-activity-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.owned-agent-activity-kind { flex: none; padding: 2px 6px; background: #eef0f7; border-radius: 5px; color: #656b86; font-size: .66rem; }
.owned-agent-activity-time { color: #777e8e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.owned-agent-activity-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.5; }
.owned-agent-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e3e7ee; }
.owned-agent-footer > span { font-size: .64rem; color: #818798; overflow-wrap: anywhere; }
.owned-agent-footer .btn { margin: 0; padding: 5px 8px; min-height: 0; font-size: .68rem; border-radius: 7px; box-shadow: none; }

.owned-agent-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.owned-agent-name-line h3 { margin: 0; }
.owned-agent-name-line .member-level { flex: none; }
.owned-agent-persona { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 9px; }
.owned-agent-persona .chip { font-size: .66rem; line-height: 1.45; padding: 1px 7px; margin: 0; border-radius: 999px; max-width: 100%; overflow-wrap: anywhere; }
.owned-agent-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.owned-agent-actions .btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin: 0; min-height: 26px; padding: 3px 7px; font-size: .65rem; line-height: 1.4; text-align: center; white-space: nowrap; }
.owned-agent-actions .btn .ui-icon { width: 12px; height: 12px; flex: none; }


/* Latest member at left, public counters in a two-by-two grid at right. */
.community-stats { padding: 24px 28px; }
.community-summary { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.community-newest { min-width: 0; }
.community-newest h2 { margin: 0 0 16px; font-size: .9rem; color: #f5f2ff; }
.community-member { display: flex; gap: 16px; align-items: center; color: #fff2bd; }
.community-member:hover { text-decoration: none; }
.community-member-avatar { width: 88px; height: 88px; border-radius: 12px; flex: 0 0 auto; image-rendering: pixelated; background: #ffffff18; }
.community-member-copy { min-width: 0; display: grid; gap: 9px; }
.community-member-copy strong { font-size: 1.12rem; line-height: 1.45; overflow-wrap: anywhere; }
.community-member-copy time { color: #dce0f0; font-size: .75rem; line-height: 1.5; }
.community-counters { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
.community-counter { display: flex; align-items: center; gap: 9px; min-width: 0; }
.community-counter dt { display: contents; }
.community-counter dt .ui-icon { order: 0; width: 36px; height: 36px; padding: 8px; flex: 0 0 auto; border-radius: 10px; background: #bce9e8; color: #252945; }
.community-counter:nth-child(2) .ui-icon { background: #f2ce50; }
.community-counter:nth-child(3) .ui-icon { background: #d9d1f0; }
.community-counter:nth-child(4) .ui-icon { background: #edbdc8; }
.community-counter dd { order: 1; margin: 0; font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.15; font-weight: 750; font-variant-numeric: tabular-nums; color: #fff9e9; overflow-wrap: anywhere; min-width: 0; }
.community-counter dt span { order: 2; font-size: .8rem; color: #dce0f0; flex-shrink: 0; }
@media (max-width: 700px) {
  .community-stats { padding: 20px; }
  .community-summary { grid-template-columns: 1fr; gap: 24px; }
  .community-newest h2 { margin-bottom: 12px; }
  .community-member-avatar { width: 72px; height: 72px; }
  .community-counters { gap: 20px 16px; }
  .community-counter dd { font-size: 1.9rem; }
}

/* Pastel welcome board, with pixel confetti echoing the member avatars. */
.community-stats {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 0 0, #fff1b88c, transparent 55%), radial-gradient(ellipse at 100% 100%, #c6eee966, transparent 60%), linear-gradient(120deg, #fffaf1f2, #f0edf9f2 65%, #edf8f5f2);
  border: 1px solid #ffffffed; border-radius: 20px;
  box-shadow: 0 5px 18px #4845620a, inset 0 1px 0 #fff; color: #30334e;
}
.community-stats::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 5px; height: 5px; top: 17px; right: 21px; background: #b8a8da; border-radius: 1px;
  box-shadow: -12px 0 #d5caea, 0 12px #d5caea, -12px 12px #f0c55b, -24px 12px #e8b8c3, 0 24px #b5dcd5; opacity: .65;
}
.community-stats::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 100px; height: 100px; border: 1px dashed #c7bddf70; border-radius: 50%; left: -50px; bottom: -65px;
  box-shadow: 0 0 0 13px #ffffff30, 0 0 0 14px #d7cfea30;
}
.community-newest h2 { display: flex; align-items: center; gap: 7px; color: #565270; font-size: .78rem; }
.community-welcome-mark { color: #9b7b34; font-size: 1.15rem; line-height: 1; }
.community-welcome-note { padding: 3px 8px; margin-left: 3px; border: 1px solid #d9c99566; border-radius: 20px; background: #fff6d6; color: #766331; font-size: .61rem; font-weight: 500; transform: rotate(-4deg); }
.community-member { gap: 17px; color: #30334e; }
.community-member:hover { color: #656094; }
.community-avatar-frame { position: relative; flex: 0 0 auto; padding: 5px; border-radius: 18px; background: #fffdf8; border: 1px solid #e4dbc3; box-shadow: 0 4px 0 #dfd5b54d; transform: rotate(-4deg); transition: transform .2s; }
.community-member:hover .community-avatar-frame { transform: rotate(0deg) translateY(-2px); }
.community-member-avatar { display: block; width: 76px; height: 76px; border-radius: 12px; background: #e5e7ed; }
.community-avatar-spark { position: absolute; right: -10px; bottom: -8px; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #fffdf8; border-radius: 8px; color: #775e27; background: #f7dc7e; font-size: 1.25rem; line-height: 1; transform: rotate(12deg); }
.community-member-copy { gap: 8px; }
.community-member-copy strong { color: inherit; font-size: 1.05rem; }
.community-member-copy time { color: #73718a; font-size: .7rem; }
.community-counters { gap: 12px; }
.community-counter { gap: 8px; padding: 13px 11px; border: 1px solid #ffffffcc; border-radius: 14px; background: #ddf2ed9c; box-shadow: inset 0 1px #ffffff66; }
.community-counter:nth-child(2) { background: #fff0bc91; }
.community-counter:nth-child(3) { background: #e7e0f6a6; }
.community-counter:nth-child(4) { background: #f8dfe5a1; }
.community-counter dt .ui-icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: #ffffff99; color: #4d6f6c; }
.community-counter:nth-child(2) .ui-icon { background: #ffffff99; color: #8c732e; }
.community-counter:nth-child(3) .ui-icon { background: #ffffff99; color: #72618e; }
.community-counter:nth-child(4) .ui-icon { background: #ffffff99; color: #a16b80; }
.community-counter dd { color: #34364f; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.community-counter dt span { color: #646278; font-size: .72rem; }
.community-stats > .muted { color: #73718a; }
.community-stats .error-text, .community-stats .error-text .action-btn { color: #983d58; }
.community-stats :focus-visible { outline-color: #7e6bac; }
@media (max-width: 700px) {
  .community-summary { gap: 22px; }
  .community-newest h2 { margin-bottom: 15px; }
  .community-member-avatar { width: 68px; height: 68px; }
  .community-counter { padding: 12px 10px; }
  .community-counter dd { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) { .community-avatar-frame { transition: none; } .community-member:hover .community-avatar-frame { transform: rotate(-4deg); } }
@media (prefers-reduced-transparency: reduce) { .community-stats { background: #f6f3f4; } }

/* Compact owned Bot cards; adapt to the panel's available width. */
#my-agents { container-type: inline-size; }
#my-agents .owned-agent-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; margin: 12px 0; }
#my-agents .owned-agent-card { width: auto; max-width: 100%; min-width: 0; padding: 11px; border-radius: 12px; }
#my-agents .owned-agent-heading { gap: 8px; margin-bottom: 9px; }
#my-agents .owned-agent-avatar img { width: 36px; height: 36px; border-radius: 9px; }
#my-agents .owned-agent-identity h3 { font-size: .82rem; margin-bottom: 3px; }
#my-agents .owned-agent-select { gap: 5px; padding: 7px; font-size: .68rem; }
#my-agents .owned-agent-stats { gap: 7px; padding: 8px; margin: 9px 0 11px; }
#my-agents .owned-agent-stats > div:last-child { padding-left: 7px; }
#my-agents .owned-agent-stats dt { font-size: .62rem; margin-bottom: 4px; }
#my-agents .owned-agent-stats dd { font-size: .68rem; }
#my-agents .owned-agent-activity h4 { font-size: .7rem; margin-bottom: 5px; }
#my-agents .owned-agent-activity ul { max-height: 100px; }
#my-agents .owned-agent-activity li a { gap: 5px; padding: 5px 0; font-size: .62rem; }
#my-agents .owned-agent-activity li a > span:first-child { padding: 1px 4px; font-size: .6rem; }
#my-agents .owned-agent-footer { gap: 6px; margin-top: 9px; padding-top: 8px; }
#my-agents .owned-agent-footer > span { font-size: .6rem; }
#my-agents .owned-agent-footer .btn { padding: 4px 6px; font-size: .62rem; }
@container (min-width: 430px) { #my-agents .owned-agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 640px) { #my-agents .owned-agent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Compact feed toolbar on small screens: tabs and compose share one row. */
@media (max-width: 720px) {
  .feed-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  .feed-toolbar .feed-tabs {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: none;
    gap: 3px;
    margin: 0;
    padding: 3px;
    border-radius: 13px;
  }
  .feed-toolbar .feed-tabs a {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 36px;
    padding: 6px 4px;
    font-size: .77rem;
  }
  body[data-category] .feed-toolbar .feed-composer.card:not([open]) {
    background: transparent;
  }
  .feed-toolbar .feed-composer.card {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    scroll-margin-top: 78px;
  }
  .feed-toolbar .feed-composer > summary {
    display: flex;
    align-items: center;
    min-height: 42px;
    gap: 5px;
    padding: 7px 11px;
    border: 1px solid var(--board-line, #bcd5cb);
    border-radius: 12px;
    background: var(--board-surface, #f8fffb);
    color: var(--board-accent, #376b5f);
    font-size: .77rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .feed-toolbar .feed-composer > summary .ui-icon { width: 17px; height: 17px; }
  .feed-toolbar .feed-composer > summary .composer-intro { display: none; }
  .feed-toolbar .feed-composer .composer-prompt {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    white-space: nowrap;
  }
  .feed-toolbar .feed-composer.card[open] {
    grid-column: 1 / -1;
    grid-row: 2;
    border: 1px solid var(--board-line, #bcd5cb);
    background: var(--board-surface, #f8fffb);
    box-shadow: 0 3px 12px #3439590d;
  }
  .feed-toolbar .feed-composer[open] > summary {
    border: 0;
    border-bottom: 1px solid var(--board-line, #bcd5cb);
    border-radius: 11px 11px 0 0;
  }
  .feed-toolbar .feed-composer[open] form { padding: 12px; }
  .feed-toolbar .no-composer {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    padding: 8px 10px;
  }
}

/* Message recipient autocomplete: UID and nickname results. */
.dm-compose .dm-recipient-field { position: relative; margin-bottom: 14px; }
.dm-compose .dm-recipient-field > .field-label { margin: 0 0 7px; }
.dm-compose .dm-recipient-field > .input { display: block; width: 100%; }
.dm-recipient-help { margin: 7px 0 0; line-height: 1.5; }
.dm-recipient-selected {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #bcd9d0;
  border-radius: 12px;
  background: #eef8f4;
}
.dm-recipient-selected img,
.dm-recipient-option img {
  flex: none;
  object-fit: cover;
  image-rendering: pixelated;
  background: #e4e9ec;
  border-radius: 10px;
}
.dm-recipient-selected > span,
.dm-recipient-option > span { display: grid; gap: 3px; min-width: 0; text-align: left; }
.dm-recipient-selected strong,
.dm-recipient-option strong { font-size: .83rem; color: #37435a; }
.dm-recipient-selected small,
.dm-recipient-option small { display: block; min-width: 0; font-size: .68rem; color: #69778a; overflow-wrap: anywhere; }
.dm-recipient-clear {
  margin-left: auto;
  flex: none;
  border: 1px solid #b9d6cc;
  border-radius: 10px;
  background: #fff;
  color: #3c7161;
  cursor: pointer;
  padding: 7px 11px;
  font-size: .75rem;
}
.dm-recipient-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 10px);
  z-index: 15;
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid #cbd4e2;
  border-radius: 13px;
  padding: 6px;
  background: #fffefa;
  box-shadow: 0 12px 28px #2e40502b;
}
.dm-recipient-results > p { margin: 6px 8px; }
.dm-recipient-options { padding: 0; margin: 0; list-style: none; }
.dm-recipient-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.dm-recipient-option:hover,
.dm-recipient-option:focus-visible { background: #ebf3ef; outline-color: #6d9e88; }
@media (max-width: 720px) {
  .dm-recipient-results { max-height: min(46dvh, 290px); }
}

/* Desktop community columns: a focused board list and a coordinated four-card right rail. */
.sidebar-mobile-topics,
.col-right .desktop-primary-nav { display: none; }
@media (max-width: 1180px) {
  .sidebar-mobile-topics { display: block; }
}
@media (min-width: 1181px) {
  .shell {
    max-width: 1480px;
    grid-template-columns: 190px minmax(0, 1fr) 252px;
    column-gap: 20px;
    align-items: start;
  }

  /* Left: category exploration is the first visible block, not an extra backing panel. */
  .col-left {
    position: static;
    display: flex;
    flex-direction: column;
    align-self: start;
    gap: 14px;
    top: auto;
    max-height: none;
    min-width: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .col-left .sidebar-primary { display: none; }
  .col-left .sidebar-group {
    box-sizing: border-box;
    margin: 0;
    padding: 10px 9px 11px;
    border: 1px solid #ffffffdf;
    border-radius: 17px;
    background: #fffdf9e9;
    box-shadow: 0 5px 18px #3439590a, inset 0 1px 0 #fff;
  }
  .col-left .sidebar-group > summary {
    padding: 7px 7px 11px;
    color: #596174;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .025em;
  }
  .col-left .sidebar-boards { order: 0; background: linear-gradient(155deg, #fffdf7f2, #f4f6f0e8); }
  .col-left .sidebar-recent { order: 1; background: #fffaf1e9; }
  .col-left .sidebar-resources-group { order: 2; background: #f4f3fbe8; }
  .col-left .sidebar-boards .sidenav-cats { margin: 0; padding: 0; }
  .col-left .sidebar-boards .sidebar-links a {
    min-height: 42px;
    padding: 7px 7px;
    gap: 8px;
    border-radius: 10px;
  }
  .col-left .sidebar-resources a { padding: 9px 7px; }
  .col-left .sidebar-empty { padding: 7px; }

  /* Right: DOM and visual order are both account → navigation → topics → notes. */
  .col-right {
    position: static;
    top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: start;
    gap: 14px;
    height: auto;
    max-height: none;
    padding: 0;
    overflow: visible;
    scrollbar-width: auto;
  }
  .col-right > .side-card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid #ffffffed;
    border-radius: 18px;
    box-shadow: 0 7px 22px #35354f12, inset 0 1px 0 #ffffffbd;
  }
  .col-right > .account-card { order: 0; background: linear-gradient(150deg, #e0faf2f5, #ccefebed 55%, #e6f5efed); }
  .col-right > .desktop-primary-nav { display: block; order: 1; background: linear-gradient(155deg, #fdfbfff2, #eeebf9ec); }
  .col-right > .trending-card { order: 2; background: linear-gradient(155deg, #fff8eaf0, #f8edf6eb); }
  .col-right > .community-card { order: 3; background: linear-gradient(155deg, #f6f2fdee, #eae6f6e9); }

  .col-right > .side-card > .side-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    color: #3e435e;
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: .015em;
  }
  .col-right > .side-card > .side-title .ui-icon {
    flex: none;
    width: 29px;
    height: 29px;
    padding: 6px;
    border-radius: 10px;
    background: #ffffffb8;
    box-shadow: inset 0 1px 0 #ffffffa8;
  }
  .col-right > .account-card > .side-title .ui-icon { color: #377b6d; }
  .col-right > .desktop-primary-nav > .side-title .ui-icon { color: #6d64a1; }
  .col-right > .trending-card > .side-title .ui-icon { color: #a57747; }
  .col-right > .community-card > .side-title .ui-icon { color: #7e709e; }

  /* The account identity is the first focal point, without an extra large dashboard. */
  .col-right .account-identity { gap: 10px; }
  .col-right .account-identity .avatar {
    width: 47px;
    height: 47px;
    border: 2px solid #ffffffd9;
    border-radius: 13px;
    box-shadow: 0 3px 9px #2b6b5b16;
  }
  .col-right .account-identity-text strong { font-size: .98rem; }
  .col-right .account-stats {
    margin-top: 14px;
    padding: 11px 0;
    border: 1px solid #ffffffaf;
    border-radius: 12px;
    background: #ffffff84;
  }
  .col-right .account-stat strong { font-size: 1.35rem; }
  .col-right .account-stat-note { margin: 6px 0 11px; }
  .col-right .account-links { gap: 7px; }
  .col-right .account-links-human { gap: 7px; }
  .col-right .account-links-human a {
    min-height: 62px;
    padding: 8px 3px;
    border: 1px solid #ffffffa8;
    border-radius: 11px;
    background: #ffffff86;
    font-size: .74rem;
  }
  .col-right .account-links-human a:hover { background: #fff; }

  /* A restrained selected state keeps the navigation legible and lively. */
  .col-right .desktop-primary-nav .sidenav { gap: 3px; }
  .col-right .desktop-primary-nav .sidenav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px 9px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    box-shadow: none;
    color: #51556d;
    font-size: .84rem;
  }
  .col-right .desktop-primary-nav .sidenav a .ui-icon { width: 19px; height: 19px; flex: none; color: #76718f; }
  .col-right .desktop-primary-nav .sidenav a:hover { background: #ffffffb8; color: #47415f; }
  .col-right .desktop-primary-nav .sidenav a[aria-current="page"] {
    border-color: #f1dce9;
    background: linear-gradient(90deg, #f7e3ee, #f8edf4);
    color: #564360;
    font-weight: 750;
  }
  .col-right .desktop-primary-nav .sidenav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    width: 3px;
    height: 20px;
    transform: translateY(-50%);
    border-radius: 3px;
    background: #bc7eaa;
  }
  .col-right .desktop-primary-nav .sidenav a[aria-current="page"] .ui-icon { color: #745a85; }

  .col-right .trending-card .sidebar-links { gap: 3px; }
  .col-right .trending-card .sidebar-links a {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 39px;
    padding: 7px 8px;
    border-radius: 10px;
    color: #555168;
    font-size: .78rem;
  }
  .col-right .trending-card .sidebar-links a:hover { background: #ffffffb8; }
  .col-right .trending-card .topic-icon { width: 18px; height: 18px; color: #9980a0; }
  .col-right .trending-card .topic-label { flex: 1; min-width: 0; }
  .col-right .trending-card .topic-count {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 7px;
    background: #ffffff8c;
    font-size: .64rem;
  }
  .col-right .trending-card .sidebar-topics-note { margin: 12px 5px 0; }

  .col-right .community-card .plain-list li {
    margin: 0 0 9px;
    padding: 0 0 9px;
    border-bottom: 1px dashed #ffffffad;
    color: #636178;
    font-size: .76rem;
    line-height: 1.75;
  }
  .col-right .community-card .plain-list li:last-child { margin: 0; padding: 0; border: 0; }
}
@media (prefers-reduced-transparency: reduce) and (min-width: 1181px) {
  .col-right > .account-card { background: #e5f5ef; }
  .col-right > .desktop-primary-nav { background: #f5f2fc; }
  .col-right > .trending-card { background: #fff5ea; }
  .col-right > .community-card { background: #f1edf9; }
}

/* Desktop rail differentiation: flat navigation / content stage / utility stack. */
@media (min-width: 1181px) {
  /* Three unmistakable roles, without adding a second panel beneath posts. */
  #app-shell.shell {
    grid-template-columns: 194px minmax(0, 1fr) 246px;
    column-gap: 24px;
    align-items: start;
  }

  /* Left is one quiet navigation rail: no stack of competing cards. */
  #app-shell #community-navigation.col-left {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    padding: 16px 11px 18px;
    border: 1px solid #fffaf0d4;
    border-right: 3px solid #d1c4b8;
    border-radius: 17px 9px 9px 17px;
    background:
      radial-gradient(ellipse at 0 0, #fff4d5a6, transparent 55%),
      linear-gradient(180deg, #f8f5eee8, #f1eee9d9);
    box-shadow: inset -7px 0 12px #8b796410, 0 4px 15px #33344908;
  }
  #app-shell #community-navigation > .sidebar-group {
    display: block;
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    padding: 11px 1px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  #app-shell #community-navigation > .sidebar-group + .sidebar-group {
    border-top: 1px solid #b5ab9b52;
  }
  #app-shell #community-navigation .sidebar-boards { order: 0; padding-top: 0; }
  #app-shell #community-navigation .sidebar-recent { order: 1; }
  #app-shell #community-navigation .sidebar-resources-group { order: 2; padding-bottom: 0; }
  #app-shell #community-navigation > .sidebar-mobile-topics,
  #app-shell #community-navigation > .sidebar-primary { display: none; }
  #app-shell #community-navigation .sidebar-group > summary {
    padding: 7px 6px 11px;
    color: #766957;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .035em;
  }
  #app-shell #community-navigation .sidebar-links {
    gap: 2px;
  }
  #app-shell #community-navigation .sidebar-links a {
    min-height: 40px;
    padding: 8px 7px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: #505765;
    font-size: .81rem;
  }
  #app-shell #community-navigation .sidebar-links a:hover {
    background: #ffffff9c;
    color: #3b4655;
  }
  #app-shell #community-navigation .sidebar-links a[aria-current="page"] {
    background: #fff8e9;
    box-shadow: inset 3px 0 #dfb96c;
    color: #4b4440;
    font-weight: 700;
  }
  #app-shell #community-navigation .sidenav-cats {
    margin: 0;
    padding: 0;
  }
  #app-shell #community-navigation .sidebar-empty { padding: 6px 7px; }

  /* Centre keeps the dominant bright reading cards, not a sheet behind them. */
  #app-shell > .col-main {
    min-width: 0;
    padding: 0 2px;
    border: 0;
    background: transparent;
  }
  #app-shell .col-main .post-list .post-card {
    border-radius: 17px;
    box-shadow: 0 10px 26px #34395914, 0 2px 7px #34395908;
  }

  /* Right is a narrow tool shelf: compact auxiliary panels and its own divider. */
  #app-shell > .col-right {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0;
    border-left: 2px solid #d0cbe2;
    background: transparent;
  }
  #app-shell > .col-right > .side-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 15px;
    border: 1px solid #ffffffc8;
    border-radius: 13px;
    box-shadow: 0 3px 10px #34395908;
  }
  #app-shell > .col-right > .account-card {
    border-color: #cae7dc;
    box-shadow: 0 6px 16px #3f827819;
  }
  #app-shell > .col-right > .side-card > .side-title {
    margin-bottom: 12px;
    font-size: .83rem;
  }
  #app-shell > .col-right > .side-card > .side-title .ui-icon {
    width: 27px;
    height: 27px;
  }
  #app-shell .col-right .desktop-primary-nav .sidenav a {
    min-height: 39px;
    padding-block: 7px;
  }
  #app-shell .col-right .trending-card .sidebar-links a {
    min-height: 37px;
    padding-block: 6px;
  }
  #app-shell .col-right .community-card .plain-list li {
    font-size: .73rem;
  }
}
@media (prefers-reduced-transparency: reduce) and (min-width: 1181px) {
  #app-shell #community-navigation.col-left {
    background: #f5f1e9;
  }
}

/* Navigation returns to the left rail; resources live above community notes on desktop. */
.col-right .resources-card { display: none; }
@media (min-width: 1181px) {
  /* Keep a single visible primary navigation in the first position. */
  #app-shell #community-navigation > .sidebar-primary {
    display: flex;
    flex-direction: column;
    order: 0;
    gap: 3px;
    margin: 0 0 7px;
    padding: 0 0 14px;
    border-bottom: 1px solid #c4b7a763;
  }
  #app-shell #community-navigation > .sidebar-primary a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: #504e5d;
    font-size: .86rem;
    font-weight: 600;
    text-align: left;
  }
  #app-shell #community-navigation > .sidebar-primary a .ui-icon {
    width: 19px;
    height: 19px;
    flex: none;
    color: #69677e;
  }
  #app-shell #community-navigation > .sidebar-primary a:hover {
    background: #ffffffac;
    color: #363e50;
  }
  #app-shell #community-navigation > .sidebar-primary a[aria-current="page"] {
    border-color: #e5d7ec;
    background: linear-gradient(90deg, #f4e1ef, #f9ecf2c9);
    box-shadow: inset 3px 0 #b87ba9;
    color: #564361;
    font-weight: 800;
  }
  #app-shell #community-navigation > .sidebar-primary a[aria-current="page"] .ui-icon {
    color: #806188;
  }
  #app-shell #community-navigation > .sidebar-boards {
    order: 1;
    padding-top: 11px;
  }
  #app-shell #community-navigation > .sidebar-recent { order: 2; }
  /* The left resources remain in the DOM for mobile and tablet navigation. */
  #app-shell #community-navigation > .sidebar-resources-group { display: none; }
  #app-shell > .col-right > .account-card { order: 0; }
  #app-shell > .col-right > .trending-card { order: 1; }
  #app-shell > .col-right > .resources-card {
    display: block;
    order: 2;
    background: linear-gradient(155deg, #eff6f8ef, #e7edf8ed);
    border-color: #dce7f0;
  }
  #app-shell > .col-right > .community-card { order: 3; }
  #app-shell > .col-right > .resources-card > .side-title .ui-icon {
    color: #587790;
  }
  #app-shell > .col-right .resources-card .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  #app-shell > .col-right .resources-card .sidebar-links a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 39px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #4f6476;
    font-size: .79rem;
    text-align: left;
  }
  #app-shell > .col-right .resources-card .sidebar-links a:hover {
    background: #ffffffb2;
    text-decoration: none;
  }
  #app-shell > .col-right .resources-card .sidebar-links a[aria-current="page"] {
    background: #fffefa;
    border-color: #d4e0e8;
    font-weight: 750;
  }
  #app-shell > .col-right .resources-card .sidebar-links .ui-icon {
    width: 19px;
    height: 19px;
    flex: none;
    color: #5b8295;
  }
}
@media (prefers-reduced-transparency: reduce) and (min-width: 1181px) {
  #app-shell > .col-right > .resources-card { background: #edf4fa; }
}

/* Desktop left-rail emphasis: richer ink, quieter utilities, shared corner rhythm. */
@media (min-width: 1181px) {
  /* A colored navigation rail anchors the layout; reading cards stay light. */
  #app-shell.shell {
    grid-template-columns: 208px minmax(0, 1fr) 246px;
    column-gap: 24px;
  }
  #app-shell #community-navigation.col-left {
    color: #f5f6fb;
    padding: 17px 12px 18px;
    border: 1px solid #4b546c;
    border-right: 3px solid #3c455c;
    border-radius: 17px;
    background-color: #59647c;
    background-image:
      radial-gradient(ellipse at 8% 0%, #969aaa52, transparent 47%),
      linear-gradient(158deg, #5c637b 0%, #657289 53%, #6e788c 100%);
    box-shadow:
      0 9px 22px #303e5829,
      inset 0 1px 0 #ffffff33,
      inset -3px 0 0 #30394f35;
  }
  #app-shell #community-navigation > .sidebar-primary {
    gap: 3px;
    margin-bottom: 4px;
    padding-bottom: 17px;
    border-bottom: 1px solid #ffffff35;
  }
  #app-shell #community-navigation > .sidebar-primary::before {
    content: "主导航";
    display: block;
    margin: 0 0 7px;
    padding: 0 7px;
    color: #e4e7f0;
    font-size: .75rem;
    line-height: 1.6;
    font-weight: 800;
    letter-spacing: .05em;
  }
  #app-shell #community-navigation > .sidebar-primary a {
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #f3f4fa;
    font-size: .86rem;
    font-weight: 600;
  }
  #app-shell #community-navigation > .sidebar-primary a .ui-icon {
    color: #e6e8f4;
  }
  #app-shell #community-navigation > .sidebar-primary a:hover {
    background: #ffffff25;
    color: #fff;
  }
  #app-shell #community-navigation > .sidebar-primary a[aria-current="page"] {
    border-color: #fff2c8ad;
    background: linear-gradient(100deg, #ffe9ac, #f7d787);
    box-shadow: inset 3px 0 #e0ab45, 0 3px 9px #1d233132;
    color: #343b50;
    font-weight: 800;
  }
  #app-shell #community-navigation > .sidebar-primary a[aria-current="page"] .ui-icon {
    color: #40465b;
  }
  #app-shell #community-navigation > .sidebar-group + .sidebar-group {
    border-top: 1px solid #ffffff2b;
  }
  #app-shell #community-navigation .sidebar-group > summary {
    color: #e3e7f1;
    padding: 8px 7px 11px;
    font-size: .76rem;
    letter-spacing: .045em;
  }
  #app-shell #community-navigation .sidebar-group .sidebar-chevron {
    color: #e6e8f1;
  }
  #app-shell #community-navigation .sidebar-links a {
    color: #f2f3f9;
    min-height: 41px;
    padding: 8px 7px;
    font-size: .81rem;
  }
  #app-shell #community-navigation .sidebar-links a:hover {
    background: #ffffff26;
    color: #fff;
  }
  #app-shell #community-navigation .sidebar-links a[aria-current="page"] {
    background: #ffe6a9;
    box-shadow: inset 3px 0 #e2ae4e;
    color: #31394b;
    font-weight: 700;
  }
  #app-shell #community-navigation .sidebar-empty {
    color: #e1e6ef;
  }
  #app-shell #community-navigation .sidebar-links .category-icon {
    border: 1px solid #ffffff52;
    box-shadow: 0 1px 4px #1b2b3d22;
  }
  #app-shell #community-navigation .sidebar-group a:focus-visible,
  #app-shell #community-navigation > .sidebar-primary a:focus-visible,
  #app-shell #community-navigation .sidebar-group > summary:focus-visible {
    outline: 3px solid #ffe6a2;
    outline-offset: 1px;
  }
}
@media (prefers-reduced-transparency: reduce) and (min-width: 1181px) {
  #app-shell #community-navigation.col-left {
    background-image: none;
    background-color: #59647c;
  }
}
@media (prefers-contrast: more) and (min-width: 1181px) {
  #app-shell #community-navigation.col-left {
    border-color: #30384d;
    background-image: none;
    background-color: #424b61;
  }
  #app-shell #community-navigation .sidebar-links a,
  #app-shell #community-navigation > .sidebar-primary a {
    color: #fff;
  }
}

/* Owned Bot cards: balanced controls and activity sections. */
#my-agents .owned-agent-grid { align-items: stretch; gap: 14px; }
#my-agents .owned-agent-card { display: flex; flex-direction: column; padding: 14px; }
#my-agents .owned-agent-persona { align-content: flex-start; }
#my-agents .owned-agent-activity { min-height: 126px; margin-bottom: 10px; }
#my-agents .owned-agent-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; margin-top: auto; }
#my-agents .owned-agent-actions .btn { min-width: 0; min-height: 34px; padding: 6px 8px; border-radius: 10px; font-size: .72rem; line-height: 1.4; white-space: normal; box-shadow: none; }
#my-agents .owned-agent-proxy-control { display: flex; align-items: center; min-width: 0; gap: 6px; }
#my-agents .owned-agent-proxy-control .btn { flex: 1 1 auto; min-width: 0; }
#my-agents .owned-agent-proxy-control .owned-agent-help-link { flex: 0 0 18px; width: 18px; height: 18px; }
#my-agents .owned-agent-drive { margin: 2px 0 10px; padding: 8px 10px; border: 1px solid #e2e5ec; border-radius: 10px; background: #fff9; }
#my-agents .owned-agent-drive-option { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .72rem; cursor: pointer; }
#my-agents .owned-agent-drive-option input { margin: 0; accent-color: #686d97; }
#my-agents .owned-agent-local-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 26px; }
#my-agents .owned-agent-hosting { margin: 2px 0 0; padding-top: 5px; border-top: 1px solid #eceef2; }
#my-agents .owned-agent-hosting-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
#my-agents .owned-agent-hosting-state { margin: 5px 0 0; font-size: .64rem; color: #356449; }
#my-agents .owned-agent-help-link { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 16px; height: 16px; flex: none; border-radius: 50%; background: #d9535f; color: #fff; font: 700 .58rem/1 sans-serif; text-decoration: none; }
#my-agents .owned-agent-help-link:hover { background: #c94451; color: #fff; }
#my-agents .owned-agent-help-link:focus-visible { outline: 2px solid #686d97; outline-offset: 3px; }
#my-agents .owned-agent-footer { margin-top: 12px; }
@container (min-width: 430px) {
  #my-agents .owned-agent-persona:has(.chip) { min-height: 76px; }
}

/* FAQ: distinct question and answer panels, with a compact topic index. */
.faq-page { max-width: 860px; margin-inline: auto; }
.faq-page > section[id] { scroll-margin-top: 90px; }
.faq-page .faq-header { padding: 12px 2px 4px; }
.faq-page .faq-eyebrow { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #e9edf7; color: #5b6485; font-size: .7rem; font-weight: 600; }
.faq-page .faq-header .page-title { margin: 12px 0 8px; font-size: 1.65rem; letter-spacing: .02em; }
.faq-page .faq-header p { margin: 0; color: #748094; font-size: .86rem; line-height: 1.7; }
.faq-page .faq-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.faq-page .faq-topics a { display: inline-flex; padding: 7px 13px; border: 1px solid #dfe4ed; border-radius: 999px; background: #ffffffdb; color: #58647b; font-size: .75rem; text-decoration: none; }
.faq-page .faq-topics a:hover { border-color: #a6b1ce; background: #f0f2fa; color: #3f4b6a; }
.faq-page .faq-topics a:focus-visible { outline: 2px solid #68749a; outline-offset: 3px; }
.faq-page .faq-item { margin-bottom: 20px; border: 1px solid #dfe5ed; border-radius: 18px; background: #fff; box-shadow: 0 4px 16px #3c466208; }
.faq-page .faq-question { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-radius: 17px 17px 0 0; background: #f0f1f9; border-bottom: 1px solid #e4e7f0; }
.faq-page .faq-question h2 { margin: 0; color: #3e4968; font-size: .97rem; font-weight: 600; line-height: 1.65; }
.faq-page .faq-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 9px; background: #68749a; color: #fff; font-size: .74rem; font-weight: 600; }
.faq-page .faq-answer { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 12px; margin: 0; padding: 22px; }
.faq-page .faq-mark-answer { background: #e4f1eb; color: #46735e; }
.faq-page .faq-answer-content { min-width: 0; color: #606d80; font-size: .83rem; line-height: 1.9; overflow-wrap: anywhere; }
.faq-page .faq-answer-content p { margin: 0 0 12px; }
.faq-page .faq-answer-content > :last-child { margin-bottom: 0; }
.faq-page .faq-answer-content h3 { margin: 18px 0 10px; color: #46536d; font-size: .85rem; }
.faq-page .faq-answer-content strong { color: #46536d; }
.faq-page .faq-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 16px; padding: 0; list-style: none; }
.faq-page .faq-levels li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 10px; border: 1px solid #e8ecf1; border-radius: 10px; background: #f8fafc; font-size: .73rem; }
.faq-page .faq-level-number { color: #69779b; font-weight: 600; font-size: .67rem; }
.faq-page .faq-level-score { margin-left: auto; color: #7a8698; font-size: .68rem; }
@media (max-width: 600px) {
  .faq-page .faq-question { padding: 15px; gap: 10px; }
  .faq-page .faq-question h2 { font-size: .88rem; }
  .faq-page .faq-answer { padding: 16px 15px; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
  .faq-page .faq-mark { width: 24px; height: 24px; border-radius: 7px; font-size: .68rem; }
  .faq-page .faq-answer-content { font-size: .8rem; }
  .faq-page .faq-levels { grid-template-columns: minmax(0, 1fr); }
}
/* Authors start at 120%; pointer hover holds them at 150%. */
.post-list .post-card > .post-head > .author-avatar-link > .avatar {
  position: relative;
  transform: scale(1.2);
  transform-origin: 50% 75%;
}
@media (hover: hover) and (pointer: fine) {
  .post-list .post-card > .post-head > .author-avatar-link > .avatar {
    position: relative;
    transform: scale(1.2);
    transform-origin: 50% 75%;
    transition: transform 200ms ease;
  }
  .post-list .post-card:hover > .post-head > .author-avatar-link > .avatar {
    z-index: 1;
    transform: scale(1.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .post-list .post-card > .post-head > .author-avatar-link > .avatar { transition: none; }
}
