.fantasy-settlement-economy {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.fantasy-settlement-goods-group {
    display: grid;
    gap: 6px;
}

.fantasy-settlement-goods-group h3 {
    margin: 0;
    color: #e0b75f;
    font-family: var(--nexus-font-heading, serif);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fantasy-settlement-goods-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.fantasy-settlement-good-card {
    position: relative;
    min-width: 0;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid #725926;
    border-radius: 4px;
    background: rgba(9, 13, 15, .94);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, .7);
}

button.fantasy-settlement-good-card {
    margin: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.fantasy-settlement-good-card.is-supplied {
    border-color: #4e6c7c;
    background: rgba(8, 15, 19, .95);
}

.fantasy-settlement-good-card img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    object-fit: contain;
}

.fantasy-settlement-good-card span {
    position: absolute;
    right: 3px;
    bottom: 3px;
    left: 3px;
    z-index: 2;
    overflow: hidden;
    padding: 1px 3px;
    border-radius: 0 0 2px 2px;
    color: #e7dfcf;
    background: linear-gradient(transparent, rgba(5, 8, 9, .98) 44%);
    font-size: 8px;
    font-weight: 800;
    line-height: 13px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.fantasy-settlement-good-card.is-supplied span {
    color: #d5e6ef;
    background: linear-gradient(transparent, rgba(5, 10, 13, .98) 44%);
}

.fantasy-settlement-economy-strip .fantasy-settlement-economy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 0;
}

.fantasy-settlement-economy-strip .fantasy-settlement-goods-group {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.fantasy-settlement-economy-strip .fantasy-settlement-goods-group h3 {
    min-width: 0;
    font-size: 11px;
    line-height: 1;
    text-align: left;
}

.fantasy-settlement-economy-strip .fantasy-settlement-goods-group.is-supplied h3 {
    color: #8eacbe;
}

.fantasy-settlement-economy-strip .fantasy-settlement-goods-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(42px, 68px));
    gap: 7px;
    min-width: 0;
    overflow: hidden;
}

.fantasy-settlement-economy-strip .fantasy-settlement-good-card {
    width: 100%;
    height: 68px;
    aspect-ratio: auto;
}

.fantasy-settlement-economy-strip .fantasy-settlement-good-card span {
    right: 3px;
    bottom: 3px;
    left: 3px;
    padding: 1px 3px;
    font-size: 9px;
    line-height: 14px;
}

@media (max-width: 1120px) {
    .fantasy-settlement-economy-strip .fantasy-settlement-good-card {
        height: 60px;
    }
}
.fantasy-settlement-placement-economy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(224, 183, 95, .42);
}

.fantasy-settlement-placement-goods {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.fantasy-settlement-placement-goods h3 {
    margin: 0;
    color: #e0b75f;
    font-family: var(--nexus-font-heading, serif);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fantasy-settlement-placement-goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
    gap: 4px;
    min-width: 0;
}

.fantasy-settlement-placement-goods-grid .fantasy-settlement-good-card {
    width: 100%;
    height: 44px;
    aspect-ratio: auto;
}

.fantasy-settlement-placement-goods-grid .fantasy-settlement-good-card span {
    right: 2px;
    bottom: 2px;
    left: 2px;
    padding: 0 2px;
    font-size: 7px;
    line-height: 11px;
}
.fantasy-settlement-market-basin {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(224, 183, 95, .24);
    color: #929a98;
    font-size: 9px;
}
.fantasy-settlement-market-basin i { color: var(--nexus-user-accent, #bf913f); }
.fantasy-settlement-placement-inhabitants {
    display: grid;
    gap: 5px;
    margin-top: 9px;
}

.fantasy-settlement-placement-inhabitants h3 {
    margin: 0;
    color: #e0b75f;
    font-family: var(--nexus-font-heading, serif);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fantasy-settlement-inhabitant-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 5px;
}

.fantasy-settlement-inhabitant-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px;
    border: 1px solid #31586b;
    border-radius: 5px;
    background: rgba(8, 18, 24, .88);
}

.fantasy-settlement-inhabitant-portrait {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #9b712a;
    border-radius: 50%;
    color: #d7e7ee;
    background: #10181c;
}

.fantasy-settlement-inhabitant-portrait img {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    object-fit: cover;
}

.fantasy-settlement-inhabitant-copy {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.fantasy-settlement-inhabitant-copy strong,
.fantasy-settlement-inhabitant-copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fantasy-settlement-inhabitant-copy strong {
    color: #f2eadb;
    font-size: 10px;
}

.fantasy-settlement-inhabitant-copy em {
    margin-top: 2px;
    color: #9db7c4;
    font-size: 8px;
    font-style: normal;
}
.fantasy-settlement-placement-shops {
    display: grid;
    gap: 5px;
    margin-top: 9px;
}

.fantasy-settlement-placement-shops h3 {
    margin: 0;
    color: #e0b75f;
    font-family: var(--nexus-font-heading, serif);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fantasy-settlement-shop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 5px;
}

.fantasy-settlement-shop-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px;
    border: 1px solid #725926;
    border-radius: 5px;
    background: rgba(17, 14, 8, .9);
}

.fantasy-settlement-shop-art {
    display: grid;
    width: 40px;
    height: 34px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #9b712a;
    border-radius: 4px;
    color: #ead7ad;
    background: #17130d;
}

.fantasy-settlement-shop-art img {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    object-fit: cover;
}

.fantasy-settlement-shop-copy {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.fantasy-settlement-shop-copy strong,
.fantasy-settlement-shop-copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fantasy-settlement-shop-copy strong {
    color: #f2eadb;
    font-size: 10px;
}

.fantasy-settlement-shop-copy em {
    margin-top: 2px;
    color: #bca77b;
    font-size: 8px;
    font-style: normal;
}

 /* Settlement dossier economy parity: use the panel accent for every economy state. */
.augur-theme-fantasy .fantasy-settlement-economy {
    gap: 10px;
}

.augur-theme-fantasy .fantasy-settlement-goods-group {
    gap: 5px;
}

.augur-theme-fantasy .fantasy-settlement-goods-group h3,
.augur-theme-fantasy .fantasy-settlement-economy-strip .fantasy-settlement-goods-group h3,
.augur-theme-fantasy .fantasy-settlement-placement-goods h3 {
    color: var(--nexus-accent-bright);
    font-family: var(--font-primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.1;
}

.augur-theme-fantasy .fantasy-settlement-economy-strip .fantasy-settlement-goods-group.is-supplied h3 {
    color: var(--nexus-accent-bright);
}

.augur-theme-fantasy .fantasy-settlement-good-card,
.augur-theme-fantasy .fantasy-settlement-good-card.is-supplied {
    border-color: color-mix(in srgb, var(--nexus-accent-primary) 62%, transparent);
    background: rgba(7, 12, 14, .9);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nexus-accent-primary) 12%, transparent), inset 0 0 12px rgba(0, 0, 0, .7);
}

.augur-theme-fantasy .fantasy-settlement-good-card:hover,
.augur-theme-fantasy .fantasy-settlement-good-card.is-supplied:hover {
    border-color: var(--nexus-accent-bright);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nexus-accent-bright) 35%, transparent), 0 0 10px color-mix(in srgb, var(--nexus-accent-primary) 26%, transparent);
}

.augur-theme-fantasy .fantasy-settlement-good-card span,
.augur-theme-fantasy .fantasy-settlement-good-card.is-supplied span {
    color: var(--nexus-text-primary);
    background: linear-gradient(transparent, rgba(5, 8, 9, .98) 44%);
}

/* Nexus Placer location candidate */
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-placement-economy {
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom-color: var(--nexus-border-subtle);
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-placement-goods h3,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-placement-shops h3,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-placement-inhabitants h3 {
    color: var(--nexus-accent-bright);
    font-family: var(--nexus-heading-font);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-good-card,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-good-card.is-supplied,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-shop-card,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-inhabitant-card {
    border-color: var(--nexus-border-subtle);
    border-radius: 2px;
    background: rgba(8, 12, 14, .86);
    box-shadow: none;
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-good-card:hover,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-good-card.is-supplied:hover,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-shop-card:hover,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-inhabitant-card:hover {
    border-color: var(--nexus-border-strong);
    background: var(--nexus-accent-surface);
    box-shadow: var(--nexus-focus-ring);
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-shop-art {
    border-color: var(--nexus-border-subtle);
    border-radius: 2px;
    color: var(--nexus-accent-bright);
    background: var(--nexus-surface-interactive);
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-inhabitant-portrait {
    border-color: var(--nexus-border-subtle);
    color: var(--nexus-accent-bright);
    background: var(--nexus-surface-interactive);
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-shop-copy strong,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-inhabitant-copy strong {
    color: var(--nexus-text-primary);
}

.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-shop-copy em,
.site-tabs-panel.augur-theme-fantasy .fantasy-settlement-inhabitant-copy em {
    color: var(--nexus-text-secondary);
}
.fantasy-marketplace-name-mode {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: -3px;
    color: rgba(224, 234, 239, 0.68);
    font-size: 11px;
}

.fantasy-marketplace-name-mode.is-derived > i {
    color: #71c89c;
}

.fantasy-marketplace-name-mode.is-custom > i {
    color: #d7a85d;
}

.fantasy-marketplace-name-mode button {
    min-height: 26px;
    margin-left: auto;
    padding: 4px 8px;
    border: 1px solid rgba(215, 168, 93, 0.42);
    border-radius: 5px;
    background: rgba(66, 43, 20, 0.62);
    color: #f2d7a7;
    font-size: 10px;
}
