.augur-nexus.npc-trait-picker .window-content,
.augur-nexus.npc-create-dialog .window-content,
.augur-nexus.npc-data-editor .window-content {
    padding: 14px;
    background: rgba(3, 7, 11, 0.96);
    color: #f8e7c7;
}

.augur-nexus.npc-create-dialog .window-content {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.augur-nexus.npc-data-editor .window-content {
    padding: 0;
    overflow: hidden;
}

.npc-data-editor-shell {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background:
        radial-gradient(circle at 18% 12%, rgba(85, 189, 236, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(4, 10, 18, 0.96), rgba(1, 6, 12, 0.98));
    color: #ffffff;
}

.npc-data-editor-header {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 30px;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.82);
}

.npc-data-editor-portrait {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(85, 189, 236, 0.72);
    border-radius: 50%;
    background: rgba(5, 16, 24, 0.92);
    color: #d7f6ff;
    overflow: hidden;
}

.npc-data-editor-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faction-data-editor .npc-data-editor-portrait {
    border-color: transparent;
    border-radius: 0;
    background: transparent;
}

.faction-data-editor .npc-data-editor-portrait img {
    object-fit: contain;
}

.ship-data-editor .npc-data-editor-shell {
    padding-top: 8px;
}

.ship-data-editor .npc-data-editor-header {
    grid-template-columns: 158px minmax(0, 1fr) 30px;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom-color: var(--nexus-border-strong);
}

.ship-data-editor-image {
    width: 150px;
    height: 112px;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
}

.ship-data-editor-image img {
    width: 112px;
    height: 150px;
    object-fit: contain;
    transform: rotate(90deg) scale(0.96);
}

.npc-data-editor-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 27px;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.8);
}

.npc-data-editor-header p {
    margin: 6px 0 0;
    color: rgba(244, 251, 255, 0.78);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.npc-data-editor-actions {
    display: grid;
    gap: 6px;
}

.npc-data-editor-icon-action {
    width: 28px;
    height: 28px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(85, 189, 236, 0.52);
    border-radius: 6px;
    background: rgba(3, 17, 27, 0.72);
    color: #e9f7ff;
}

.npc-data-editor-icon-action:hover,
.npc-data-editor-icon-action:focus-visible {
    border-color: rgba(240, 200, 76, 0.72);
    color: #f0c84c;
    outline: none;
}

.npc-data-editor-fields {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding-right: 4px;
}

.faction-data-color-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--faction-color) 72%, #ffffff 12%);
    border-radius: 7px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--faction-color) 22%, transparent), rgba(3, 12, 19, 0.88) 58%);
}

.faction-data-color-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.faction-data-color-copy strong {
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
}

.faction-data-color-copy span {
    color: rgba(244, 251, 255, 0.68);
    font-size: 10px;
    line-height: 1.25;
}

.faction-data-color-control {
    position: relative;
    min-width: 112px;
    height: 32px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    padding: 3px 8px 3px 3px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 5px;
    background: rgba(1, 6, 11, 0.82);
    color: rgba(255, 255, 255, 0.88);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.faction-data-color-control input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.faction-data-color-swatch {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 4px;
    background: var(--faction-color);
    box-shadow: 0 0 9px color-mix(in srgb, var(--faction-color) 48%, transparent);
}

.faction-data-color-control:hover,
.faction-data-color-control:focus-within {
    border-color: rgba(240, 200, 76, 0.72);
}

.faction-ideology-editor {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid rgba(85, 189, 236, 0.26);
    border-radius: 8px;
    background: rgba(0, 8, 15, 0.58);
}

.faction-ideology-editor > header {
    display: flex;
    gap: 10px;
    align-items: start;
    justify-content: space-between;
}

.faction-ideology-editor h5 {
    margin: 0;
    color: #f0c84c;
    font-size: 13px;
    font-weight: 900;
}

.faction-ideology-editor header p,
.faction-ideology-editor-empty {
    margin: 2px 0 0;
    color: rgba(244, 251, 255, 0.62);
    font-size: 10px;
    line-height: 1.25;
}

.faction-ideology-editor-list {
    display: grid;
    gap: 7px;
}

.faction-ideology-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 30px;
    gap: 7px;
    align-items: start;
    padding: 8px;
    border: 1px solid rgba(85, 189, 236, 0.2);
    border-radius: 6px;
    background: rgba(2, 12, 20, 0.74);
}

.faction-ideology-editor-row label {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.faction-ideology-editor-row label > span {
    color: #a8d9e9;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.faction-ideology-editor-row select {
    width: 100%;
    min-width: 0;
    height: 30px;
    border: 1px solid rgba(85, 189, 236, 0.34);
    border-radius: 4px;
    background: rgba(2, 6, 13, 0.94);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.faction-ideology-editor-row small {
    min-height: 25px;
    color: rgba(244, 251, 255, 0.62);
    font-size: 9px;
    line-height: 1.25;
}

.faction-ideology-editor-delete {
    width: 30px;
    height: 30px;
    min-height: 30px;
    display: grid;
    place-items: center;
    margin-top: 15px;
    padding: 0;
    border: 1px solid rgba(224, 94, 94, 0.42);
    border-radius: 5px;
    background: rgba(61, 10, 13, 0.72);
    color: #ffd2d2;
}

.faction-ideology-editor [data-action="addIdeologyTopic"]:disabled {
    opacity: 0.42;
    cursor: default;
}

.npc-data-trait-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid rgba(85, 189, 236, 0.24);
    border-radius: 8px;
    background: rgba(0, 8, 15, 0.58);
}

.npc-data-trait-row {
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
}

.npc-data-trait-row .npc-trait-chip {
    width: 64px;
}

.npc-data-trait-row .npc-trait-chip img {
    width: 36px;
    height: 36px;
}

.npc-data-trait-edit-button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(85, 189, 236, 0.52);
    border-radius: 6px;
    background: rgba(3, 17, 27, 0.72);
    color: #e9f7ff;
}

.npc-data-trait-edit-button:hover,
.npc-data-trait-edit-button:focus-visible {
    border-color: rgba(240, 200, 76, 0.72);
    color: #f0c84c;
    outline: none;
}

.npc-data-editor-row {
    min-height: 48px;
    display: grid;
    grid-template-columns: 30px 92px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.08);
}

.npc-data-editor-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.12);
}

.npc-data-editor-row label {
    color: rgba(244, 251, 255, 0.76);
    font-size: 11px;
    font-weight: 800;
}

.faction-editor-extension-row .faction-editor-extension-control {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.faction-editor-extension-row select {
    width: 100%;
    min-width: 0;
    border-color: var(--nexus-border-subtle);
    border-radius: 2px;
    background: var(--nexus-surface-raised);
    color: var(--nexus-text-primary);
}

.faction-editor-extension-row small {
    color: var(--nexus-text-muted);
    font-size: 10px;
    line-height: 1.25;
}

.npc-data-field-visibility {
    width: 30px;
    height: 30px;
    min-height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(85, 189, 236, 0.34);
    border-radius: 5px;
    background: rgba(3, 17, 27, 0.82);
    color: rgba(244, 251, 255, 0.82);
}

.npc-data-field-visibility.is-hidden-field {
    border-color: rgba(244, 192, 76, 0.42);
    color: rgba(244, 192, 76, 0.92);
}

.npc-data-field-visibility:hover,
.npc-data-field-visibility:focus-visible {
    border-color: rgba(85, 189, 236, 0.72);
    color: #ffffff;
    outline: none;
}

.npc-data-combo {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 34px;
}

.location-data-default-row {
    grid-template-columns: 30px 76px minmax(0, 1fr) 28px 28px;
}

.location-data-default-row.is-multiline {
    align-items: start;
}

.location-data-structure-fields {
    margin-bottom: 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(85, 189, 236, 0.22);
}

.location-data-structure-row {
    grid-template-columns: 30px 76px minmax(0, 1fr);
}

.location-data-editor .npc-data-editor-row select,
.location-data-editor .npc-data-editor-row textarea {
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(85, 189, 236, 0.38);
    border-radius: 4px;
    background: rgba(2, 6, 13, 0.9);
    color: #ffffff;
    font-weight: 700;
}

.location-data-editor .npc-data-editor-row select {
    height: 32px;
    padding: 0 8px;
}

.location-data-editor .npc-data-editor-row textarea {
    min-height: 70px;
    padding: 7px 8px;
    resize: vertical;
}

.location-data-editor .location-data-structure-row .npc-data-text-input {
    border-right: 1px solid rgba(85, 189, 236, 0.38);
    border-radius: 4px;
}

.npc-data-editor-row input {
    min-width: 0;
    width: 100%;
    height: 32px;
    border: 1px solid rgba(85, 189, 236, 0.38);
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: rgba(2, 6, 13, 0.84);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.npc-data-editor-text-row input.npc-data-text-input {
    border-right: 1px solid rgba(85, 189, 236, 0.38);
    border-radius: 4px;
}

.npc-data-combo-toggle {
    width: 34px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(85, 189, 236, 0.38);
    border-radius: 0 4px 4px 0;
    background: rgba(3, 17, 27, 0.92);
    color: rgba(244, 251, 255, 0.92);
}

.npc-data-combo-toggle:hover,
.npc-data-combo-toggle:focus-visible,
.npc-data-editor-row input:focus {
    border-color: rgba(85, 189, 236, 0.92);
    outline: none;
}

.npc-data-combo-menu {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 188px;
    overflow: auto;
    padding: 4px;
    border: 1px solid rgba(85, 189, 236, 0.46);
    border-radius: 5px;
    background: rgba(3, 9, 18, 0.98);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48), 0 0 22px rgba(46, 214, 255, 0.16);
}

.npc-data-combo.open .npc-data-combo-menu {
    display: grid;
    gap: 2px;
}

.npc-data-combo.drop-up .npc-data-combo-menu {
    top: auto;
    bottom: calc(100% + 4px);
}

.npc-data-combo-menu button {
    width: 100%;
    min-height: 26px;
    padding: 4px 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: rgba(244, 251, 255, 0.9);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

.npc-data-combo-menu button:hover,
.npc-data-combo-menu button:focus-visible,
.npc-data-combo-menu button.selected {
    background: rgba(85, 189, 236, 0.18);
    color: #ffffff;
    outline: none;
}

.npc-data-custom-fields {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(85, 189, 236, 0.22);
}

.npc-data-custom-fields-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.npc-data-custom-fields-header h5 {
    margin: 0;
    color: #f0c84c;
    font-size: 13px;
    font-weight: 900;
    text-transform: none;
}

.npc-data-add-field {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid rgba(85, 189, 236, 0.46);
    border-radius: 5px;
    background: rgba(3, 17, 27, 0.82);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.npc-data-custom-field-list {
    display: grid;
    gap: 6px;
}

.npc-data-custom-field-row {
    display: grid;
    grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr) 28px 28px 30px;
    gap: 6px;
    align-items: center;
}

.npc-data-custom-field-row input {
    width: 100%;
    min-width: 0;
    height: 30px;
    border: 1px solid rgba(85, 189, 236, 0.34);
    border-radius: 4px;
    background: rgba(2, 6, 13, 0.84);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.npc-data-custom-field-move,
.npc-data-custom-field-delete {
    width: 100%;
    height: 30px;
    min-height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 5px;
}

.npc-data-custom-field-move {
    border: 1px solid rgba(85, 189, 236, 0.34);
    background: rgba(3, 17, 27, 0.82);
    color: rgba(244, 251, 255, 0.82);
}

.npc-data-custom-field-delete {
    border: 1px solid rgba(255, 122, 122, 0.42);
    background: rgba(34, 8, 10, 0.78);
    color: #ff9b9b;
}

.npc-data-editor-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(85, 189, 236, 0.22);
}

.npc-data-editor-footer button {
    min-width: 136px;
}
.npc-person-data-editor .window-content {
    min-height: 0;
}

.npc-person-editor-shell {
    container-type: inline-size;
    padding: 14px;
}

.npc-person-editor-identity {
    flex: 0 0 auto;
    grid-template-columns: 82px minmax(240px, 0.75fr) minmax(420px, 1.25fr) 148px;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px 12px;
}

.npc-person-editor-identity .npc-data-editor-portrait {
    width: 82px;
    height: 82px;
}

.npc-person-editor-identity-copy {
    min-width: 0;
}

.npc-person-editor-identity-copy > span {
    display: block;
    margin-bottom: 5px;
    color: #5ad6ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.npc-person-editor-identity .npc-data-editor-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: center;
}

.npc-person-editor-identity-action {
    width: 148px;
    height: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.npc-person-editor-workspace {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.npc-person-editor-column {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(85, 189, 236, 0.3);
    border-radius: 8px;
    background: rgba(0, 8, 15, 0.64);
}

.npc-person-editor-column.is-character {
    border-color: rgba(108, 197, 232, 0.4);
    background: linear-gradient(180deg, rgba(8, 21, 31, 0.8), rgba(0, 8, 15, 0.66));
}

.npc-person-editor-column.is-custom {
    border-color: rgba(240, 200, 76, 0.3);
}

.npc-person-editor-column-header {
    min-height: 64px;
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 11px;
    border-bottom: 1px solid rgba(85, 189, 236, 0.22);
    background: rgba(4, 18, 28, 0.84);
}

.npc-person-editor-column.is-custom .npc-person-editor-column-header {
    border-bottom-color: rgba(240, 200, 76, 0.2);
    background: rgba(23, 19, 8, 0.58);
}

.npc-person-editor-column-header h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #5ad6ff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.npc-person-editor-column.is-custom .npc-person-editor-column-header h4 {
    color: #f0c84c;
}

.npc-person-editor-column-header p {
    margin: 3px 0 0;
    color: rgba(244, 251, 255, 0.62);
    font-size: 9px;
    line-height: 1.25;
}

.npc-person-editor-column-header .npc-data-add-field {
    flex: 0 0 auto;
}

.npc-person-editor-column-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding: 10px;
    scrollbar-width: thin;
}

.npc-person-editor-column-body.npc-data-editor-fields {
    padding: 10px;
}

.npc-person-editor-section-title {
    margin: 0 0 8px;
    color: #f0c84c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.npc-person-editor-section-title.is-thread {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(85, 189, 236, 0.22);
    color: #9bdfff;
}

.npc-person-editor-section-help {
    margin: -4px 1px 8px;
    color: rgba(244, 251, 255, 0.56);
    font-size: 9px;
    line-height: 1.3;
}

.npc-person-editor-column .npc-data-editor-row {
    grid-template-columns: 30px 76px minmax(0, 1fr);
}

.npc-person-editor-header-personality {
    min-width: 0;
    padding: 8px 14px;
    border-left: 1px solid rgba(85, 189, 236, 0.22);
    border-right: 1px solid rgba(85, 189, 236, 0.22);
    border-radius: 7px;
    background: rgba(0, 8, 15, 0.42);
}

.npc-person-editor-header-personality > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.npc-person-editor-header-personality h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #f0c84c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.npc-person-editor-header-personality .npc-data-trait-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.npc-person-editor-header-personality .npc-trait-chip {
    width: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    text-align: left;
}

.npc-person-editor-header-personality .npc-trait-chip img {
    width: 32px;
    height: 32px;
    padding: 4px;
}

.npc-person-editor-header-personality .npc-trait-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.npc-person-editor-header-personality .npc-data-trait-edit-button {
    width: auto;
    min-width: 82px;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 800;
}

.npc-person-editor-ideology {
    margin: 0;
}

.npc-person-editor-ideology .faction-ideology-editor-row {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr) 30px;
}

.npc-person-editor-column.is-custom .npc-data-custom-fields {
    margin: 0;
    padding: 10px;
    border: 0;
}

.npc-person-editor-column.is-custom .npc-data-custom-field-row {
    grid-template-columns: minmax(76px, 0.42fr) minmax(0, 1fr) 28px 28px 30px;
}

.npc-person-data-editor .npc-data-editor-footer {
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
}

@container (max-width: 980px) {
    .npc-person-editor-identity {
        grid-template-columns: 68px minmax(0, 1fr) 148px;
    }

    .npc-person-editor-header-personality {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 4px;
        border: 1px solid rgba(85, 189, 236, 0.22);
    }

    .npc-person-editor-identity .npc-data-editor-actions {
        grid-column: 3;
        grid-row: 1;
    }
    .npc-person-editor-workspace {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: auto;
    }

    .npc-person-editor-column.is-custom {
        grid-column: 1 / -1;
        min-height: 260px;
    }
}

@container (max-width: 680px) {
    .npc-person-editor-workspace {
        grid-template-columns: 1fr;
    }

    .npc-person-editor-column,
    .npc-person-editor-column.is-custom {
        grid-column: auto;
        min-height: 340px;
    }

    .npc-person-editor-identity {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .npc-person-editor-identity .npc-data-editor-portrait {
        width: 68px;
        height: 68px;
    }

    .npc-person-editor-header-personality {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .npc-person-editor-identity .npc-data-editor-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        flex-direction: row;
    }

    .npc-person-editor-identity-action {
        flex: 1 1 0;
        width: auto;
        justify-content: center;
    }
}
.faction-organization-editor-shell {
    container-type: inline-size;
    padding: 14px;
}

.faction-organization-editor-identity {
    flex: 0 0 auto;
    grid-template-columns: 82px minmax(240px, 0.8fr) minmax(360px, 1.2fr) 148px;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px 12px;
}

.faction-organization-editor-identity .npc-data-editor-portrait {
    width: 82px;
    height: 82px;
}

.faction-organization-editor-identity .npc-data-editor-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: center;
}

.faction-organization-editor-color {
    min-width: 0;
    margin: 0;
}

.faction-organization-editor-ideology {
    margin: 0;
}

.faction-organization-data-editor .npc-data-editor-footer {
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
}

@container (max-width: 980px) {
    .faction-organization-editor-identity {
        grid-template-columns: 74px minmax(0, 1fr) 148px;
    }

    .faction-organization-editor-color {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 4px;
    }

    .faction-organization-editor-identity .npc-data-editor-actions {
        grid-column: 3;
        grid-row: 1;
    }
}

@container (max-width: 680px) {
    .faction-organization-editor-identity {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .faction-organization-editor-identity .npc-data-editor-portrait {
        width: 68px;
        height: 68px;
    }

    .faction-organization-editor-color {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .faction-organization-editor-identity .npc-data-editor-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        flex-direction: row;
    }
}
.augur-nexus.npc-trait-picker .window-content {
    min-height: 0;
    overflow: hidden;
}

.npc-trait-picker-shell,
.npc-trait-picker {
    gap: 12px;
}

.npc-trait-picker-shell {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.npc-trait-picker-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.npc-trait-picker-header h2,
.npc-trait-picker-title h2 {
    margin: 0;
    border: 0;
    color: #ffffff;
    font-size: 22px;
    letter-spacing: 0;
}

.npc-trait-picker-header > span,
.npc-trait-picker-title p,
.npc-trait-limit {
    margin: 4px 0 0;
    color: #cdefff;
    font-size: 12px;
}

.npc-trait-picker-header > span,
.npc-trait-count {
    padding: 7px 10px;
    border: 1px solid rgba(240, 200, 76, 0.8);
    border-radius: 999px;
    background: rgba(7, 13, 24, 0.88);
    color: #f0c84c;
    font-weight: 900;
}

.npc-trait-picker-current,
.npc-trait-picker-message,
.npc-trait-picker-footer {
    flex: 0 0 auto;
}

.npc-trait-picker-current,
.npc-trait-picker-grid,
.npc-trait-current,
.npc-trait-grid-wrap {
    border: 1px solid rgba(85, 189, 236, 0.42);
    border-radius: 8px;
    padding: 12px;
    background: rgba(0, 8, 15, 0.78);
}

.npc-trait-picker-current h3,
.npc-trait-current h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 14px;
}

.npc-trait-picker-current-grid,
.npc-trait-picker-grid,
.npc-trait-selected-row,
.npc-trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
}

.npc-trait-picker-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    scrollbar-color: #9b1b54 rgba(4, 12, 18, 0.9);
}

.npc-trait-picker-message {
    padding: 8px 10px;
    border: 1px solid rgba(240, 200, 76, 0.52);
    border-radius: 6px;
    background: rgba(240, 200, 76, 0.1);
    color: #f0c84c;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    white-space: normal;
}

.npc-trait-option {
    min-height: 86px;
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 8px;
    border: 1px solid rgba(85, 189, 236, 0.28);
    border-radius: 8px;
    background: rgba(5, 15, 22, 0.82);
    color: #f8e7c7;
    text-align: center;
}

.npc-trait-option.selected {
    border-color: rgba(85, 189, 236, 0.92);
    background: rgba(8, 74, 104, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 0 14px rgba(85, 189, 236, 0.18);
}

.npc-trait-option.disabled,
.npc-trait-option.conflicted {
    opacity: 0.45;
}

.npc-trait-option img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.npc-trait-option span {
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.npc-trait-picker-footer,
.npc-create-form footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.npc-trait-picker-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(85, 189, 236, 0.26);
    background: linear-gradient(180deg, rgba(3, 7, 11, 0.88), rgba(3, 7, 11, 1));
}

.npc-trait-picker-footer button,
.npc-create-form button {
    min-height: 30px;
    padding: 0 13px;
}

.npc-trait-picker-footer button {
    min-width: 128px;
}

.npc-create-form {
    display: grid;
    gap: 12px;
}

.npc-create-form label {
    display: grid;
    gap: 5px;
    margin: 0;
    color: #cdefff;
    font-size: 12px;
    font-weight: 800;
}

.npc-create-form input,
.npc-create-form select {
    min-height: 34px;
    border: 1px solid rgba(85, 189, 236, 0.5);
    border-radius: 6px;
    background: rgba(2, 12, 20, 0.86);
    color: #ffffff;
    padding: 0 10px;
    font-weight: 800;
}

.npc-create-form input:focus,
.npc-create-form select:focus {
    border-color: rgba(85, 189, 236, 0.92);
    box-shadow: 0 0 0 1px rgba(85, 189, 236, 0.2);
    outline: none;
}

.npc-create-form select option {
    background: #080d18;
    color: #f4fbff;
}

.npc-create-generator,
.npc-create-generator-grid {
    display: grid;
    gap: 10px;
}

.npc-create-generator {
    padding: 10px;
    border: 1px solid rgba(85, 189, 236, 0.26);
    border-radius: 8px;
    background: rgba(0, 8, 15, 0.62);
}

.npc-create-generator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.npc-create-form .npc-create-scene-connection {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid rgba(85, 189, 236, 0.26);
    border-radius: 6px;
    background: rgba(0, 8, 15, 0.62);
    cursor: pointer;
}

.npc-create-form .npc-create-scene-connection input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--nexus-accent-primary, #55bdec);
}

.npc-create-scene-connection-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.npc-create-scene-connection-copy strong,
.npc-create-scene-connection-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.npc-create-scene-connection-copy strong {
    color: #ffffff;
    font-size: 11px;
}

.npc-create-scene-connection-copy small {
    color: rgba(205, 239, 255, 0.68);
    font-size: 9px;
    font-weight: 600;
}

.npc-candidate-panel {
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(85, 189, 236, 0.5);
    border-radius: 8px;
    background: rgba(0, 8, 15, 0.8);
}

.npc-candidate-panel .npc-dossier-section {
    overflow: visible;
}

.npc-create-candidate-actions {
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .npc-dossier-stage {
        grid-template-columns: minmax(0, 1fr);
    }

    .npc-dossier-chip-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.nexus-browser-root-create {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}

.nexus-browser-pill-action.secondary {
    opacity: 0;
    width: 0;
    flex-basis: 0;
    margin-left: 0;
    border-width: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateX(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, width 0.15s ease, flex-basis 0.15s ease, margin-left 0.15s ease;
}

.nexus-browser-pill:hover .nexus-browser-pill-action.secondary,
.nexus-browser-pill:focus-within .nexus-browser-pill-action.secondary {
    opacity: 1;
    width: 24px;
    flex-basis: 24px;
    margin-left: 6px;
    border-width: 1px;
    pointer-events: auto;
    transform: translateX(0);
}

.nexus-browser-pill .nexus-browser-connection-toggle.secondary.has-count,
.nexus-browser-pill .nexus-browser-connection-toggle.secondary.active {
    opacity: 1;
    width: 24px;
    flex-basis: 24px;
    margin-left: 6px;
    border-width: 1px;
    pointer-events: auto;
    overflow: hidden;
    transform: none;
}

.nexus-scene-rename-shell {
    padding: 4px 0 0;
}

.nexus-scene-rename-form {
    display: grid;
    gap: 10px;
}

.nexus-scene-rename-form label {
    font-weight: 700;
}

.nexus-scene-rename-form input[type="text"] {
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(70, 60, 72, 0.95);
    color: #f4e6cf;
    padding: 0 12px;
}

.nexus-scene-rename-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.nexus-text-prompt-form {
    display: grid;
    gap: 10px;
    color: #f4e6cf;
}

.nexus-text-prompt-form label {
    font-weight: 700;
}

.nexus-text-prompt-form input[type="text"] {
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(70, 60, 72, 0.95);
    color: #f4e6cf;
    padding: 0 12px;
}

.nexus-delete-confirm ul {
    margin: 8px 0;
    padding-left: 22px;
}

.nexus-delete-impact-list {
    display: grid;
    gap: 7px;
    max-height: min(48vh, 420px);
    overflow-y: auto;
    padding-right: 4px;
}

.nexus-delete-impact-section {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
}

.nexus-delete-impact-section summary {
    cursor: pointer;
    padding: 7px 9px;
    font-weight: 800;
}

.nexus-delete-impact-section ul,
.nexus-delete-impact-counts {
    margin: 0 8px 8px;
}

.nexus-delete-structural ul,
.nexus-delete-candidates ul {
    display: grid;
    gap: 3px;
    padding: 0;
    list-style: none;
}

.nexus-delete-structural-row,
.nexus-delete-candidate-row label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 3px 5px;
    border-radius: 4px;
}

.nexus-delete-structural-row {
    color: #ff9d88;
}

.nexus-delete-structural-row > i {
    width: 14px;
    color: rgba(255, 157, 136, 0.72);
    text-align: center;
}

.nexus-delete-candidate-row label {
    cursor: pointer;
}

.nexus-delete-candidate-row input,
.nexus-delete-selection-controls input {
    margin: 0;
    accent-color: #d94f3d;
}

.nexus-delete-candidate-row.is-delete {
    color: #ff9d88;
    background: rgba(217, 79, 61, 0.08);
}

.nexus-delete-candidate-row.is-keep {
    color: #7ed69a;
    background: rgba(79, 175, 111, 0.08);
}

.nexus-delete-row-status {
    justify-self: end;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nexus-delete-structural-note {
    margin: 0 2px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.nexus-delete-selection-controls {
    display: grid;
    gap: 4px;
    padding: 8px 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
}

.nexus-delete-selection-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.nexus-delete-selection-controls p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.nexus-delete-selection-controls .nexus-delete-selection-notice:not(:empty) {
    color: #f0c84c;
}

.nexus-delete-impact-section.nexus-delete-preserved {
    border-color: rgba(240, 200, 76, 0.3);
}

.nexus-delete-impact-section.nexus-delete-preserved summary {
    color: #f0c84c;
}

.nexus-delete-impact-section.nexus-delete-preserved ul {
    color: #7ed69a;
}

.nexus-delete-confirm .nexus-delete-confirm-warning {
    margin-top: -4px;
    color: #ff6b57;
    font-weight: 800;
}

.form-footer .nexus-delete-confirm-submit {
    color: #ff9d88;
}

.form-footer .nexus-delete-confirm-submit i {
    color: #ff6b57;
}

.form-footer .nexus-delete-confirm-submit:hover,
.form-footer .nexus-delete-confirm-submit:focus-visible {
    color: #ffb7a8;
}

.augur-nexus.site-delete-dialog {
    --site-delete-border: rgba(240, 200, 76, 0.28);
    --site-delete-panel: rgba(7, 9, 17, 0.94);
}

.augur-nexus.site-delete-dialog .window-content {
    padding: 0;
}

.augur-nexus.site-delete-dialog .dialog-form {
    gap: 0;
}

.augur-nexus.site-delete-dialog .dialog-content {
    padding: 18px 18px 12px;
}

.augur-nexus.site-delete-dialog .nexus-delete-confirm {
    display: grid;
    gap: 10px;
    color: #f4e6cf;
    font-size: 14px;
    line-height: 1.35;
}

.augur-nexus.site-delete-dialog .nexus-delete-confirm p {
    margin: 0;
}

.augur-nexus.site-delete-dialog .nexus-delete-confirm p:first-child {
    font-size: 16px;
}

.augur-nexus.site-delete-dialog .nexus-delete-confirm ul {
    margin: 0;
    padding: 9px 12px 9px 28px;
    border: 1px solid rgba(240, 200, 76, 0.18);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.24);
}

.augur-nexus.site-delete-dialog .form-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice {
    min-width: 0;
    min-height: 42px;
    height: auto;
    margin: 0;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--site-delete-border);
    border-radius: 7px;
    background: var(--site-delete-panel);
    color: #ead8b5;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice i {
    flex: 0 0 auto;
    color: #f0c84c;
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice span {
    min-width: 0;
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice:hover,
.augur-nexus.site-delete-dialog .form-footer .site-delete-choice:focus-visible {
    border-color: rgba(240, 200, 76, 0.7);
    box-shadow: 0 0 0 1px rgba(240, 200, 76, 0.18);
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice.delete-branch {
    border-color: rgba(255, 118, 96, 0.36);
    color: #ffd5ca;
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice.delete-branch i {
    color: #ff9d88;
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice.delete-branch:hover,
.augur-nexus.site-delete-dialog .form-footer .site-delete-choice.delete-branch:focus-visible {
    border-color: rgba(255, 118, 96, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 118, 96, 0.18);
}

.augur-nexus.site-delete-dialog .form-footer .site-delete-choice.cancel {
    border-color: rgba(255, 255, 255, 0.2);
    color: #f4e6cf;
}

.nexus-browser-pill-shell.pending-site .nexus-browser-pill {
    border-color: rgba(255, 184, 107, 0.45);
    gap: 8px;
}

.nexus-browser-pill-shell.pending-site .nexus-browser-pill-type {
    color: #ffb86b;
}

.nexus-browser-pill-shell.is-player-hidden .nexus-browser-pill {
    opacity: 0.58;
    border-color: rgba(170, 154, 136, 0.38);
    filter: saturate(0.45);
}

.nexus-browser-pill-shell.is-player-hidden .nexus-browser-pill-name i {
    margin-right: 6px;
    color: rgba(245, 227, 196, 0.78);
    font-size: 11px;
}

.nexus-browser-pill-shell.is-player-hidden .nexus-browser-pill-emblem {
    opacity: 0.5;
    filter: saturate(0.35);
}

.nexus-browser-pill-emblem {
    position: relative;
    z-index: 1;
    width: 34px;
    min-height: 40px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
}

.nexus-browser-pill-emblem img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

.nexus-browser-pill-shell .npc-pill-portrait {
    width: 34px;
    height: 34px;
    min-height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
}

.nexus-browser-pill-shell .npc-pill-portrait img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

.nexus-browser-pill-shell .location-pill-emblem {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.nexus-browser-pill-shell .location-pill-emblem img {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

.nexus-browser-pill-shell .faction-pill-emblem {
    border-color: transparent;
    border-radius: 0;
    background: transparent;
}

.nexus-browser-pill-shell .faction-pill-emblem img {
    object-fit: contain;
}

.nexus-browser-pill-shell .ship-pill-image {
    width: 64px;
    height: 72px;
    flex: 0 0 64px;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}

.nexus-browser-pill-shell .ship-pill-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform: scale(1.55);
    transform-origin: center;
}

.nexus-browser-pill-shell.ship-pill-shell {
    align-items: center;
}

.nexus-browser-pill-shell.ship-pill-shell .nexus-browser-pill {
    height: 54px;
    align-items: center;
}

.ship-model-category-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 10px;
}

.ship-model-category-tabs .site-icon-tab {
    flex: 0 0 auto;
    min-width: 82px;
    min-height: 28px;
    padding: 3px 14px;
}

.ship-image-grid .site-icon-card {
    min-height: 126px;
}

.ship-image-visual img {
    object-fit: contain;
}

.nexus-browser-pill-emblem.no-thumb {
    color: rgba(245, 227, 196, 0.75);
}

.nexus-browser-pill-shell.pending-site .nexus-browser-pill-copy {
    position: relative;
    z-index: 1;
}
