:root {
    --fcs-bg: #1e1e1e;
    --fcs-header: #2d2d2d;
    --fcs-border: #3e3e3e;
    --fcs-highlight: #007acc; /* VS Code blue, or use Kenshi orange */
    --fcs-text: #cccccc;
    --fcs-text-muted: #888888;
}

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    overflow: hidden; /* Prevent body scroll, we handle inner scrolls */
    background-color: var(--fcs-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px; /* Dense information */
}

/* Layout Grid */
.fcs-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.fcs-header {
    height: 40px;
    background-color: var(--fcs-header);
    border-bottom: 1px solid var(--fcs-border);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    flex-shrink: 0;
}

.fcs-workspace {
    display: grid;
    grid-template-columns: 250px 350px 1fr; /* Tree | List | Inspector */
    flex-grow: 1;
    overflow: hidden;
}

/* Generic Pane Styling */
.fcs-pane {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--fcs-border);
    background-color: var(--fcs-bg);
    /* NEW: This is the magic bullet for Grid/Flex scrolling */
    min-height: 0; 
    /* OLD: You had min-width, keep that too */
    min-width: 0;
}

.pane-header {
    padding: 8px;
    background-color: var(--fcs-header);
    border-bottom: 1px solid var(--fcs-border);
    font-weight: 600;
    color: var(--fcs-text-muted);
}

.pane-footer {
    padding: 4px 8px;
    background-color: var(--fcs-header);
    border-top: 1px solid var(--fcs-border);
    font-size: 0.85em;
    color: var(--fcs-text-muted);
}

.list-content, .inspector-scroll {
    overflow-y: auto;
    flex-grow: 1;
}

/* Tree & List Items */
.tree-item, .list-item {
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--fcs-text);
    border-bottom: 1px solid transparent;
}

.tree-item:hover, .list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.tree-item.active, .list-item.active {
    background-color: var(--fcs-highlight);
    color: white;
}

/* Search Input Override */
#item-search {
    height: 30px;
    font-size: 0.9em;
    padding: 0 8px;
    margin: 0;
    background-color: #111;
    border: 1px solid #444;
    color: white;
}

/* Inspector Table (Reused from your existing CSS concept) */
.fcs-table {
    width: 100%;
    border-collapse: collapse;
    font-family: monospace;
}
.fcs-table td, .fcs-table th {
    padding: 6px 12px;
    border-bottom: 1px solid var(--fcs-border);
    text-align: left;
}
.fcs-key { color: #569cd6; width: 30%; vertical-align: top; }
.fcs-val { color: #ce9178; white-space: pre-wrap; word-break: break-word; }

.empty-state { padding: 2rem; color: #555; text-align: center; }

.ref-link:hover {
    background-color: rgba(255, 255, 255, 0.03);
}