@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

.npc-block {
    --nb-border:  #F6AA1C;
    --nb-name:    #f0e4c0;
    --nb-accent:  #F6AA1C;
    --nb-bg:      linear-gradient(160deg, #1a1a2e 0%, #12121f 60%, #0f0f1a 100%);
    --nb-divider: rgba(246,170,28,0.15);
    --nb-text:    #d4c9a8;
    --nb-muted:   #8a7e60;
    --nb-dim:     #b8a98a;

    display: flex;
    flex-direction: column;
    width: 680px;
    max-width: 100%;
    border-radius: 9.5px;
    border: 1.6px solid var(--nb-border);
    background: var(--nb-bg);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.15),
        0 4px 32px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(246,170,28,0.07);
    font-family: 'Roboto Condensed', Arial Narrow, sans-serif;
    color: var(--nb-text);
    overflow: hidden;
    position: relative;
    font-weight: 400;
}

.npc-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 180px; height: 120px;
    background: radial-gradient(ellipse at top left, rgba(246,170,28,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.npc-block__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--nb-divider);
    position: relative;
    z-index: 1;
}

.npc-block__portrait-wrap {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    border: 1.5px solid rgba(246,170,28,0.35);
    overflow: hidden;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(246,170,28,0.2));
}

.npc-block__portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.npc-block__portrait-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0.35;
}

.npc-block__title-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.npc-block__name {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--nb-name);
    margin: 0;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: 0 1px 8px rgba(246,170,28,0.18);
}

.npc-block__subtitle {
    font-size: 11px;
    font-weight: 300;
    color: var(--nb-muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0;
}

.npc-block__quick-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.npc-block__qs-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nb-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.npc-block__qs-label {
    font-size: 10px;
    font-weight: 300;
    color: var(--nb-muted);
    letter-spacing: 0.06em;
}

.npc-block__qs-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--nb-name);
}

.npc-block__stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border-bottom: 1px solid var(--nb-divider);
    position: relative;
    z-index: 1;
}

.npc-block__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    gap: 2px;
    border-right: 1px solid rgba(246,170,28,0.08);
    transition: background 0.15s;
}

.npc-block__stat:last-child {
    border-right: none;
}

.npc-block__stat-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nb-muted);
    line-height: 1;
}

.npc-block__stat-score {
    font-size: 20px;
    font-weight: 700;
    color: var(--nb-name);
    line-height: 1;
    text-shadow: 0 0 12px rgba(246,170,28,0.15);
}

.npc-block__stat-mod {
    font-size: 11px;
    font-weight: 600;
    color: var(--nb-accent);
    line-height: 1;
    letter-spacing: 0.02em;
}

.npc-block__abilities {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    padding: 4px 0;
}

.npc-block__ability {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.npc-block__ability:last-child {
    border-bottom: none;
}

.npc-block__ability-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid rgba(246,170,28,0.2);
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 1px;
}

.npc-block__ability-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.npc-block__ability-icon-placeholder {
    opacity: 0.3;
}

.npc-block__ability-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.npc-block__ability-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.npc-block__ability-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--nb-name);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.npc-block__ability-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--nb-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 3px;
    padding: 1px 6px 1px 4px;
    white-space: nowrap;
    line-height: 1.6;
}

.npc-block__ability-desc {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--nb-dim);
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

.npc-block__section-title {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--nb-muted);
    padding: 8px 18px 4px;
    border-bottom: 1px solid var(--nb-divider);
    margin: 0;
    position: relative;
    z-index: 1;
}

@media (max-width: 520px) {
    .npc-block {
        width: 100%;
    }

    .npc-block__stats {
        grid-template-columns: repeat(6, 1fr);
    }

    .npc-block__stat {
        border-right: 1px solid rgba(255,255,255,0.08);
        padding: 8px 2px;
    }

    .npc-block__stat:last-child {
        border-right: none;
    }

    .npc-block__portrait-wrap {
        width: 56px;
        height: 56px;
    }

    .npc-block__quick-stats      { gap: 8px; }
    .npc-block__name             { font-size: 20px; }
    .npc-block__subtitle         { font-size: 13px; }
    .npc-block__qs-label         { font-size: 12px; }
    .npc-block__qs-val           { font-size: 15px; }
    .npc-block__stat-label       { font-size: 9px; }
    .npc-block__stat-score       { font-size: 16px; }
    .npc-block__stat-mod         { font-size: 11px; }
    .npc-block__section-title    { font-size: 11px; }
    .npc-block__ability-name     { font-size: 15px; }
    .npc-block__ability-action   { font-size: 12px; }
    .npc-block__ability-desc     { font-size: 14.5px; }
}

.npc-block .rich-text:focus {
    outline: none;
}

.npc-block__ability-icon.is-editor-placeholder {
    border-style: dashed;
    cursor: pointer;
}
