.summaryPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.summaryScrollArea {
    min-width: 0;
    overflow-x: auto;
}

.summaryContent {
    display: flex;
    min-width: 980px;
    gap: 22px;
    align-items: center;
}

.summaryHeader {
    display: flex;
    align-items: center;
    min-width: 126px;
}

.title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.summaryItems {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, auto));
    gap: 12px;
    align-items: center;
}

.summaryItem,
.stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.summaryLabel,
.meta {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.summaryValue,
.name {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.35;
}

.levelPreview {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 34px;
}

.levelPill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card-strong);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.summaryActions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.assetBadges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.editorPage {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.editorActionBar {
    z-index: 2;
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.editorScrollBody {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.editorTitleGroup,
.editorActions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.editorActions {
    flex: 0 0 auto;
}

.editorSection {
    display: grid;
    min-width: 0;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.editorPage :global(.MuiTextField-root),
.editorPage :global(.MuiFormControl-root) {
    --admin-control-height: 30px;
    --admin-control-font-size: 13px;
}

.editorPage :global(.MuiTabs-root) {
    min-height: 36px;
}

.editorPage :global(.MuiTab-root) {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.sectionTitle {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 760;
}

.basicGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px 12px;
}

.switchField {
    display: flex;
    min-height: 30px;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

.levelWorkspace {
    display: grid;
    min-width: 0;
    grid-template-columns: 188px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.levelNav {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 6px;
}

.levelNavItem {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.levelNavItemActive {
    border-color: var(--primary);
    background: var(--primary-hover);
}

.levelNavMain {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 800;
}

.levelNavMeta {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.levelDetail {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.levelDetailHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
    gap: 12px;
    align-items: center;
}

.materialGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 10px;
}

.rewardPanel {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.rewardPanelHead,
.fuelRuleToolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rewardTable,
.fuelRuleEditor,
.fuelRuleTable {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.rewardTableHead,
.rewardTableRow {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(200px, 1.2fr) 96px minmax(150px, 1fr) minmax(170px, 1fr) var(--control-height);
    gap: 8px;
    align-items: start;
}

.rewardTableWithQuantity {
    grid-template-columns: minmax(200px, 1.2fr) 88px 88px minmax(150px, 1fr) minmax(170px, 1fr) var(--control-height);
}

.rewardTableHead,
.fuelRuleTableHead {
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.rewardTableRow,
.fuelRuleTableRow {
    padding: 8px 0;
    border-top: 1px solid var(--border);
}

.fuelRuleTableHead,
.fuelRuleTableRow {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 130px 130px 120px var(--control-height);
    gap: 8px;
    align-items: start;
}

.emptyState {
    min-height: var(--control-height);
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 700;
}

.sectionHeader {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.levelEditor {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.levelCard {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
}

.levelHeader {
    display: grid;
    grid-template-columns: 72px minmax(180px, 260px);
    gap: 12px;
    align-items: center;
}

.assetGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rewardBlock {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rewardTitle {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.rewardRows,
.ruleEditor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rewardRow {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 110px auto;
    gap: 12px;
    align-items: center;
}

.ruleRow {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr)) 120px auto;
    gap: 12px;
    align-items: center;
}

@media (max-width: 960px) {
    .summaryPanel {
        grid-template-columns: 1fr;
    }

    .summaryActions {
        justify-content: flex-end;
    }

    .editorActionBar,
    .editorTitleGroup,
    .editorActions,
    .rewardPanelHead,
    .fuelRuleToolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .editorActions {
        width: 100%;
    }

    .editorActions > * {
        width: 100%;
    }

    .basicGrid,
    .levelWorkspace,
    .levelDetailHeader,
    .materialGrid,
    .rewardTableHead,
    .rewardTableRow,
    .fuelRuleTableHead,
    .fuelRuleTableRow {
        grid-template-columns: 1fr;
    }

    .levelNav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assetGrid,
    .levelHeader,
    .rewardRow,
    .ruleRow {
        grid-template-columns: 1fr;
    }
}
