/* Match the shared 64px header instead of the old 5rem report offset. */
#s .game-wrapper.ui-flat-v2 .pane.center :is(.operation-report-content, .ranking-content) {
    inset: 64px 0 0;
    padding: 20px;
    box-sizing: border-box;
}
#s .game-wrapper.ui-flat-v2 .pane.center .ranking-history-panel .ranking-content { bottom: 76px; }
#s .operation-report-layout { gap: 16px; }
#s .operation-category { margin-bottom: 8px; }
#s .operation-category:last-child { margin-bottom: 0; }
#s .operation-category-toggle { min-height: 40px; padding: 8px 12px; }
#s .operation-metric-row { padding-left: 12px; padding-right: 12px; }
#s .operation-chart-stage { padding: 16px; }
#s .financial-year-header { margin-bottom: 8px; }

#s .financial-report-layout.has-chart { gap: 16px; }
#s .pl-period-report .operation-category-toggle { padding: 8px 12px; }
#s .pl-period-report .financial-year-header { padding-left: 12px; padding-right: 12px; }
#s .financial-detail-row { padding-left: 12px; padding-right: 12px; }
@container (max-width: 560px) {
    #s .game-wrapper.ui-flat-v2 .pane.center .ranking-history-panel .ranking-content { bottom: 120px; }
}

/* Prefer one horizontal legend row; wrap whole entries only when space is tight. */
#s .operation-chart-legend {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    min-height: 0;
    padding: 4px 0 16px;
}
#s .operation-chart-legend .operation-series { flex: 0 0 auto; white-space: nowrap; }

/* Closing cash balance is the report total, independent of disclosure state. */
#s [data-financial-report="cash"] .cash-closing-balance .operation-category-toggle {
    background: #ccdce5;
}
#s [data-financial-report="cash"] .cash-closing-balance .financial-amount {
    color: #00507b;
    font-size: 16px;
}
#s [data-financial-report="cash"] .cash-closing-balance .financial-amount.format-money-minus { color: #ca0303; }
