/* Threads and Stories live inside the same Deep Talk screen and original mood. */
.jk-review-people { margin: 18px 0 22px; }
.jk-review-people[hidden] { display: none; }
.jk-review-people h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.45; }
.jk-review-people .thread-note { color: #626269; }
.jk-review-people .thread-community { background: #f7f1f5; border-color: #e9dbe4; }
.jk-review-people .thread-avatar { color: #fff; background: #744159; }
.jk-review-people .thread-avatar-stack .thread-avatar { border-color: #f7f1f5; }
.jk-community-presence { display: flex; gap: 14px; align-items: center; margin: 16px 0 24px; }
.jk-community-presence[hidden] { display: none; }
.jk-community-avatars { display: flex; flex-shrink: 0; padding-right: 6px; }
.jk-community-avatars button { width: 44px; height: 44px; padding: 0; border: 2px solid white; border-radius: 50%; overflow: hidden; background: #f2e8ed; color: #613147; margin-left: -12px; }
.jk-community-avatars button:first-child { margin-left: 0; }
.jk-community-avatars img { width: 100%; height: 100%; object-fit: cover; }
.jk-community-presence b { display: block; font-size: 14px; }
.jk-community-presence small { display: block; margin-top: 4px; color: #626269; font-size: 12px; line-height: 1.6; }
@media(max-width:359px) { .jk-community-presence { flex-wrap: wrap; } }
.jk-review-person-list { display: grid; gap: 12px; }
.jk-review-person-card { border: 1px solid #e6e6e9; border-radius: 20px; padding: 16px; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 10px; background: #fff; }
.jk-review-person-card .thread-avatar { width: 44px; height: 44px; }
.jk-review-person-card h3 { margin: 0 0 4px; font-size: 17px; }
.jk-review-person-card p { margin: 0; font-size: 13px; line-height: 1.6; color: #626269; }
.jk-review-person-card button { grid-column: 1/-1; background: #fff; color: #17171b; border: 1px solid #dedee2; min-height: 44px; border-radius: 12px; }
#phone .jk-review-has-people #meet-readiness-recovery { display: none !important; }
#jk-review-person-dialog { padding: 24px; width: min(90vw,480px); max-height: 85vh; border: 1px solid #e6e6e9; border-radius: 22px; color: #17171b; background: #fff; font-family: var(--font-ui); }
#jk-review-person-dialog p { line-height: 1.7; }
#jk-review-person-dialog button { min-height: 44px; min-width: 72px; padding: 10px 16px; }
.thread-community { display: flex; align-items: center; gap: 14px; padding: 14px; margin: 12px 0 18px; border: 1px solid #583247; border-radius: 18px; background: linear-gradient(135deg,#2e1d2b,#19151f); }
.thread-community b { display: block; font-size: 13px; line-height: 1.5; }
.thread-community small { display: block; font-size: 12px; line-height: 1.5; color: #c1aab8; margin-top: 3px; }
.thread-avatar-stack { display: flex; flex-shrink: 0; padding-left: 7px; }
.thread-avatar-stack .thread-avatar { margin-left: -7px; border: 2px solid #241622; }
.thread-activity { display: block; color: #d7b6ca; font-size: 12px; line-height: 1.6; margin: 12px 0; }
.deep-core-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; margin: 4px 0 14px; padding: 4px; border: 1px solid var(--jk-ui-night-line); border-radius: 16px; background: var(--jk-ui-night-surface); }
.deep-core-tabs button { min-height: 60px; padding: 8px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--jk-ui-night-muted); font: inherit; text-align: center; }
.deep-core-tabs b { display: block; font-size: 16px; line-height: 1.4; color: var(--jk-ui-night-text); margin-bottom: 2px; }
.deep-core-tabs small { display: block; font-size: 12px; line-height: 1.45; }
.deep-core-tabs [aria-pressed=true] { border-color: var(--jk-ui-story-nav-active-border); background: var(--jk-ui-story-nav-pill); box-shadow:0 2px 8px #0003; }
#phone .jk-threads-active #new-story-btn { min-width: 108px; }
#phone.story-context .jk-threads-active .deep-topbar { display: flex; }
#phone .story-hub:not(.jk-threads-active):has(#jk-story-workspace.is-writing) > .deep-core-tabs { display: none; }
#phone .jk-threads-active #jk-story-workspace, #phone .story-hub:not(.jk-threads-active) #jk-thread-content { display: none; }
:is(#jk-thread-content,#jk-thread-dialog) { color: var(--jk-ui-night-text); font: 15px/1.7 var(--font-ui); }
:is(#jk-thread-content,#jk-thread-dialog) * { box-sizing: border-box; min-width: 0; }
:is(#jk-thread-content,#jk-thread-dialog) button { min-width: 44px; }
.thread-note { color: var(--jk-ui-night-muted); font-size: 12px; line-height: 1.65; margin: 0 0 16px; }
.thread-chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 2px 0 10px; margin-bottom: 10px; }
.thread-chip { flex: none; min-height: 44px; padding: 9px 14px; border: 1px solid var(--jk-ui-night-line); border-radius: 999px; color: var(--jk-ui-night-muted); background: transparent; font: 650 13px/1.5 var(--font-ui); }
.thread-chip[aria-pressed=true] { color: var(--jk-ui-story-nav-text); background: var(--jk-ui-story-nav-pill); border-color: var(--jk-ui-story-nav-active-border); }
.thread-search { display: block; width: 100%; min-height: 48px; border: 1px solid var(--jk-ui-night-line); border-radius: 14px; background: var(--jk-ui-night-surface); color: var(--jk-ui-night-text); padding: 10px 14px; font: 16px/1.5 var(--font-ui); margin: 0 0 18px; }
.thread-search::placeholder { color: var(--jk-ui-night-muted); }
.thread-section-heading { font-size: 16px; line-height: 1.6; margin: 12px 0; }
.thread-list { display: grid; gap: 12px; }
.thread-card { background: var(--jk-ui-story-card); border: 1px solid var(--jk-ui-night-line); border-radius: 20px; padding: 16px; }
.thread-card-open { display: block; width: 100%; min-height: 44px; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; font: inherit; }
.thread-card h3 { font-size: 18px; line-height: 1.6; margin: 8px 0; }
.thread-type { color: var(--jk-ui-coral-text-night); font-size: 12px; }
.thread-card p { color: var(--jk-ui-night-muted); font-size: 14px; line-height: 1.75; margin: 8px 0; }
.thread-byline { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--jk-ui-night-muted); font-size: 12px; }
.thread-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--jk-ui-night-wine); color: var(--jk-ui-night-text); font-weight: 800; }
.thread-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.thread-button { min-width: 44px; min-height: 44px; border: 1px solid var(--jk-ui-night-line); border-radius: 999px; padding: 9px 14px; background: transparent; color: var(--jk-ui-night-text); font: 650 14px/1.5 var(--font-ui); }
.thread-button.primary { background: var(--jk-ui-coral); border: 0; color: var(--jk-ui-coral-ink); }
.thread-button[aria-pressed=true] { background: var(--jk-ui-story-nav-pill); border-color: var(--jk-ui-story-nav-active-border); }
.thread-empty { padding: 24px 18px; border: 1px dashed var(--jk-ui-night-line); border-radius: 20px; }
.thread-empty h3 { font-size: 18px; margin: 0 0 8px; }
#jk-thread-dialog { width: min(calc(100% - 24px),680px); max-height: calc(100dvh - 24px); overflow: auto; margin: auto; padding: 20px; border: 1px solid var(--jk-ui-story-nav-border); border-radius: 24px; background: var(--jk-ui-night-canvas); color-scheme: dark; }
#jk-thread-dialog::backdrop { background: #09070bd9; }
.thread-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.thread-dialog-head h2 { margin: 0; font-size: 20px; line-height: 1.5; }
.thread-dialog-head button { min-width: 44px; min-height: 44px; }
.thread-detail-title { font-size: 24px; line-height: 1.6; margin: 12px 0; }
.deep-thread-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.9; }
.thread-field { display: grid; gap: 8px; margin: 18px 0; font-weight: 650; }
.thread-field input,.thread-field textarea { width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--jk-ui-night-line); border-radius: 14px; background: var(--jk-ui-night-surface); color: var(--jk-ui-night-text); font: 16px/1.8 var(--font-ui); }
.thread-field textarea { min-height: 180px; resize: vertical; }
.thread-author-note,.thread-status { font-size: 13px; color: var(--jk-ui-night-muted); line-height: 1.7; }
.thread-status[data-error=true] { color: var(--jk-ui-error-night); }
.thread-status:empty { display:none; }
.thread-mode-note { margin:0 0 10px; font-size:12px; line-height:1.6; color:var(--jk-ui-night-muted); }
.thread-shelves { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:0 0 8px;margin-bottom:10px;border-bottom:1px solid var(--jk-ui-night-line);overflow:visible; }
.thread-shelves .thread-chip { border:0;border-radius:10px;padding:8px 3px;font-size:13px; }
.thread-topics { margin:-10px 0 12px;color:var(--jk-ui-night-muted);font-size:13px; }
.thread-topics summary { min-height:44px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none; }
.thread-topics summary::-webkit-details-marker { display:none; }
.thread-topics summary::after { content:'⌄';font-size:20px; }
.thread-topics[open] summary::after { content:'⌃'; }
.thread-topics .thread-chip-row { flex-wrap:wrap;overflow:visible;margin:0;padding:4px 0 8px; }
.thread-topics summary:focus-visible { outline:3px solid var(--jk-ui-story-focus);outline-offset:3px;border-radius:8px; }
#phone .jk-threads-active #jk-review-ribbon { display:none; }
.thread-card p { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.thread-card h3 { margin:6px 0;line-height:1.5; }
.thread-card .thread-byline { margin-top:10px; }
.thread-card .thread-activity { margin:8px 0 0; }
.thread-card .thread-actions { margin-top:8px; }
.thread-replies { display: grid; gap: 12px; padding: 0; list-style: none; }
.thread-reply { border: 1px solid var(--jk-ui-night-line); border-radius: 16px; padding: 14px; }
.thread-reply.child { margin-left: 18px; border-left: 2px solid var(--jk-ui-story-nav-active-border); }
.thread-reply p { white-space: pre-wrap; overflow-wrap: anywhere; }
:is(#jk-thread-content,#jk-thread-dialog,.deep-core-tabs) button:focus-visible { outline: 3px solid var(--jk-ui-story-focus); outline-offset: 3px; }
:is(#jk-thread-content,#jk-thread-dialog) [hidden] { display: none !important; }
@media(max-width:359px) { #phone .jk-threads-active .jk-main-topbar .h1 { font-size: 24px; } #phone .jk-threads-active #new-story-btn { min-width: 98px; padding: 8px; font-size: 13px; } .deep-core-tabs button { padding: 12px; } #jk-thread-dialog { padding: 16px; } }

/* A question form, visibly shorter than a chapter editor. */
#jk-thread-dialog .thread-compact-question textarea{min-height:78px;height:auto;resize:vertical;line-height:1.6}
.thread-character-count{font-size:13px;color:#c3bbc0;text-align:right;margin:6px 0 16px;font-variant-numeric:tabular-nums}
.thread-character-count[data-over=true]{color:#ff9ba6}
