Files
DndGamePlayer/app/renderer/npcs/NpcsEditorApp.module.css
T
Ivan Fontosh 37ba855faf feat(npcs): add campaign NPCs with relation graph and session overlay
Add a dedicated NPC editor window, directed relations, control/presentation avatar overlay, and ru/en help for the new section.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:13:58 +08:00

275 lines
4.1 KiB
CSS

.page {
height: 100vh;
display: grid;
grid-template-rows: 56px 1fr;
background: #09090b;
color: var(--text1);
}
.topBar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
border-bottom: 1px solid var(--stroke);
background: #18181b;
}
.topTitle {
font-weight: 900;
font-size: 15px;
letter-spacing: 0.2px;
}
.body {
display: grid;
grid-template-columns: 280px 1fr 480px;
min-height: 0;
}
.col {
min-height: 0;
border-right: 1px solid var(--stroke);
}
.col:last-child {
border-right: 0;
}
.side {
display: grid;
grid-template-rows: auto auto 1fr;
gap: 10px;
padding: 12px;
min-height: 0;
background: #0f0f12;
}
.list {
display: grid;
gap: 8px;
align-content: start;
overflow: auto;
min-height: 0;
padding-right: 2px;
}
.tile {
display: grid;
grid-template-columns: 1fr auto;
gap: 4px;
align-items: center;
padding: 4px;
border-radius: 12px;
border: 1px solid var(--stroke);
background: #18181b;
width: 100%;
}
.tileBody {
display: grid;
grid-template-columns: 44px 1fr;
gap: 10px;
align-items: center;
padding: 4px;
border: 0;
background: transparent;
cursor: pointer;
text-align: left;
color: inherit;
min-width: 0;
}
.tileSelected {
border-color: #60a5fa;
box-shadow: 0 0 0 1px #60a5fa;
}
.tileDragging {
opacity: 0.55;
}
.tileDropBefore {
box-shadow: inset 0 2px 0 #60a5fa;
}
.tileDropAfter {
box-shadow: inset 0 -2px 0 #60a5fa;
}
.tileAvatar {
width: 44px;
height: 44px;
border-radius: 10px;
overflow: hidden;
background: #09090b;
}
.tileAvatarImg {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.tileName {
font-size: 13px;
font-weight: 700;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tileMenuBtn {
width: 28px;
height: 28px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--text2);
cursor: pointer;
}
.tileMenuBtn:hover {
background: #27272a;
color: var(--text1);
}
.inspector {
display: grid;
grid-template-rows: 1fr;
min-height: 0;
background: #0f0f12;
}
.inspectorScroll {
overflow: auto;
padding: 14px 16px 24px;
display: grid;
gap: 14px;
align-content: start;
}
.fieldLabel {
color: var(--text2);
font-size: 11px;
font-weight: 900;
letter-spacing: 0.6px;
margin-bottom: 8px;
}
.avatarPick {
display: grid;
gap: 10px;
justify-items: start;
}
.avatarPreview {
width: 120px;
height: 120px;
border-radius: 14px;
overflow: hidden;
border: 1px solid var(--stroke);
background: #09090b;
}
.avatarPreviewImg {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.descShell {
display: grid;
grid-template-rows: auto 1fr;
min-height: 220px;
border-radius: var(--radius-md, 10px);
border: 1px solid var(--stroke);
background: var(--color-overlay-dark-3, #0c0c0f);
overflow: hidden;
}
.descContent {
min-height: 160px;
max-height: 280px;
overflow: auto;
padding: 12px 14px;
}
.relationsTitle {
font-weight: 900;
font-size: 13px;
margin-bottom: 8px;
}
.relationsList {
display: grid;
gap: 6px;
}
.relationItem {
padding: 8px 10px;
border-radius: 10px;
border: 1px solid var(--stroke);
background: #18181b;
font-size: 13px;
font-weight: 600;
}
.emptyInspector {
color: var(--text2);
font-size: 13px;
line-height: 1.45;
}
.muted {
color: var(--text2);
font-size: 13px;
}
.menu {
position: fixed;
z-index: 80;
min-width: 160px;
padding: 6px;
border-radius: 10px;
background: #18181b;
border: 1px solid var(--stroke);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
display: grid;
gap: 2px;
}
.menuItem {
border: 0;
background: transparent;
color: var(--text1);
text-align: left;
padding: 8px 10px;
border-radius: 8px;
cursor: pointer;
font-size: 13px;
width: 100%;
}
.menuItem:hover {
background: #27272a;
}
.menuItemDanger {
border: 0;
background: transparent;
color: var(--color-danger);
text-align: left;
padding: 8px 10px;
border-radius: 8px;
cursor: pointer;
font-size: 13px;
width: 100%;
}
.menuItemDanger:hover {
background: rgba(239, 68, 68, 0.18);
}