.nexus-quests { color: var(--nexus-text-primary); --q-border: var(--nexus-border-subtle); }
.nexus-quests .window-content { padding: 0; overflow: hidden; background: var(--nexus-surface-base); container: quest-dossier / inline-size; }
.nexus-quests button:not(:where(.connections-board *, .npc-dossier-header *)) { border: 1px solid var(--q-border); background: var(--nexus-surface-raised); color: var(--nexus-text-primary); box-shadow: none; }
.nexus-quests button:not(:where(.connections-board *, .npc-dossier-header *)):hover, .nexus-quests button:not(:where(.connections-board *, .npc-dossier-header *)):focus-visible { background: var(--nexus-surface-hover); border-color: var(--nexus-accent-primary); }
.nexus-quests .q-primary { background: var(--nexus-accent-surface-strong); border-color: var(--nexus-accent-primary); }
.nexus-quests input:not(:where(.connections-board *, .npc-dossier-header *)), .nexus-quests textarea:not(:where(.connections-board *, .npc-dossier-header *)), .nexus-quests select:not(:where(.connections-board *, .npc-dossier-header *)) { background: var(--nexus-surface-panel); color: var(--nexus-text-primary); border: 1px solid var(--q-border); }
.nexus-quests input:not(:where(.connections-board *, .npc-dossier-header *))[type=checkbox] { flex: 0 0 auto; }
.nexus-quests textarea:not(:where(.connections-board *, .npc-dossier-header *)) { resize: vertical; min-height: 48px; font-family: var(--font-primary, sans-serif); font-size: var(--nexus-font-size-section-title); }
.nexus-quests .window-content h1:not(:where(.connections-board *, .npc-dossier-header *)), .nexus-quests .window-content h2:not(:where(.connections-board *, .npc-dossier-header *)) { font-family: var(--nexus-heading-font); margin: 0; border: 0; }
.nexus-quests .window-content h1:not(:where(.connections-board *, .npc-dossier-header *)) { font-size: calc(26px + var(--nexus-text-scale-step)); line-height: 1.15; }
.nexus-quests .window-content h2:not(:where(.connections-board *, .npc-dossier-header *)) { font-size: calc(20px + var(--nexus-text-scale-step)); }
.nexus-quests p:not(:where(.connections-board *, .npc-dossier-header *)) { margin: 8px 0; }
.q-eyebrow, .nexus-quests h3:not(:where(.connections-board *, .npc-dossier-header *)) { color: var(--nexus-accent-bright); text-transform: uppercase; letter-spacing: .08em; font-size: var(--nexus-font-size-label); font-weight: 700; }
.q-muted { color: var(--nexus-text-muted); font-size: var(--nexus-font-size-label); }
.q-player-picker { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 16px; gap: 10px; }
.q-player-list { flex: 1; min-height: 0; overflow: auto; }
.q-player-list label { display: flex; align-items: center; gap: 8px; padding: 7px 6px; cursor: pointer; }
.q-player-list label:hover { background: var(--nexus-surface-hover); }
.q-player-list span { overflow-wrap: anywhere; }
.q-player-picker footer { display: flex; justify-content: flex-end; gap: 6px; }
.q-player-picker footer button { width: auto; }
.q-prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--nexus-text-secondary); }
.q-browser { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 22px; gap: 16px; }
.q-browser-tools, .q-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-browser-create-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.q-browser-create-actions > button { width: auto; white-space: nowrap; }
.q-quest-folder-header { position: relative; }
.nexus-quests .q-quest-folder-header .q-quest-folder-heading { padding-right: calc(70px + 4ch); color: var(--nexus-accent-bright); }
.q-folder-meta { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 5px; pointer-events: none; color: var(--nexus-accent-bright); }
.q-folder-meta > small { white-space: nowrap; }
.q-folder-chevron { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.nexus-quests .q-folder-options { flex: 0 0 24px; width: 24px; height: 24px; padding: 0; color: var(--nexus-accent-bright); opacity: 0; pointer-events: none; }
.nexus-quests .q-quest-folder-header:hover .q-folder-options,
.nexus-quests .q-quest-folder-header:focus-within .q-folder-options { opacity: 1; pointer-events: auto; }
.q-search { display: flex; align-items: center; gap: 8px; flex: 1; }
.q-search > input { flex: 1; min-width: 80px; }
.q-filters { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--q-border); }
.q-filters button { flex: 0 0 auto; padding: 4px 10px; font-size: var(--nexus-font-size-label); }
.q-filters .is-active { border-color: var(--nexus-accent-primary); background: var(--nexus-accent-surface); }
.q-browser-list { overflow: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.q-quest-folder { flex-shrink: 0; }
.nexus-quests .q-quest-folder-heading { display: flex; align-items: center; gap: 8px; width: 100%; height: auto; min-height: 32px; padding: 6px 10px; text-align: left; }
.q-quest-folder-heading > span { flex: 1; overflow-wrap: anywhere; }
.q-quest-folder-entries { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 0 12px; }
.q-folder-empty { color: var(--nexus-text-muted); padding: 4px 8px; }
.q-browser-row { position: relative; }
.q-quest-card-actions { position: absolute; right: 8px; top: 8px; display: flex; align-items: center; gap: 5px; }
.nexus-quests .q-quest-options { order: -1; width: 24px; height: 24px; min-height: 0; padding: 0; opacity: 0; }
.q-browser-row:hover .q-quest-options, .q-browser-row:focus-within .q-quest-options { opacity: 1; }
.nexus-quests .q-browser-card { display: flex; flex-shrink: 0; gap: 12px; padding: 8px 10px; width: 100%; height: auto; min-height: 96px; text-align: left; align-items: center; border-radius: 4px; line-height: 1.25; }
.q-card-art { width: 58px; height: 68px; border: 0; object-fit: cover; border-radius: 3px; background: var(--nexus-surface-panel); }
.q-card-placeholder { display: grid; place-items: center; flex: 0 0 58px; background: radial-gradient(ellipse at top, var(--nexus-accent-surface-strong), var(--nexus-surface-base)); color: var(--nexus-accent-primary); font-size: 26px; }
.q-card-copy { flex: 1; min-width: 0; }
.q-card-copy p { color: var(--nexus-text-secondary); font-size: var(--nexus-font-size-body); white-space: normal; font-weight: normal; line-height: 1.5; }
.q-card-copy h2 { white-space: normal; overflow-wrap: anywhere; }
.q-card-copy footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--nexus-font-size-label); color: var(--nexus-text-muted); }
.q-mini-cast { display: flex; gap: 4px; }
.q-mini-cast img { width: 25px; height: 25px; object-fit: cover; border: 1px solid var(--q-border); border-radius: 50%; }
.nexus-quests .q-quest-audience { width: auto; height: 24px; min-height: 0; padding: 2px 6px; font-size: var(--nexus-font-size-label); color: var(--nexus-accent-bright); white-space: nowrap; }
.q-browser-row.has-audience .q-card-top { padding-right: 210px; min-height: 24px; }
.q-browser-row.has-audience .q-quest-main-indicator { margin-right: 0; }
.q-empty { padding: 40px 20px; text-align: center; color: var(--nexus-text-muted); margin: auto; }
.q-empty > i { font-size: 35px; color: var(--nexus-accent-muted); margin-bottom: 18px; }
.q-empty h2 { margin: 8px 0; }
.q-error { color: var(--nexus-text-primary); background: var(--nexus-accent-surface); padding: 12px; }
.nexus-quests h3:not(:where(.connections-board *, .npc-dossier-header *)) { display: flex; gap: 7px; align-items: center; margin: 0 0 10px; padding-bottom: 9px; border-bottom: 1px solid var(--q-border); }
.nexus-quests h3:not(:where(.connections-board *, .npc-dossier-header *)) > span, .nexus-quests h3:not(:where(.connections-board *, .npc-dossier-header *)) > button { margin-left: auto; }
.nexus-quests .q-icon { width: 27px; height: 27px; flex: 0 0 27px; padding: 0; display: grid; place-items: center; }
.nexus-quests .qv-entity [data-action="linkMenu"],
.nexus-quests .qv-goal-heading [data-action="goalMenu"] { opacity: 0; pointer-events: none; }
.nexus-quests .qv-entity:hover [data-action="linkMenu"],
.nexus-quests .qv-entity:focus-within [data-action="linkMenu"],
.nexus-quests .qv-goal:hover > .qv-goal-heading [data-action="goalMenu"],
.nexus-quests .qv-goal:focus-within > .qv-goal-heading [data-action="goalMenu"] { opacity: 1; pointer-events: auto; }
.q-note { border-left: 1px solid var(--q-border); padding-left: 12px; margin: 14px 0; }
.q-note strong { color: var(--nexus-accent-bright); font-size: var(--nexus-font-size-label); }

/* Quest composition uses the same portrait cards and sidebar hierarchy as entity dossiers. */
.qv-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr) 370px; gap: 12px; height: 100%; min-height: 0; padding: 12px; background: radial-gradient(ellipse at 35% 0%, var(--nexus-accent-surface), transparent 65%), var(--nexus-surface-base); }
.qv-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow: auto; padding: 10px; border: 1px solid var(--q-border); background: var(--nexus-surface-panel); container: quest-main / inline-size; }
.qv-main > * { flex-shrink: 0; }
.qv-profile { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: 16px; border: 1px solid var(--q-border); background: var(--nexus-surface-panel); }
.qv-sidebar-content { display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; overflow: auto; }
.qv-sidebar-content .qv-section-heading { flex-wrap: wrap; }
.qv-section-heading { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.nexus-quests .qv-section-heading h3 { margin: 0; border: 0; padding: 0; }
.nexus-quests .qv-section-heading button { font-size: var(--nexus-font-size-label); height: 28px; }
.qv-goals { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; }
.qv-goal { min-width: 0; padding: 10px; border: 1px solid var(--q-border); background: var(--nexus-surface-panel); }
.qv-goal-heading { display: flex; gap: 7px; align-items: center; margin-bottom: 10px; font-size: var(--nexus-font-size-caption); }
.qv-goal-heading > span { color: var(--nexus-accent-bright); flex-shrink: 0; font-size: calc(15px + var(--nexus-text-scale-step)); font-weight: 700; }
.qv-goal-heading > strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--nexus-heading-font); font-size: var(--nexus-font-size-section-title); }
.qv-goal-heading > small { color: var(--nexus-text-muted); text-transform: capitalize; }
.qv-goal.is-done { border-color: var(--nexus-accent-primary); }
.qv-goal.is-obsolete { opacity: .65; }
.qv-composition { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.qv-composition > .qv-entity, .qv-composition > .qv-target { flex: 0 0 190px; width: 190px; max-width: 100%; }
.qv-composition > .qv-intent { flex: 0 0 74px; width: 74px; }
.nexus-quests .qv-intent { height: auto; min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--nexus-accent-bright); background: var(--nexus-accent-surface); border: 0; border-radius: 2px; padding: 6px 3px; }
.qv-intent > i:first-child { font-size: 21px; }
.qv-intent > i:last-child { font-size: 9px; }
.qv-intent strong { font-family: var(--nexus-heading-font); font-size: var(--nexus-font-size-section-title); }
.qv-target { display: flex; flex-direction: column; min-width: 0; }
.qv-target > .qv-entity { flex: 1; }
.qv-entity { min-width: 0; border: 1px solid var(--q-border); background: var(--nexus-surface-base); padding: 10px; }
.qv-label { display: block; color: var(--nexus-accent-bright); text-transform: uppercase; letter-spacing: .08em; font-size: var(--nexus-font-size-caption); font-weight: bold; margin-bottom: 9px; }
.qv-custom-label { position: relative; padding-right: 28px; }
.qv-custom-label .qv-label-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexus-quests .qv-custom-label > .q-icon { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; opacity: 0; pointer-events: none; }
.nexus-quests .qv-entity:hover .qv-custom-label > .q-icon,
.nexus-quests .qv-entity:focus-within .qv-custom-label > .q-icon { opacity: 1; pointer-events: auto; }
.qv-entity-row { display: flex; align-items: center; gap: 5px; }
.nexus-quests .qv-entity-open { display: flex; gap: 10px; align-items: center; justify-content: flex-start; min-width: 0; width: 100%; height: auto; min-height: 70px; padding: 0; border: 0; text-align: left; white-space: normal; line-height: 1.35; background: none; }
.qv-portrait { flex: 0 0 55px; width: 55px; height: 70px; display: grid; place-items: center; }
.qv-portrait .nexus-npc-portrait-viewport { width: 100%; height: 100%; }
.qv-portrait img { width: 100%; height: 100%; object-fit: contain; border: 0; }
.qv-portrait i { font-size: 25px; color: var(--nexus-accent-muted); }
.qv-entity-copy { min-width: 0; }
.qv-entity-copy strong { display: block; font-family: var(--nexus-heading-font); font-size: calc(17px + var(--nexus-text-scale-step)); overflow-wrap: anywhere; }
.qv-entity-copy small { display: block; font-size: var(--nexus-font-size-caption); color: var(--nexus-text-secondary); text-transform: capitalize; margin-top: 4px; }
.qv-entity.is-empty { border-style: dashed; }
.qv-empty-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 70px; font-size: var(--nexus-font-size-label); color: var(--nexus-text-muted); }
.qv-empty-slot > i { color: var(--nexus-accent-muted); font-size: 18px; }
.nexus-quests .qv-name-target, .nexus-quests .qv-subtle { font-size: var(--nexus-font-size-label); height: auto; min-height: 25px; padding: 4px 7px; color: var(--nexus-text-muted); background: none; border-color: transparent; }

.nexus-quests .qv-composition > .q-icon { width: 24px; height: 24px; flex-basis: 24px; align-self: center; border-radius: 50%; color: var(--nexus-accent-bright); }
.qv-goal .qv-entity { padding: 8px; }
.qv-goal .qv-label { margin-bottom: 6px; font-size: var(--nexus-font-size-detail); }
.qv-goal .qv-entity-open { min-height: 54px; gap: 6px; }
.qv-goal .qv-portrait { width: 42px; flex-basis: 42px; height: 54px; }
.qv-goal .qv-entity-copy strong { font-size: calc(15px + var(--nexus-text-scale-step)); }
.qv-add-goal { margin-top: -6px; }
.qv-main > .qv-subtle { align-self: flex-start; }
.qv-composition .qv-entity-open { min-height: 54px; }
.qv-composition .qv-portrait { height: 48px; width: 36px; flex-basis: 36px; }
.qv-composition .qv-entity-copy strong { font-size: var(--nexus-font-size-section-title); }
.qv-composition .qv-empty-slot { min-height: 54px; }
.qv-composition .q-icon { width: 23px; height: 23px; flex-basis: 23px; }
.qv-shell .is-dragover { outline: 2px solid var(--nexus-accent-primary); outline-offset: -2px; background: var(--nexus-accent-surface-strong); }
.qv-journal { line-height: 1.6; overflow-wrap: anywhere; min-height: 200px; }
.qv-journal img { max-width: 100%; }
.qv-notes textarea { width: 100%; }
.qv-writing { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 16px; gap: 12px; }
.qv-writing prose-mirror { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.qv-writing .editor-container { min-height: 0; flex: 1; overflow: auto; }
.qv-writing footer { display: flex; justify-content: flex-end; gap: 8px; }
.qv-connection-rail { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow: auto; padding: 0 2px 4px 0; }
.qv-connections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; flex: 0 0 auto; min-width: 0; }
.qv-connection-rail .qv-entity { position: relative; padding: 12px 10px; }
.qv-connection-rail .qv-label { padding-right: 26px; min-height: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.qv-connection-rail .qv-entity-row { display: block; }
.nexus-quests .qv-connection-rail .qv-entity-open { flex-direction: column; gap: 8px; padding: 3px 8px 8px; text-align: center; }
.qv-connection-rail .qv-portrait { width: 120px; height: 120px; flex: 0 0 120px; }
.qv-connection-rail .qv-entity-copy { width: 100%; }
.qv-connection-rail .qv-entity-row > .q-icon { position: absolute; right: 8px; top: 8px; }
.qv-connection-rail .qv-entity-row > .q-muted { position: absolute; right: 12px; top: 44px; }
.qv-connection-rail .qv-empty-slot { min-height: 120px; }

.qv-connection-rail.is-dragover { outline-style: dashed; }
.nexus-quest-directory { display:flex; flex-direction:column; min-height:0; flex:1; gap:10px; padding:0; }
.nexus-quest-filters { display:flex; gap:3px; flex-wrap:nowrap; }
.nexus-quest-filters button { font-size: var(--nexus-font-size-caption); height:auto; padding:3px 4px; }
.nexus-quest-filters > [data-filter] { flex:1 1 0; width:auto; min-width:0; white-space:nowrap; }
.nexus-quest-filters > .nexus-quest-toolbar-icon { flex:0 0 24px; width:24px; min-width:24px; padding:3px; }
.nexus-quest-directory > :not(.nexus-quest-list) { flex-shrink:0; }
.nexus-quest-footer { flex-shrink:0; }
.nexus-quest-filters button.is-active { border-color:var(--nexus-accent-primary); background:var(--nexus-accent-surface); }
.nexus-quest-list { flex:1; min-height:0; overflow:auto; display:flex; flex-direction:column; gap:6px; }
@container quest-dossier (max-width: 1100px) { .qv-shell { grid-template-columns: 190px minmax(0, 1fr) 300px; gap: 10px; padding: 10px; } .qv-profile { padding: 12px; } .qv-connection-rail .qv-portrait { width: 100px; height: 100px; flex-basis: 100px; } }

.qv-state > label { display:flex; flex-direction:column; gap:5px; font-size: var(--nexus-font-size-caption); color:var(--nexus-text-muted); flex:1; min-width:0; }
.nexus-quests .qv-state button { display:flex; justify-content:space-between; gap:8px; width:100%; min-height:30px; }
.nexus-quests .qv-goal-status { display:flex; align-items:center; gap:7px; font-size: var(--nexus-font-size-caption); padding:3px 6px; height:27px; flex:0 0 auto; }
.qv-rewards { padding:10px; border:1px solid var(--q-border); background:var(--nexus-surface-panel); display:flex; flex-direction:column; gap:8px; }
.qv-rewards.is-concealed { border-style:dashed; }
.qv-rewards > header { display:flex; gap:8px; align-items:center; }
.nexus-quests .qv-rewards h3 { flex:1; border:0; margin:0; padding:0; }
.qv-rewards > footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px; font-size: var(--nexus-font-size-caption); color:var(--nexus-text-muted); }
.qv-reward-note { display:flex; align-items:center; gap:4px; font-size: var(--nexus-font-size-body); }
.qv-reward-note > span { overflow-wrap:anywhere; }
.nexus-quests .qv-reward-note > button:first-child { flex:1; min-width:0; height:auto; padding:6px; white-space:normal; overflow-wrap:anywhere; text-align:left; justify-content:flex-start; font-size: var(--nexus-font-size-body); }
.qv-connection-rail .qv-rewards .qv-entity { padding:8px; }
.nexus-quests .qv-rewards .qv-entity-open { flex-direction:row; text-align:left; padding:0; min-height:48px; gap:6px; }
.qv-rewards .qv-entity-copy strong { font-size: var(--nexus-font-size-card-heading); }
.qv-connection-rail .qv-rewards .qv-entity-row { display:flex; }
.qv-connection-rail .qv-rewards .qv-entity-row > .q-icon,.qv-connection-rail .qv-rewards .qv-entity-row > .q-muted { position:static; }
.qv-connection-rail .qv-rewards .qv-portrait { flex:0 0 40px; width:40px; height:48px; }

.qv-drop-hint { font-size: var(--nexus-font-size-caption); color:var(--nexus-text-muted); text-align:center; }
.qv-drop-hint i { color:var(--nexus-accent-bright); }
.qv-connection-rail > .qv-drop-hint { margin-top:auto; padding-top:12px; }
.qv-journal-pane { display:flex; flex-direction:column; flex:1; min-height:0; gap:16px; }
.qv-journal-pane .qv-journal { flex:1; min-height:0; overflow:auto; }
.qv-journal-empty { padding:16px; border:1px dashed var(--q-border); border-radius:4px; text-align:center; font-size: var(--nexus-font-size-section-title); }
.qv-journal-edit { width:100%; flex-shrink:0; margin-top:auto; }
.q-note { position:relative; padding-right:30px; }
.q-note-menu { position:absolute; top:0; right:0; opacity:0; }
.q-note:hover .q-note-menu, .q-note:focus-within .q-note-menu { opacity:1; }
.qv-profile > .npc-dossier-header { flex-shrink:0; }
.nexus-quests .npc-dossier-title p { margin:0 0 8px; }
.qv-profile .npc-life-connections { flex:1; min-height:0; display:flex; flex-direction:column; }

.qv-state { display:flex; flex-wrap:wrap; gap:5px; }
.nexus-quests .qv-state button { height:auto; font-size: var(--nexus-font-size-label); padding:4px 7px; line-height:1.3; }
.qv-sidebar-content.is-log { overflow:hidden; }
.qv-notes { display:flex; flex-direction:column; flex:1; min-height:0; gap:10px; }
.qv-log-entries { flex:1; min-height:0; overflow:auto; overflow-wrap:anywhere; }
.qv-log-entries .q-note:first-child { margin-top:0; }
.qv-log-composer { display:flex; align-items:flex-end; gap:6px; flex-shrink:0; }
.nexus-quests .qv-log-composer textarea { flex:1; min-width:0; resize:none; }
.nexus-quests .qv-log-composer button { width:34px; height:34px; flex:0 0 34px; padding:0; }

.nexus-quests .qv-profile .npc-dossier-title h2 { font-size: calc(18px + var(--nexus-text-scale-step)); }

.qv-shell.is-compact { grid-template-columns:minmax(0,1fr); padding:10px; }
.qv-compact-profile { display:flex; flex-direction:column; gap:12px; }
.qv-compact-profile > * { flex-shrink:0; }
.qv-compact-profile .qv-add-goal { align-self:flex-start; }
.qv-compact-profile .qv-composition > .qv-intent { width:60px; flex-basis:60px; }
.qv-compact-profile .qv-goal-heading { flex-wrap:wrap; }
.qv-compact-profile .qv-goal-heading > strong { flex-basis:100%; order:1; }

/* Plain prose and unclassified controls also follow the shared text-size preference. */
.qv-journal, .q-prose { font-size:calc(14px + var(--nexus-text-scale-step)); }
.nexus-quests .qv-journal-edit, .nexus-quests .q-primary,
.nexus-quests .q-browser-create-actions > button, .nexus-quests .q-search > button,
.nexus-quests .qv-writing footer button { font-size:var(--nexus-font-size-body); }
.nexus-quests .q-search input { font-size:var(--nexus-font-size-section-title); }
.qv-profile .npc-dossier-tabs { flex-wrap:wrap; }

.nexus-quests .q-browser-row { flex-shrink: 0; position: relative; }
.nexus-quests .q-browser-row .q-card-copy p { margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-browser-row .q-mini-cast img { width: 20px; height: 20px; }

.qv-goal-description { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--nexus-body-font); font-size: var(--nexus-font-size-body); line-height: 1.5; color: var(--nexus-text-primary); }

.q-quest-main-indicator { color: var(--nexus-accent-bright); margin-right: 26px; }

.q-browser-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--q-border); }
.q-browser-filter-bar > .q-filters { padding-bottom: 0; border-bottom: 0; }

/* The sidebar uses the same quest cards and folders with a narrower arrangement. */
.nexus-quest-directory .q-quest-folder-entries { padding-left: 5px; gap: 6px; }
.nexus-quest-directory .q-quest-folder-heading { font-size: var(--nexus-font-size-label); }
.nexus-quest-directory .q-folder-empty { font-size: var(--nexus-font-size-caption); margin: 3px 0; }
.nexus-quest-footer { display: flex; justify-content: flex-end; gap: 5px; }
.nexus-quest-footer button { width: auto; padding: 4px 6px; font-size: var(--nexus-font-size-caption); }

.nexus-quest-directory .q-sidebar-card { position: relative; display: grid; grid-template-columns: 32px auto minmax(0, 1fr); grid-template-rows: 20px 22px; gap: 8px 8px; padding: 10px 8px; flex-shrink: 0; min-width: 0; }
.nexus-quest-directory .q-sidebar-open { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 3px; }
.nexus-quest-directory .q-sidebar-art { grid-column: 1; grid-row: 1 / 3; position: relative; pointer-events: none; width: 32px; height: 44px; align-self: center; object-fit: cover; border: 0; border-radius: 3px; display: grid; place-items: center; }
.nexus-quest-directory .q-sidebar-title { grid-column: 2 / 4; grid-row: 1; position: relative; pointer-events: none; align-self: center; padding-right: 23px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--nexus-font-size-card-heading); line-height: 20px; }
.nexus-quest-directory .q-sidebar-title i { color: var(--nexus-accent-bright); }
.nexus-quest-directory .q-sidebar-progress { grid-column: 2; grid-row: 2; position: relative; pointer-events: none; align-self: center; white-space: nowrap; color: var(--nexus-text-muted); font-size: var(--nexus-font-size-caption); }
.nexus-quest-directory .q-sidebar-audience { grid-column: 3; grid-row: 2; position: relative; justify-self: end; align-self: center; width: auto; max-width: 100%; min-height: 0; height: 20px; line-height: 16px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(var(--nexus-font-size-caption) - 1px); color: var(--nexus-accent-bright); }
.nexus-quest-directory .q-sidebar-options { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; padding: 0; opacity: 0; pointer-events: none; }
.nexus-quest-directory .q-sidebar-card:hover .q-sidebar-options, .nexus-quest-directory .q-sidebar-card:focus-within .q-sidebar-options { opacity: 1; pointer-events: auto; }

.q-quest-ungrouped-drop { flex-shrink: 0; padding: 6px 8px; border: 1px dashed var(--nexus-border-subtle); border-radius: 3px; color: var(--nexus-text-muted); font-size: var(--nexus-font-size-caption); }
.nexus-quests .q-folder-drop-active { background: var(--nexus-accent-surface-strong); border-color: var(--nexus-accent-primary); outline: 1px solid var(--nexus-accent-primary); }

#nexus-quests .window-content { display: flex; flex-direction: column; min-height: 0; }
#nexus-quests .q-browser { height: auto; flex: 0 0 auto; padding-bottom: 0; }
#nexus-quests .q-browser-results { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 16px 22px 22px; }

.nexus-quest-directory .q-folder-meta .q-folder-options,
.nexus-quest-directory .q-folder-meta .q-folder-options:hover,
.nexus-quest-directory .q-folder-meta .q-folder-options:focus-visible { height: 20px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; line-height: 1; }
.nexus-quest-directory .q-folder-meta .q-folder-options:focus-visible { outline: 1px solid var(--nexus-accent-primary); outline-offset: 1px; }
